Skip to content

Commit

Permalink
darwin, fixed, compiler warning. DarwinUtils.h is C linkage so you sh…
Browse files Browse the repository at this point in the history
…ould not be using C++ objects as return or params
  • Loading branch information
davilla committed Oct 27, 2013
1 parent 07b6910 commit 154733c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion xbmc/osx/DarwinUtils.h
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions xbmc/osx/DarwinUtils.mm
Expand Up @@ -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)
Expand All @@ -294,7 +294,7 @@ int GetDarwinExecutablePath(char* path, uint32_t *pathsize)
rootFolder = "Library/Preferences";
}
}
return rootFolder;
return rootFolder.c_str();
}

bool DarwinIsIosSandboxed(void)
Expand Down
2 changes: 1 addition & 1 deletion xbmc/settings/AdvancedSettings.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 154733c

Please sign in to comment.