diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-09-02 21:31:36 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-09-02 21:31:36 +0200 |
| commit | 5c6cb9eca80a7bb18beb0fae42426b97a9f99fe0 (patch) | |
| tree | 6f4b8891374c1d13ac7dd56170ca91c2bc0eaf8c /include | |
| parent | 7b3e7818d0dd104f4a8da6e98b73d6def0f1407b (diff) | |
| download | Project-Tick-5c6cb9eca80a7bb18beb0fae42426b97a9f99fe0.tar.gz Project-Tick-5c6cb9eca80a7bb18beb0fae42426b97a9f99fe0.zip | |
More inlining. Closes #3
Diffstat (limited to 'include')
| -rw-r--r-- | include/tag_array.h | 12 | ||||
| -rw-r--r-- | include/tag_compound.h | 14 | ||||
| -rw-r--r-- | include/tag_list.h | 12 | ||||
| -rw-r--r-- | include/tag_string.h | 10 |
4 files changed, 24 insertions, 24 deletions
diff --git a/include/tag_array.h b/include/tag_array.h index 342d3a4ceb..c59249b571 100644 --- a/include/tag_array.h +++ b/include/tag_array.h @@ -97,12 +97,12 @@ public: void clear() { data.clear(); } //Iterators - iterator begin(); - iterator end(); - const_iterator begin() const; - const_iterator end() const; - const_iterator cbegin() const; - const_iterator cend() const; + iterator begin() { return data.begin(); } + iterator end() { return data.end(); } + const_iterator begin() const { return data.begin(); } + const_iterator end() const { return data.end(); } + const_iterator cbegin() const { return data.cbegin(); } + const_iterator cend() const { return data.cend(); } void read_payload(io::stream_reader& reader) override; /** diff --git a/include/tag_compound.h b/include/tag_compound.h index 2948059ce9..b1c4c996dc 100644 --- a/include/tag_compound.h +++ b/include/tag_compound.h @@ -63,7 +63,7 @@ public: * 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); + value& operator[](const std::string& key) { return tags[key]; } /** * @brief Inserts or assigns a tag @@ -112,12 +112,12 @@ public: void clear() { tags.clear(); } //Iterators - iterator begin(); - iterator end(); - const_iterator begin() const; - const_iterator end() const; - const_iterator cbegin() const; - const_iterator cend() const; + iterator begin() { return tags.begin(); } + iterator end() { return tags.end(); } + const_iterator begin() const { return tags.begin(); } + const_iterator end() const { return tags.end(); } + const_iterator cbegin() const { return tags.cbegin(); } + const_iterator cend() const { return tags.cend(); } void read_payload(io::stream_reader& reader) override; void write_payload(io::stream_writer& writer) const override; diff --git a/include/tag_list.h b/include/tag_list.h index 05150323b9..c27da8697d 100644 --- a/include/tag_list.h +++ b/include/tag_list.h @@ -151,12 +151,12 @@ public: void reset(tag_type type = tag_type::Null); //Iterators - iterator begin(); - iterator end(); - const_iterator begin() const; - const_iterator end() const; - const_iterator cbegin() const; - const_iterator cend() const; + iterator begin() { return tags.begin(); } + iterator end() { return tags.end(); } + const_iterator begin() const { return tags.begin(); } + const_iterator end() const { return tags.end(); } + const_iterator cbegin() const { return tags.cbegin(); } + const_iterator cend() const { return tags.cend(); } /** * @inheritdoc diff --git a/include/tag_string.h b/include/tag_string.h index 48e7adf497..dee47f5f97 100644 --- a/include/tag_string.h +++ b/include/tag_string.h @@ -45,11 +45,11 @@ public: const std::string& get() const { return value; } //Setters - tag_string& operator=(const std::string& str); - tag_string& operator=(std::string&& str); - tag_string& operator=(const char* str); - void set(const std::string& str); - void set(std::string&& str); + tag_string& operator=(const std::string& str) { value = str; return *this; } + tag_string& operator=(std::string&& str) { value = std::move(str); return *this; } + tag_string& operator=(const char* str) { value = str; return *this; } + void set(const std::string& str) { value = str; } + void set(std::string&& str) { value = std::move(str); } void read_payload(io::stream_reader& reader) override; /** |
