Skip to content

Commit

Permalink
[cleanup] remove ifdef conditions already handled by buildsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
Rechi committed Apr 4, 2019
1 parent b64f8b5 commit 4ce4680
Show file tree
Hide file tree
Showing 40 changed files with 2 additions and 134 deletions.
3 changes: 0 additions & 3 deletions xbmc/cores/AudioEngine/Sinks/osx/CoreAudioChannelLayout.h
Expand Up @@ -8,7 +8,6 @@

#pragma once

#if defined(TARGET_DARWIN_OSX)
#include <list>
#include <vector>
#include <string>
Expand Down Expand Up @@ -74,5 +73,3 @@ class CCoreAudioChannelLayout
protected:
AudioChannelLayout* m_pLayout;
};

#endif
4 changes: 0 additions & 4 deletions xbmc/cores/AudioEngine/Sinks/osx/CoreAudioDevice.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#if defined(TARGET_DARWIN_OSX)

#include <list>
#include <string>
#include <vector>
Expand Down Expand Up @@ -93,5 +91,3 @@ class CCoreAudioDevice
void* inClientData);

};

#endif
4 changes: 0 additions & 4 deletions xbmc/cores/AudioEngine/Sinks/osx/CoreAudioHardware.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#if defined(TARGET_DARWIN_OSX)

#include "cores/AudioEngine/Sinks/osx/CoreAudioDevice.h"

// There is only one AudioSystemObject instance system-side.
Expand All @@ -28,5 +26,3 @@ class CCoreAudioHardware
static void GetOutputDeviceName(std::string &name);
static UInt32 GetOutputDevices(CoreAudioDeviceList *pList);
};

#endif
4 changes: 0 additions & 4 deletions xbmc/cores/AudioEngine/Sinks/osx/CoreAudioStream.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#if defined(TARGET_DARWIN_OSX)

#include "threads/Event.h"
#include <CoreAudio/CoreAudio.h>
#include <IOKit/audio/IOAudioTypes.h>
Expand Down Expand Up @@ -56,5 +54,3 @@ class CCoreAudioStream
AudioStreamBasicDescription m_OriginalVirtualFormat;
AudioStreamBasicDescription m_OriginalPhysicalFormat;
};

#endif
2 changes: 0 additions & 2 deletions xbmc/cores/AudioEngine/Sinks/test/TestAESinkDARWINOSX.cpp
Expand Up @@ -8,7 +8,6 @@

#include "gtest/gtest.h"

#if defined(TARGET_DARWIN_OSX)
#include "cores/AudioEngine/Sinks/osx/CoreAudioHardware.h"
#include "cores/AudioEngine/Sinks/osx/CoreAudioHelpers.h"
#include "cores/AudioEngine/Utils/AEUtil.h"
Expand Down Expand Up @@ -382,4 +381,3 @@ TEST(TestAESinkDARWINOSXScoreStream, MatchFloat5_1_96000InAllWithoutPassthroughF
formatIdx = findMatchingFormat(allFormatsWithoutPassthrough, srcFormat);
EXPECT_EQ(formatIdx, (unsigned int)15);
}
#endif //TARGET_DARWIN_OSX
5 changes: 0 additions & 5 deletions xbmc/cores/VideoPlayer/Process/rbpi/ProcessInfoPi.cpp
Expand Up @@ -12,8 +12,6 @@
#include "cores/VideoPlayer/DVDCodecs/Video/MMALFFmpeg.h"

// Override for platform ports
#if defined(TARGET_RASPBERRY_PI)

using namespace MMAL;

CProcessInfo* CProcessInfoPi::Create()
Expand Down Expand Up @@ -44,6 +42,3 @@ bool CProcessInfoPi::AllowDTSHDDecode()
return false;
return true;
}

#endif

2 changes: 2 additions & 0 deletions xbmc/filesystem/ZipManager.cpp
Expand Up @@ -13,7 +13,9 @@

#include "File.h"
#include "URL.h"
#if defined(TARGET_POSIX)
#include "platform/linux/PlatformDefs.h"
#endif
#include "utils/CharsetConverter.h"
#include "utils/EndianSwap.h"
#include "utils/log.h"
Expand Down
3 changes: 0 additions & 3 deletions xbmc/platform/android/filesystem/AndroidAppDirectory.cpp
Expand Up @@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/

#if defined(TARGET_ANDROID)
#include "AndroidAppDirectory.h"
#include "platform/android/activity/XBMCApp.h"
#include "FileItem.h"
Expand Down Expand Up @@ -64,5 +63,3 @@ bool CAndroidAppDirectory::GetDirectory(const CURL& url, CFileItemList &items)
CLog::Log(LOGERROR, "CAndroidAppDirectory::GetDirectory Failed to open %s", url.Get().c_str());
return false;
}

