From 792bbf09c4ab7a37664ebaed8314c4f543fc17b0 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sun, 5 Jul 2015 11:37:52 +0200 Subject: Correct documentations for operator[] --- include/tag_compound.h | 6 ++---- include/value.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/tag_compound.h b/include/tag_compound.h index ea0df236c9..acde3a1e2b 100644 --- a/include/tag_compound.h +++ b/include/tag_compound.h @@ -58,10 +58,8 @@ public: /** * @brief Accesses a tag by key * - * Returns a value to the tag with the specified key, or throws an - * exception if it does not exist. - * @throw std::out_of_range if given key does not exist - * @todo Make it create a new entry rather than throwing an exception + * Returns a value to the tag with the specified key. If it does not exist, + * creates a new uninitialized entry under the key. */ value& operator[](const std::string& key); diff --git a/include/value.h b/include/value.h index 4116e2d0c1..b2a7a21b1f 100644 --- a/include/value.h +++ b/include/value.h @@ -113,7 +113,6 @@ public: /** * @brief In case of a tag_compound, accesses a tag by key - * @throw std::bad_cast if the tag type is not tag_compound * @sa tag_compound::operator[] */ value& operator[](const std::string& key); -- cgit 0.0.5-2-1-g0f52