Fix type issues with string parameter structs

pull/603/merge
Jonathan G Rennison 7 months ago
parent fe57f3a089
commit 48e700bc32

@ -10,11 +10,12 @@
#ifndef ERROR_H
#define ERROR_H
#include <list>
#include "strings_type.h"
#include "company_type.h"
#include "core/geometry_type.hpp"
#include "guitimer_func.h"
#include <list>
#include <vector>
struct GRFFile;

@ -54,7 +54,7 @@ bool UsingNewGRFTextStack();
struct TextRefStack *CreateTextRefStackBackup();
void RestoreTextRefStackBackup(struct TextRefStack *backup);
struct StringParameters;
class StringParameters;
uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const char **str, StringParameters &parameters, bool modify_parameters);
/** Mapping of language data between a NewGRF and OpenTTD. */

@ -14,6 +14,7 @@
#include "date_type.h"
#include "strings_type.h"
#include "sound_type.h"
#include <vector>
/**
* Type of news.

@ -19,6 +19,7 @@
#include "vehicle_type.h"
#include <array>
#include <optional>
#include <vector>
extern ArrayStringParameters<20> _global_string_params;

@ -197,20 +197,6 @@ public:
}
};
/**
* Extension of StringParameters with its own statically allocated buffer for
* the parameters.
*/
class AllocatedStringParameters : public StringParameters {
std::vector<StringParameter> params; ///< The actual parameters
public:
AllocatedStringParameters(size_t parameters = 0) : params(parameters)
{
this->parameters = span(params.data(), params.size());
}
};
/**
* Extension of StringParameters with its own statically sized buffer for
* the parameters.

Loading…
Cancel
Save