#endif
3 changes: 0 additions & 3 deletions xbmc/platform/android/filesystem/AndroidAppDirectory.h
Expand Up @@ -8,7 +8,6 @@

#pragma once

#if defined(TARGET_ANDROID)
#include "filesystem/IDirectory.h"
#include "FileItem.h"
namespace XFILE
Expand All @@ -26,5 +25,3 @@ class CAndroidAppDirectory :
virtual DIR_CACHE_TYPE GetCacheType(const CURL& url) const override { return DIR_CACHE_NEVER; }
};
}
#endif

4 changes: 0 additions & 4 deletions xbmc/platform/android/filesystem/AndroidAppFile.cpp
Expand Up @@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/

#if defined(TARGET_ANDROID)

#include <jni.h>
#include <sys/stat.h>

Expand Down Expand Up @@ -167,5 +165,3 @@ int CFileAndroidApp::IoControl(EIoControl request, void* param)
return 0;
return 1;
}
#endif

4 changes: 0 additions & 4 deletions xbmc/platform/android/filesystem/AndroidAppFile.h
Expand Up @@ -8,7 +8,6 @@

#pragma once

#if defined(TARGET_ANDROID)
#include "filesystem/IFile.h"
#include "URL.h"
#include "string.h"
Expand Down Expand Up @@ -48,6 +47,3 @@ class CFileAndroidApp : public IFile
int m_iconHeight;
};
}

#endif

4 changes: 0 additions & 4 deletions xbmc/platform/android/powermanagement/AndroidPowerSyscall.cpp
Expand Up @@ -6,8 +6,6 @@
* See LICENSES/README.md for more information.
*/

#if defined (TARGET_ANDROID)

#include "AndroidPowerSyscall.h"
#include "platform/android/activity/XBMCApp.h"

Expand Down Expand Up @@ -36,5 +34,3 @@ bool CAndroidPowerSyscall::PumpPowerEvents(IPowerEventsCallback *callback)
{
return true;
}

#endif
2 changes: 0 additions & 2 deletions xbmc/platform/android/powermanagement/AndroidPowerSyscall.h
Expand Up @@ -8,7 +8,6 @@

#pragma once

#if defined (TARGET_ANDROID)
#include "powermanagement/IPowerSyscall.h"

class CAndroidPowerSyscall : public CPowerSyscallWithoutEvents
Expand All @@ -33,4 +32,3 @@ class CAndroidPowerSyscall : public CPowerSyscallWithoutEvents

virtual bool PumpPowerEvents(IPowerEventsCallback *callback);
};
#endif
2 changes: 0 additions & 2 deletions xbmc/platform/darwin/AutoPool.mm
Expand Up @@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/

#if defined(TARGET_DARWIN)
#if defined(TARGET_DARWIN_IOS)
#import <Foundation/Foundation.h>
#else
Expand Down Expand Up @@ -38,4 +37,3 @@ void Cocoa_Destroy_AutoReleasePool(void* aPool)
NSAutoreleasePool* pool = (NSAutoreleasePool* )aPool;
[pool release];
}
#endif
3 changes: 0 additions & 3 deletions xbmc/platform/darwin/DarwinUtils.mm
Expand Up @@ -13,7 +13,6 @@
#include "utils/URIUtils.h"
#include "CompileInfo.h"

#if defined(TARGET_DARWIN)
#if defined(TARGET_DARWIN_IOS)
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
Expand Down Expand Up @@ -705,5 +704,3 @@ bool CFStringRefToStringWithEncoding(CFStringRef source, std::string &destinatio
#endif
return ret;
}

#endif
3 changes: 0 additions & 3 deletions xbmc/platform/darwin/osx/CocoaInterface.mm
Expand Up @@ -5,7 +5,6 @@
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#if !defined(__arm__) && !defined(__aarch64__)
#import <unistd.h>
#import <sys/mount.h>

Expand Down Expand Up @@ -256,5 +255,3 @@ void Cocoa_ShowMouse()

return NULL;
}

#endif
3 changes: 0 additions & 3 deletions xbmc/platform/darwin/osx/SDLMain.h
Expand Up @@ -7,10 +7,7 @@
* See LICENSES/README.md for more information.
*/

#if !defined(__arm__) && !defined(__aarch64__)

#import <Cocoa/Cocoa.h>

@interface XBMCDelegate : NSObject<NSApplicationDelegate>
@end
#endif
3 changes: 0 additions & 3 deletions xbmc/platform/darwin/osx/SDLMain.mm
Expand Up @@ -7,8 +7,6 @@
* See LICENSES/README.md for more information.
*/

