diff --git a/src/strings_internal.h b/src/strings_internal.h index a5a0609663..38f4cad5f0 100644 --- a/src/strings_internal.h +++ b/src/strings_internal.h @@ -80,16 +80,28 @@ public: * will be read. * @return The next parameter's value. */ - template - T GetNextParameter() + uint64_t GetNextParameter() { struct visitor { uint64_t operator()(const uint64_t &arg) { return arg; } uint64_t operator()(const std::string &) { throw std::out_of_range("Attempt to read string parameter as integer"); } }; - const auto ¶m = GetNextParameterReference(); - return static_cast(std::visit(visitor{}, param.data)); + const auto ¶m = this->GetNextParameterReference(); + return std::visit(visitor{}, param.data); + } + + /** + * Get the next parameter from our parameters. + * This updates the offset, so the next time this is called the next parameter + * will be read. + * @tparam T The return type of the parameter. + * @return The next parameter's value. + */ + template + T GetNextParameter() + { + return static_cast(this->GetNextParameter()); } /**