mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-11 00:48:08 +00:00
the tutorial does not crash
This commit is contained in:
parent
faa4a989ce
commit
1712cd4f47
|
|
@ -194,8 +194,11 @@ public:
|
|||
|
||||
ListTag<Tag> *getList(const wchar_t * name)
|
||||
{
|
||||
if (tags.find(name) == tags.end()) return new ListTag<Tag>(name);
|
||||
return (ListTag<Tag> *) tags[name];
|
||||
// 4jcraft changed this function to not do a c style cast
|
||||
// of a templated class
|
||||
auto it = tags.find(name);
|
||||
if(it == tags.end()) return new ListTag<Tag>(name);
|
||||
return dynamic_cast<ListTag<Tag>*>(it->second);
|
||||
}
|
||||
|
||||
bool getBoolean(const wchar_t *string)
|
||||
|
|
|
|||
Loading…
Reference in a new issue