diff options
author | rubidium <rubidium@openttd.org> | 2014-04-25 15:40:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-25 15:40:32 +0000 |
commit | 9ed12b0f07edb342aaff21c130d325fd158a9d5b (patch) | |
tree | f42aa775396b4ebda4d119f76e80a77c180936c7 /src/script/api/script_event_types.hpp | |
parent | 4227f495c51ea909707505ec2ef1c730a382965d (diff) | |
download | openttd-9ed12b0f07edb342aaff21c130d325fd158a9d5b.tar.xz |
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
Diffstat (limited to 'src/script/api/script_event_types.hpp')
-rw-r--r-- | src/script/api/script_event_types.hpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/script/api/script_event_types.hpp b/src/script/api/script_event_types.hpp index 62834113d..943016897 100644 --- a/src/script/api/script_event_types.hpp +++ b/src/script/api/script_event_types.hpp @@ -839,15 +839,8 @@ public: /** * @param json The JSON string which got sent. */ - ScriptEventAdminPort(const char *json) : - ScriptEvent(ET_ADMIN_PORT), - json(strdup(json)) - {} - - ~ScriptEventAdminPort() - { - free(this->json); - } + ScriptEventAdminPort(const char *json); + ~ScriptEventAdminPort(); /** * Convert an ScriptEvent to the real instance. |