#if !defined(__arm__) && !defined(__aarch64__)

#import "SDL/SDL.h"
#import "SDLMain.h"
#import <sys/param.h> /* for MAXPATHLEN */
Expand Down Expand Up @@ -569,4 +567,3 @@ int main(int argc, char *argv[])

return status;
}
#endif
2 changes: 0 additions & 2 deletions xbmc/platform/darwin/osx/XBMCHelper.cpp
Expand Up @@ -6,7 +6,6 @@
* See LICENSES/README.md for more information.
*/

#if defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__)
#include <fstream>
#include <signal.h>
#include <sstream>
Expand Down Expand Up @@ -515,4 +514,3 @@ static int GetBSDProcessList(kinfo_proc **procList, size_t *procCount)
assert( (err == 0) == (*procList != NULL) );
return err;
}
#endif
5 changes: 0 additions & 5 deletions xbmc/platform/darwin/osx/XBMCHelper.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#if !defined(__arm__) && !defined(__aarch64__)

#include "settings/lib/ISettingCallback.h"

enum AppleRemoteOptions
Expand Down Expand Up @@ -70,6 +68,3 @@ class XBMCHelper : public ISettingCallback

static XBMCHelper* smp_instance;
};

#endif

4 changes: 0 additions & 4 deletions xbmc/platform/linux/ConvUtils.cpp
Expand Up @@ -8,8 +8,6 @@

#include "PlatformDefs.h"

#ifdef TARGET_POSIX

#include <stdio.h>
#include <ctype.h>
#include <errno.h>
Expand All @@ -23,5 +21,3 @@ void SetLastError(DWORD dwErrCode)
{
errno = dwErrCode;
}

#endif
8 changes: 0 additions & 8 deletions xbmc/platform/linux/PlatformDefs.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#ifdef TARGET_POSIX

#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
#endif
Expand Down Expand Up @@ -46,7 +44,6 @@

#include <sys/time.h>
#include <time.h>
#endif

#if defined(__ppc__) || defined(__powerpc__)
#define PIXEL_ASHIFT 0
Expand Down Expand Up @@ -90,8 +87,6 @@
#define PRIdS "zd"
#endif

#ifdef TARGET_POSIX

#define _fdopen fdopen
#define _vsnprintf vsnprintf
#define _stricmp strcasecmp
Expand Down Expand Up @@ -273,6 +268,3 @@ typedef struct _MEMORYSTATUSEX

#define FILE_READ_DATA ( 0x0001 )
#define FILE_WRITE_DATA ( 0x0002 )

#endif

2 changes: 0 additions & 2 deletions xbmc/platform/linux/XFileUtils.cpp
Expand Up @@ -11,7 +11,6 @@
#include "filesystem/SpecialProtocol.h"
#include "utils/StringUtils.h"

#ifdef TARGET_POSIX
#include "XHandle.h"
#include <sys/types.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -171,4 +170,3 @@ int _stat64( const char *path, struct __stat64 *buffer )

return stat64(path, buffer);
}
#endif
5 changes: 0 additions & 5 deletions xbmc/platform/linux/XHandle.h
Expand Up @@ -8,8 +8,6 @@

#pragma once

#ifndef TARGET_WINDOWS

#include <list>
#include <string>
#include <vector>
Expand Down Expand Up @@ -58,6 +56,3 @@ struct CXHandle {
static int m_objectTracker[10];

};

#endif

5 changes: 0 additions & 5 deletions xbmc/platform/linux/XMemUtils.cpp
Expand Up @@ -41,8 +41,6 @@ void _aligned_free(void *p) {
free(pFull);
}

#ifndef TARGET_WINDOWS

#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD)
static FILE* procMeminfoFP = NULL;
#endif
Expand Down Expand Up @@ -176,6 +174,3 @@ void GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
lpBuffer->ullTotalVirtual = (info.totalram * info.mem_unit);
#endif
}

#endif

4 changes: 0 additions & 4 deletions xbmc/platform/linux/XTimeUtils.cpp
Expand Up @@ -31,8 +31,6 @@
*/
#define IsLeapYear(y) ((!(y % 4)) ? (((!(y % 400)) && (y % 100)) ? 1 : 0) : 0)

#ifdef TARGET_POSIX

void WINAPI Sleep(uint32_t dwMilliSeconds)
{
#if _POSIX_PRIORITY_SCHEDULING
Expand Down Expand Up @@ -219,5 +217,3 @@ int TimeTToFileTime(time_t timeT, FILETIME* lpLocalFileTime) {

return 1;
}

#endif

0 comments on commit 4ce4680

Please sign in to comment.