explicitly name the sprite that couldn't be changed

This commit is contained in:
Konstantin Käfer
2015-07-06 11:16:59 +02:00
parent 62ac43a85b
commit 746e4d20ee
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ void SpriteStore::_setSprite(const std::string& name,
auto it = sprites.find(name);
if (it != sprites.end() &&
(it->second->width != sprite->width || it->second->height != sprite->height)) {
Log::Warning(Event::Sprite, "Can't change sprite dimensions");
Log::Warning(Event::Sprite, "Can't change sprite dimensions for '%s'", name.c_str());
return;
}

View File

@@ -100,7 +100,7 @@ TEST(Annotations, SpriteStoreReplaceWithDifferentDimensions) {
EventSeverity::Warning,
Event::Sprite,
int64_t(-1),
"Can't change sprite dimensions",
"Can't change sprite dimensions for 'sprite'",
}));
EXPECT_EQ(sprite1, store.getSprite("sprite"));