diff --git a/dependencies.json b/dependencies.json index 5d08343..229e3c5 100644 --- a/dependencies.json +++ b/dependencies.json @@ -13,5 +13,6 @@ "SDL": { "min": [3,0,0] }, - "stb": {} + "stb": {}, + "yaml-cpp": {} } diff --git a/private/raid/config.cpp b/private/raid/config.cpp index eae51c9..1060756 100644 --- a/private/raid/config.cpp +++ b/private/raid/config.cpp @@ -137,9 +137,11 @@ void ConfigArray::setAt(std::size_t idx, ConfigValue value) mValues[idx] = std::move(value); } -void ConfigArray::removeAt(std::size_t idx) +void ConfigArray::removeAt(std::size_t idx, std::size_t count) { - mValues.erase(mValues.begin() + static_cast(idx)); + auto itStart = mValues.begin() + static_cast(idx); + auto itEnd = itStart + static_cast(count); + mValues.erase(itStart, itEnd); } diff --git a/public/raid/config.hpp b/public/raid/config.hpp index f896971..83937b5 100644 --- a/public/raid/config.hpp +++ b/public/raid/config.hpp @@ -46,7 +46,7 @@ public: void append(ConfigValue value); void setAt(std::size_t idx, ConfigValue value); - void removeAt(std::size_t idx); + void removeAt(std::size_t idx, std::size_t count = 1); [[nodiscard]] bool isEmpty() const noexcept { return mValues.empty(); }