From 883129f379312ef06934cbb2c91fca8f223fd22c Mon Sep 17 00:00:00 2001 From: Florian Rival Date: Wed, 4 Jan 2017 23:56:10 +0100 Subject: [PATCH] Refactor arguments code generation using GenerateArgumentsList (#335) --- .../CodeGeneration/EventsCodeGenerator.cpp | 62 ++++++------------- .../CodeGeneration/EventsCodeGenerator.h | 7 +++ .../CodeGeneration/EventsCodeGenerator.cpp | 36 ++--------- .../CodeGeneration/EventsCodeGenerator.cpp | 45 ++------------ 4 files changed, 34 insertions(+), 116 deletions(-) diff --git a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp index 9b8c032a611d..18a202ae81dc 100644 --- a/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp +++ b/Core/GDCore/Events/CodeGeneration/EventsCodeGenerator.cpp @@ -854,14 +854,7 @@ gd::String EventsCodeGenerator::GenerateFreeCondition(const std::vector } else { - gd::String argumentsStr; - for (std::size_t i = 0;i & arguments, size_t startFrom) +{ + gd::String argumentsStr; + for (std::size_t i = startFrom;i & arguments, size_t startFrom = 0); + gd::Project & project; ///< The project being used. const gd::Layout & scene; ///< The scene being generated. const gd::Platform & platform; ///< The platform being used. diff --git a/GDCpp/GDCpp/Events/CodeGeneration/EventsCodeGenerator.cpp b/GDCpp/GDCpp/Events/CodeGeneration/EventsCodeGenerator.cpp index 3a5851103372..37125799e988 100644 --- a/GDCpp/GDCpp/Events/CodeGeneration/EventsCodeGenerator.cpp +++ b/GDCpp/GDCpp/Events/CodeGeneration/EventsCodeGenerator.cpp @@ -115,14 +115,7 @@ gd::String EventsCodeGenerator::GenerateObjectCondition(const gd::String & objec } else { - gd::String argumentsStr; - for (std::size_t i = 1;i