ugly ugly c++

This commit is contained in:
darkrose 2017-05-08 17:04:46 +10:00
parent ff6ab1c1de
commit 9d65ff9782
2 changed files with 5 additions and 5 deletions

View File

@ -183,7 +183,7 @@ void FlagNodeMetadata::serializeBody(std::ostream &os)
std::wstring FlagNodeMetadata::infoText()
{
wchar_t buff[256];
swprintf(buff, 256, wgettext("%s's Home Flag"), narrow_to_wide(m_owner.c_str()));
swprintf(buff, 256, wgettext("%s's Home Flag"), narrow_to_wide(m_owner).c_str());
return buff;
}
@ -555,7 +555,7 @@ void LockingChestNodeMetadata::serializeBody(std::ostream &os)
std::wstring LockingChestNodeMetadata::infoText()
{
wchar_t buff[256];
swprintf(buff, 256, wgettext("Locking Chest owned by '%s'"), narrow_to_wide(m_owner.c_str()));
swprintf(buff, 256, wgettext("Locking Chest owned by '%s'"), narrow_to_wide(m_owner).c_str());
return buff;
}
bool LockingChestNodeMetadata::nodeRemovalDisabled()
@ -629,7 +629,7 @@ void SafeNodeMetadata::serializeBody(std::ostream &os)
std::wstring SafeNodeMetadata::infoText()
{
wchar_t buff[256];
swprintf(buff, 256, wgettext("Safe owned by '%s'"), narrow_to_wide(m_owner.c_str()));
swprintf(buff, 256, wgettext("Safe owned by '%s'"), narrow_to_wide(m_owner).c_str());
return buff;
}
bool SafeNodeMetadata::nodeRemovalDisabled()
@ -851,7 +851,7 @@ void BorderStoneNodeMetadata::serializeBody(std::ostream &os)
std::wstring BorderStoneNodeMetadata::infoText()
{
wchar_t buff[256];
swprintf(buff, 256, wgettext("Border Stone owned by '%s'"), narrow_to_wide(m_text.c_str()));
swprintf(buff, 256, wgettext("Border Stone owned by '%s'"), narrow_to_wide(m_text).c_str());
return buff;
}

View File

@ -1168,7 +1168,7 @@ void the_game(
device->getTimer()->getRealTime());
if (driver->writeImageToFile(image, io::path(filename))) {
wchar_t buff[512];
swprintf(buff, 512, wgettext("Saved screenshot to '%s'"), narrow_to_wide(filename));
swprintf(buff, 512, wgettext("Saved screenshot to '%s'"), narrow_to_wide(filename).c_str());
infostream << "Saved screenshot to '" << filename << "'" << std::endl;
statustext = (wchar_t *)buff;
statustext_time = 0;