Fix type issues with string parameter structs

This commit is contained in:
Jonathan G Rennison 2023-11-09 15:49:54 +00:00
parent fe57f3a089
commit 48e700bc32
5 changed files with 5 additions and 16 deletions

View File

@ -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;

View File

@ -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. */

View File

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

View File

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

View File

@ -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.