Skip to content

Commit

Permalink
Revert "Disallow creating variables with invalid WML tag names (fixes #…
Browse files Browse the repository at this point in the history
…3877)"

This reverts commit 736f217.

The check is redundant with the one in get_variable_key_visitor
constructor.
  • Loading branch information
jyrkive committed Jan 19, 2019
1 parent ccedb51 commit f0990e2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/variable_info_detail.hpp
Expand Up @@ -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;
Expand All @@ -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<int>(cfg.child_count(key)) <= index) {
cfg.add_child(key);
Expand Down

0 comments on commit f0990e2

Please sign in to comment.