Merge branch 'master' into jgrpp
# Conflicts: # src/cargotype.h # src/core/CMakeLists.txt # src/core/span_type.hpp # src/fileio.cpp # src/fios.cpp # src/misc/endian_buffer.hpp # src/misc_gui.cpp # src/saveload/saveload.h # src/saveload/vehicle_sl.cpp # src/screenshot.cpp # src/settings.cpp # src/settings_internal.h # src/stdafx.h # src/string_func.h # src/strings.cpp # src/strings_func.h # src/strings_internal.h
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#define STRINGS_INTERNAL_H
|
||||
|
||||
#include "string_func.h"
|
||||
#include "core/span_type.hpp"
|
||||
#include "core/strong_typedef_type.hpp"
|
||||
|
||||
#include <array>
|
||||
@@ -27,12 +26,12 @@ struct StringParameter {
|
||||
class StringParameters {
|
||||
protected:
|
||||
StringParameters *parent = nullptr; ///< If not nullptr, this instance references data from this parent instance.
|
||||
span<StringParameter> parameters = {}; ///< Array with the actual parameters.
|
||||
std::span<StringParameter> parameters = {}; ///< Array with the actual parameters.
|
||||
|
||||
size_t offset = 0; ///< Current offset in the parameters span.
|
||||
char32_t next_type = 0; ///< The type of the next data that is retrieved.
|
||||
|
||||
StringParameters(span<StringParameter> parameters = {}) :
|
||||
StringParameters(std::span<StringParameter> parameters = {}) :
|
||||
parameters(parameters)
|
||||
{}
|
||||
|
||||
@@ -211,7 +210,7 @@ class ArrayStringParameters : public StringParameters {
|
||||
public:
|
||||
ArrayStringParameters()
|
||||
{
|
||||
this->parameters = span(params.data(), params.size());
|
||||
this->parameters = std::span(params.data(), params.size());
|
||||
}
|
||||
|
||||
ArrayStringParameters(ArrayStringParameters&& other) noexcept
|
||||
@@ -224,7 +223,7 @@ public:
|
||||
this->offset = other.offset;
|
||||
this->next_type = other.next_type;
|
||||
this->params = std::move(other.params);
|
||||
this->parameters = span(params.data(), params.size());
|
||||
this->parameters = std::span(params.data(), params.size());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user