diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-07-05 17:18:32 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-07-05 17:18:32 +0200 |
| commit | 9771baae369a72e196e0fbbdadbce3b1dc30ac37 (patch) | |
| tree | c995ca49a9a17e5bbb7d73cdaf54940622daf03d /src/value.cpp | |
| parent | 044752a36b076a59ee4cf5f6fef9d782acc0c5f0 (diff) | |
| download | Project-Tick-9771baae369a72e196e0fbbdadbce3b1dc30ac37.tar.gz Project-Tick-9771baae369a72e196e0fbbdadbce3b1dc30ac37.zip | |
Fix conflicting overload of operator[]
Diffstat (limited to 'src/value.cpp')
| -rw-r--r-- | src/value.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.cpp b/src/value.cpp index c1a7a91e2b..bf75b8931b 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -351,6 +351,11 @@ value& value::operator[](const std::string& key) return dynamic_cast<tag_compound&>(*tag_)[key]; } +value& value::operator[](const char* key) +{ + return (*this)[std::string(key)]; +} + std::unique_ptr<tag>& value::get_ptr() { return tag_; |
