From 4adcaa670c8138a492f865954c295b5fa76d0934 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 16 Nov 2018 15:11:27 +0100 Subject: [PATCH] Use operator ? to simplify condition --- rwengine/src/engine/GameData.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/rwengine/src/engine/GameData.cpp b/rwengine/src/engine/GameData.cpp index cb2c0880..21d4c3aa 100644 --- a/rwengine/src/engine/GameData.cpp +++ b/rwengine/src/engine/GameData.cpp @@ -527,13 +527,8 @@ void GameData::loadIFP(const std::string& name, bool cutsceneAnimation) { if (f.data) { if (LoaderIFP loader{}; loader.loadFromMemory(f.data.get())) { - if (cutsceneAnimation) { - animationsCutscene.insert(loader.animations.begin(), - loader.animations.end()); - } else { - animations.insert(loader.animations.begin(), - loader.animations.end()); - } + auto& dest = cutsceneAnimation ? animationsCutscene : animations; + dest.insert(loader.animations.begin(), loader.animations.end()); } } }