From f0990e2d7af33d0e7c929030d3ed8194a446ef8c Mon Sep 17 00:00:00 2001 From: Jyrki Vesterinen Date: Sat, 19 Jan 2019 17:29:55 +0200 Subject: [PATCH] Revert "Disallow creating variables with invalid WML tag names (fixes #3877)" This reverts commit 736f217793368fa27d180ed4dc5818072319d528. The check is redundant with the one in get_variable_key_visitor constructor. --- src/variable_info_detail.hpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/variable_info_detail.hpp b/src/variable_info_detail.hpp index 03777358540e..b6bb990a56d9 100644 --- a/src/variable_info_detail.hpp +++ b/src/variable_info_detail.hpp @@ -41,11 +41,6 @@ class vi_policy_const static const config& get_child_at(const config& cfg, const std::string& key, int index) { assert(index >= 0); - - if(!config::valid_tag(key)) { - throw invalid_variablename_exception(); - } - // cfg.child_or_empty does not support index parameter if(const config& child = cfg.child(key, index)) { return child; @@ -68,11 +63,6 @@ class vi_policy_create static config& get_child_at(config& cfg, const std::string& key, int index) { assert(index >= 0); - - if (!config::valid_tag(key)) { - throw invalid_variablename_exception(); - } - // the 'create_if_not_existent' logic. while(static_cast(cfg.child_count(key)) <= index) { cfg.add_child(key);