From 36cd5caf956c087995a62983ad09c15250f29475 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 15 Oct 2010 12:19:13 +0000 Subject: COMMON: Add XMLParser::parseIntegerKey variant accepting a Common::String Almost all places where we used XMLParser::parseIntegerKey were using it like this: XMLParser::parseIntegerKey(str.c_str(), ...) Since this makes the code harder to read, I overloaded the method to also accept Commmon::String directly. Also removed all .c_str() invocations where necessary. svn-id: r53479 --- engines/sword25/gfx/animationresource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sword25/gfx/animationresource.cpp') diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp index 96a93f1890..6609725c1b 100644 --- a/engines/sword25/gfx/animationresource.cpp +++ b/engines/sword25/gfx/animationresource.cpp @@ -116,7 +116,7 @@ bool AnimationResource::parseBooleanKey(Common::String s, bool &result) { } bool AnimationResource::parserCallback_animation(ParserNode *node) { - if (!parseIntegerKey(node->values["fps"].c_str(), 1, &_FPS) || (_FPS < MIN_FPS) || (_FPS > MAX_FPS)) { + if (!parseIntegerKey(node->values["fps"], 1, &_FPS) || (_FPS < MIN_FPS) || (_FPS > MAX_FPS)) { return parserError("Illegal or missing fps attribute in tag in \"%s\". Assuming default (\"%d\").", getFileName().c_str(), DEFAULT_FPS); } -- cgit v1.2.3