diff options
author | rubidium <rubidium@openttd.org> | 2008-04-17 11:47:22 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-17 11:47:22 +0000 |
commit | 00f0bf98ee3612899bcd6e71c34694cc8f69838c (patch) | |
tree | 5acb4a3c8eefc56274a8869d71f45aa60fe942f5 /src/newgrf_string_type.h | |
parent | 5796fb3b349d6f8f311d79b397faa0caf1865f98 (diff) | |
download | openttd-00f0bf98ee3612899bcd6e71c34694cc8f69838c.tar.xz |
(svn r12751) -Codechange: do what has been done in r11862 in a different way so it uses less memory.
Diffstat (limited to 'src/newgrf_string_type.h')
-rw-r--r-- | src/newgrf_string_type.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/newgrf_string_type.h b/src/newgrf_string_type.h deleted file mode 100644 index 4a0bdd790..000000000 --- a/src/newgrf_string_type.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $Id$ */ - -/** @file newgrf_string_type.h */ - -#ifndef NEWGRF_STRING_TYPE_H -#define NEWGRF_STRING_TYPE_H - -#include "strings_type.h" - -/** - * A string with the required information to perform a GRF string remapping. - */ -struct GRFMappedStringID -{ -private: - /** The GRF ID associated to the to-be-remapped string */ - uint32 grfid; - /** The string; when grfid != 0 it should be remapped */ - StringID string; - -public: - /** - * Create the struct. - * @param str the string to store (or remap) - * @param grf_id the GRF to remap it with - */ - GRFMappedStringID(StringID str, uint32 grf_id) : grfid(grf_id), string(str) {} - - /** - * An empty string. - */ - GRFMappedStringID() {} - - /** Cast operator, returns the string */ - inline operator StringID() const - { - return string; - } - - /** Assigns the string and resets the GRF ID. */ - GRFMappedStringID& operator = (StringID str) - { - string = str; - grfid = 0; - return *this; - } - - /** - * Map the string. - */ - void MapString(); -}; - -#endif /* NEWGRF_STRING_TYPE_H */ |