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.octo.it/?a=commitdiff_plain;h=9ff3b19384bcecfeefe53b6ceabb0951b085ce80;p=supertux.git 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 --- 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);