From 9ff3b19384bcecfeefe53b6ceabb0951b085ce80 Mon Sep 17 00:00:00 2001 From: mathnerd314 Date: Sun, 6 Dec 2009 04:29:17 +0000 Subject: [PATCH] Use data instead of throwaway_data for slope and short-circuit || instead of if(!) in TileSetParser git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6179 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/supertux/tile_set_parser.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/supertux/tile_set_parser.cpp b/src/supertux/tile_set_parser.cpp index 2ed1264d1..255b27abe 100644 --- a/src/supertux/tile_set_parser.cpp +++ b/src/supertux/tile_set_parser.cpp @@ -120,8 +120,7 @@ TileSetParser::parse_tile(const Reader& reader) reader.get("data", data); reader.get("anim-fps", anim_fps); - uint32_t throwaway_data; - if(reader.get("slope-type", throwaway_data)) + if(reader.get("slope-type", data)) { attributes |= Tile::SOLID | Tile::SLOPE; } @@ -226,10 +225,7 @@ TileSetParser::parse_tiles(const Reader& reader) bool has_attributes = reader.get("attributes", attributes); bool has_datas = reader.get("datas", datas); - if (!reader.get("image", images)) - { - reader.get("images", images); - } + reader.get("image", images) || reader.get("images", images); reader.get("width", width); reader.get("height", height); -- 2.11.0