Remove needless call to String(), there's an operator for that.
The operator const char*() automatically converts to the needed type so the explicit BString::String() call isn't needed here. Thanks to Clemens for pointing that out.
This commit is contained in:
@@ -99,7 +99,7 @@ Utility::Save(BBitmap** screenshot, const char* fileName, uint32 imageType)
|
|||||||
fileNameString.SetTo(homePath.Path());
|
fileNameString.SetTo(homePath.Path());
|
||||||
fileNameString << "/" << B_TRANSLATE_NOCOLLECT(sDefaultFileNameBase)
|
fileNameString << "/" << B_TRANSLATE_NOCOLLECT(sDefaultFileNameBase)
|
||||||
<< index++ << extension;
|
<< index++ << extension;
|
||||||
entry.SetTo(fileNameString.String());
|
entry.SetTo(fileNameString);
|
||||||
} while (entry.Exists());
|
} while (entry.Exists());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ Utility::Save(BBitmap** screenshot, const char* fileName, uint32 imageType)
|
|||||||
if (nodeInfo.InitCheck() != B_OK)
|
if (nodeInfo.InitCheck() != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
nodeInfo.SetType(_GetMimeString(imageType).String());
|
nodeInfo.SetType(_GetMimeString(imageType));
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -190,7 +190,7 @@ Utility::MakeScreenshot(bool includeMouse, bool activeWindow,
|
|||||||
BString
|
BString
|
||||||
Utility::GetFileNameExtension(uint32 imageType) const
|
Utility::GetFileNameExtension(uint32 imageType) const
|
||||||
{
|
{
|
||||||
BMimeType mimeType(_GetMimeString(imageType).String());
|
BMimeType mimeType(_GetMimeString(imageType));
|
||||||
BString extension("");
|
BString extension("");
|
||||||
|
|
||||||
BMessage message;
|
BMessage message;
|
||||||
|
|||||||
Reference in New Issue
Block a user