issue #2790: StringUtils::toStringWithFormat —> StringUtils::format.

This commit is contained in:
James Chen 2013-12-12 09:37:56 +08:00
parent 9e637a3a3b
commit 976bef8b68
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ Action::~Action()
std::string Action::description() const
{
return StringUtils::toStringWithFormat("<Action | Tag = %d", _tag);
return StringUtils::format("<Action | Tag = %d", _tag);
}
void Action::startWithTarget(Node *aTarget)

View File

@ -150,7 +150,7 @@ CCBMFontConfiguration::~CCBMFontConfiguration()
std::string CCBMFontConfiguration::description(void) const
{
return StringUtils::toStringWithFormat(
return StringUtils::format(
"<CCBMFontConfiguration = " CC_FORMAT_PRINTF_SIZE_T " | Glphys:%d Kernings:%d | Image = %s>",
(size_t)this,
HASH_COUNT(_fontDefDictionary),

View File

@ -187,7 +187,7 @@ const std::string& LabelTTF::getString() const
std::string LabelTTF::description() const
{
return StringUtils::toStringWithFormat("<LabelTTF | FontName = %s, FontSize = %.1f>", _fontName.c_str(), _fontSize);
return StringUtils::format("<LabelTTF | FontName = %s, FontSize = %.1f>", _fontName.c_str(), _fontSize);
}
TextHAlignment LabelTTF::getHorizontalAlignment() const

View File

@ -216,7 +216,7 @@ public:
return ss.str();
}
static std::string toStringWithFormat(const char* format, ...) CC_FORMAT_PRINTF(1, 2)
static std::string format(const char* format, ...) CC_FORMAT_PRINTF(1, 2)
{
#define CC_MAX_STRING_LENGTH (1024*100)