diff options
author | Rechi <Rechi@users.noreply.github.com> | 2017-12-23 10:00:00 +0100 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2017-12-23 10:00:00 +0100 |
commit | ccf5f5bb2d0ad4da97c013b926d421d5f091e84e (patch) | |
tree | ef110ee79b15d37c1864dbb419412fe2b0724fb9 | |
parent | f55053830f09a631c86fb0251deac5bdc6f04805 (diff) |
[cleanup][TexturePacker] remove PlatformDefs include
- remove unused function definitions
- use char directly instead of a typedefs to char
5 files changed, 7 insertions, 38 deletions
diff --git a/tools/depends/native/TexturePacker/CMakeLists.txt b/tools/depends/native/TexturePacker/CMakeLists.txt index 102dd7a14c..68200a5cff 100644 --- a/tools/depends/native/TexturePacker/CMakeLists.txt +++ b/tools/depends/native/TexturePacker/CMakeLists.txt @@ -43,8 +43,6 @@ target_include_directories(TexturePacker ${JPEG_INCLUDE_DIR} ${GIF_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/xbmc - ${CMAKE_SOURCE_DIR}/xbmc/${PLATFORM_DIR} - ${CMAKE_SOURCE_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/decoder) target_link_libraries(TexturePacker diff --git a/tools/depends/native/TexturePacker/src/Makefile.am b/tools/depends/native/TexturePacker/src/Makefile.am index b6d6a67bb3..d6b676f9f2 100644 --- a/tools/depends/native/TexturePacker/src/Makefile.am +++ b/tools/depends/native/TexturePacker/src/Makefile.am @@ -7,10 +7,8 @@ AM_CXXFLAGS = $(AM_CFLAGS) -std=c++0x AM_CPPFLAGS = \ -I. \ -I./decoder \ - -I@KODI_SRC_DIR@/lib \ -I@KODI_SRC_DIR@/xbmc \ -I@KODI_SRC_DIR@/xbmc/guilib \ - -I@KODI_SRC_DIR@/xbmc/platform/linux \ @CPPFLAGS@ AM_LDFLAGS = @LIBS@ @STATIC_FLAG@ diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp index 045c5ce38d..578ef12f25 100644 --- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp +++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp @@ -20,12 +20,12 @@ #ifdef TARGET_WINDOWS #include <sys/types.h> -#include <sys/stat.h> #define __STDC_FORMAT_MACROS #include <cinttypes> #define platform_stricmp _stricmp #else -#define platform_stricmp stricmp +#include <inttypes.h> +#define platform_stricmp strcasecmp #endif #include <cerrno> #include <dirent.h> @@ -45,6 +45,7 @@ #endif #include <lzo/lzo1x.h> +#include <sys/stat.h> using namespace std; diff --git a/tools/depends/native/TexturePacker/src/cmdlineargs.h b/tools/depends/native/TexturePacker/src/cmdlineargs.h index 740c9038a2..4a050b36e9 100644 --- a/tools/depends/native/TexturePacker/src/cmdlineargs.h +++ b/tools/depends/native/TexturePacker/src/cmdlineargs.h @@ -22,9 +22,7 @@ */ #ifdef TARGET_POSIX -#include "PlatformDefs.h" -#include "xwinapi.h" -typedef LPSTR PSZ; +char* GetCommandLine(); #define _snprintf snprintf #else #include <windows.h> @@ -39,7 +37,7 @@ public: { // Save local copy of the command line string, because // ParseCmdLine() modifies this string while parsing it. - PSZ cmdline = GetCommandLine(); + char* cmdline = GetCommandLine(); m_cmdline = new char [strlen (cmdline) + 1]; if (m_cmdline) { @@ -87,7 +85,7 @@ public: } private: - PSZ m_cmdline; // the command line string + char* m_cmdline; // the command line string //////////////////////////////////////////////////////////////////////////////// // Parse m_cmdline into individual tokens, which are delimited by spaces. If a @@ -103,7 +101,7 @@ private: QUOTE = '\"' }; bool bInQuotes = false; - PSZ pargs = m_cmdline; + char* pargs = m_cmdline; while (*pargs) { diff --git a/tools/depends/native/TexturePacker/src/xwinapi.h b/tools/depends/native/TexturePacker/src/xwinapi.h deleted file mode 100644 index ad08227fe4..0000000000 --- a/tools/depends/native/TexturePacker/src/xwinapi.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ -#include "PlatformDefs.h" - -LPTSTR GetCommandLine(); -DWORD GetCurrentDirectory(DWORD nBufferLength, LPTSTR lpBuffer); -int SetCurrentDirectory(LPCTSTR lpPathName); -DWORD GetLastError(); |