Codechange: use std::string for text file name resolution

This commit is contained in:
Rubidium
2023-05-05 00:04:52 +02:00
committed by rubidium42
parent 0b72297d57
commit 877349c13d
15 changed files with 56 additions and 58 deletions

View File

@@ -14,8 +14,9 @@
#include "strings_func.h"
#include "textfile_type.h"
#include "window_gui.h"
#include <optional>
const char *GetTextfile(TextfileType type, Subdirectory dir, const char *filename);
std::optional<std::string> GetTextfile(TextfileType type, Subdirectory dir, const std::string &filename);
/** Window for displaying a textfile */
struct TextfileWindow : public Window, MissingGlyphSearcher {
@@ -51,7 +52,7 @@ struct TextfileWindow : public Window, MissingGlyphSearcher {
bool Monospace() override;
void SetFontNames(FontCacheSettings *settings, const char *font_name, const void *os_data) override;
virtual void LoadTextfile(const char *textfile, Subdirectory dir);
virtual void LoadTextfile(const std::string &textfile, Subdirectory dir);
private:
uint ReflowContent();