From 8a110ead347f60ff8751691ce8a327b646e57361 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 20 Jun 2020 19:27:32 -0700 Subject: [PATCH] De-duplicate 'ed.ListOfMetaData[game.playcustomlevel]' Whoa, that's a long identifier! Better to replace it with something short, like 'meta', to save on typing and improve readability. --- desktop_version/src/Render.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index 2065b080..8d79211b 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -1961,12 +1961,14 @@ void maprender() } #if !defined(NO_CUSTOM_LEVELS) else if(map.custommode){ - graphics.bigprint( -1, FLIP(45), ed.ListOfMetaData[game.playcustomlevel].title, 196, 196, 255 - help.glow, true); - graphics.Print( -1, FLIP(70), "by " + ed.ListOfMetaData[game.playcustomlevel].creator, 196, 196, 255 - help.glow, true); - graphics.Print( -1, FLIP(80), ed.ListOfMetaData[game.playcustomlevel].website, 196, 196, 255 - help.glow, true); - graphics.Print( -1, FLIP(100), ed.ListOfMetaData[game.playcustomlevel].Desc1, 196, 196, 255 - help.glow, true); - graphics.Print( -1, FLIP(110), ed.ListOfMetaData[game.playcustomlevel].Desc2, 196, 196, 255 - help.glow, true); - graphics.Print( -1, FLIP(120), ed.ListOfMetaData[game.playcustomlevel].Desc3, 196, 196, 255 - help.glow, true); + LevelMetaData& meta = ed.ListOfMetaData[game.playcustomlevel]; + + graphics.bigprint( -1, FLIP(45), meta.title, 196, 196, 255 - help.glow, true); + graphics.Print( -1, FLIP(70), "by " + meta.creator, 196, 196, 255 - help.glow, true); + graphics.Print( -1, FLIP(80), meta.website, 196, 196, 255 - help.glow, true); + graphics.Print( -1, FLIP(100), meta.Desc1, 196, 196, 255 - help.glow, true); + graphics.Print( -1, FLIP(110), meta.Desc2, 196, 196, 255 - help.glow, true); + graphics.Print( -1, FLIP(120), meta.Desc3, 196, 196, 255 - help.glow, true); if(ed.numcrewmates()-game.crewmates()==1){ graphics.Print(1,FLIP(165), help.number(ed.numcrewmates()-game.crewmates())+ " crewmate remains", 196, 196, 255 - help.glow, true);