Permalink
Browse files

darwin, fixed, compiler warning. DarwinUtils.h is C linkage so you sh…

…ould not be using C++ objects as return or params
  • Loading branch information...
1 parent 07b6910 commit 154733c92fe730be15e3917af2ada47f6f046c5d @davilla davilla committed Oct 27, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 xbmc/osx/DarwinUtils.h
  2. +2 −2 xbmc/osx/DarwinUtils.mm
  3. +1 −1 xbmc/settings/AdvancedSettings.cpp
View
@@ -38,7 +38,7 @@ extern "C"
float GetIOSVersion(void);
int GetDarwinFrameworkPath(bool forPython, char* path, uint32_t *pathsize);
int GetDarwinExecutablePath(char* path, uint32_t *pathsize);
- const std::string& DarwinGetXbmcRootFolder(void);
+ const char *DarwinGetXbmcRootFolder(void);
bool DarwinIsIosSandboxed(void);
bool DarwinHasVideoToolboxDecoder(void);
int DarwinBatteryLevel(void);
View
@@ -277,7 +277,7 @@ int GetDarwinExecutablePath(char* path, uint32_t *pathsize)
return 0;
}
-const std::string& DarwinGetXbmcRootFolder(void)
+const char* DarwinGetXbmcRootFolder(void)
{
static std::string rootFolder = "";
if ( rootFolder.length() == 0)
@@ -294,7 +294,7 @@ int GetDarwinExecutablePath(char* path, uint32_t *pathsize)
rootFolder = "Library/Preferences";
}
}
- return rootFolder;
+ return rootFolder.c_str();
}
bool DarwinIsIosSandboxed(void)
@@ -420,7 +420,7 @@ void CAdvancedSettings::Initialize()
#if defined(TARGET_DARWIN_OSX)
logDir += "/Library/Logs/";
#else // ios/atv2
- logDir += "/" + DarwinGetXbmcRootFolder() + "/";
+ logDir += "/" + CStdString(DarwinGetXbmcRootFolder()) + "/";
#endif
m_logFolder = logDir;
#else

0 comments on commit 154733c

Please sign in to comment.