From: Mathnerd314 Date: Sun, 6 Dec 2009 04:29:17 +0000 (+0000) Subject: Use data instead of throwaway_data for slope and short-circuit || instead of if(... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d616e87f392a0669b4b6e450352219cecc8964f6;p=supertux.git Use data instead of throwaway_data for slope and short-circuit || instead of if(!) in TileSetParser SVN-Revision: 6179 --- 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);