Skip to content

Commit

Permalink
[stdstring] get rid of CStdString in osx/
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff authored and Montellese committed Jan 7, 2015
1 parent ddfcf24 commit c87eada
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion xbmc/main/osx/SDLMain.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//hack around problem with xbmc's typedef int BOOL
// and obj-c's typedef unsigned char BOOL
#define BOOL XBMC_BOOL
#import "utils/StdString.h"
#import "PlatformDefs.h"
#import "ApplicationMessenger.h"
#import "storage/osx/DarwinStorageProvider.h"
Expand Down
3 changes: 1 addition & 2 deletions xbmc/osx/CocoaInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#define _OSX_INTERFACE_H_

#include <string>
#include "utils/StdString.h"
#include "AutoPool.h"

#ifdef __cplusplus
Expand All @@ -47,7 +46,7 @@ extern "C"
// Devices
//
char* Cocoa_MountPoint2DeviceName(char *path);
bool Cocoa_GetVolumeNameFromMountPoint(const char *mountPoint, CStdString &volumeName);
bool Cocoa_GetVolumeNameFromMountPoint(const std::string &mountPoint, std::string &volumeName);

// Mouse.
//
Expand Down
4 changes: 2 additions & 2 deletions xbmc/osx/CocoaInterface.mm
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ void Cocoa_DoAppleScriptFile(const char* filePath)
return path;
}

bool Cocoa_GetVolumeNameFromMountPoint(const char *mountPoint, CStdString &volumeName)
bool Cocoa_GetVolumeNameFromMountPoint(const std::string &mountPoint, std::string &volumeName)
{
CCocoaAutoPool pool;
unsigned i, count = 0;
struct statfs *buf = NULL;
CStdString mountpoint, devicepath;
std::string mountpoint, devicepath;

count = getmntinfo(&buf, 0);
for (i=0; i<count; i++)
Expand Down
6 changes: 3 additions & 3 deletions xbmc/osx/IOSExternalTouchController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ - (id)init
[descriptionLabel setLineBreakMode:UILineBreakModeTailTruncation];

[descriptionLabel setNumberOfLines:5];
CStdString descText = g_localizeStrings.Get(34404) + "\n";
std::string descText = g_localizeStrings.Get(34404) + "\n";
descText += g_localizeStrings.Get(34405) + "\n";
descText += g_localizeStrings.Get(34406) + "\n";
descText += g_localizeStrings.Get(34407) + "\n";
descText += g_localizeStrings.Get(34408) + "\n";

NSString *stringFromUTFString = [[NSString alloc] initWithUTF8String:descText];
NSString *stringFromUTFString = [[NSString alloc] initWithUTF8String:descText.c_str()];

[descriptionLabel setText:stringFromUTFString];
[stringFromUTFString release];
Expand All @@ -93,7 +93,7 @@ - (id)init
[descriptionLabel release];

//load the splash image
CStdString strUserSplash = CSpecialProtocol::TranslatePath("special://xbmc/media/Splash.png");
std::string strUserSplash = CSpecialProtocol::TranslatePath("special://xbmc/media/Splash.png");
xbmcLogo = [UIImage imageWithContentsOfFile:[NSString stringWithUTF8String:strUserSplash.c_str()]];

//make a view with the image
Expand Down
2 changes: 1 addition & 1 deletion xbmc/osx/XBMCHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ XBMCHelper::XBMCHelper()
, m_errorStarting(false)
{
// Compute the KODI_HOME path.
CStdString homePath;
std::string homePath;
CUtil::GetHomePath(homePath);
m_homepath = homePath;

Expand Down
4 changes: 2 additions & 2 deletions xbmc/osx/ios/XBMCController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ void AnnounceBridge(ANNOUNCEMENT::AnnouncementFlag flag, const char *sender, con
if (!thumb.empty())
{
bool needsRecaching;
CStdString cachedThumb(CTextureCache::Get().CheckCachedImage(thumb, false, needsRecaching));
std::string cachedThumb(CTextureCache::Get().CheckCachedImage(thumb, false, needsRecaching));
LOG("thumb: %s, %s", thumb.c_str(), cachedThumb.c_str());
if (!cachedThumb.empty())
{
CStdString thumbRealPath = CSpecialProtocol::TranslatePath(cachedThumb);
std::string thumbRealPath = CSpecialProtocol::TranslatePath(cachedThumb);
[item setValue:[NSString stringWithUTF8String:thumbRealPath.c_str()] forKey:@"thumb"];
}
}
Expand Down

0 comments on commit c87eada

Please sign in to comment.