diff options
| author | paxakor <[email protected]> | 2022-02-10 16:47:32 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:32 +0300 |
| commit | 7fdbed62e54b804e2c12b86a2c2bab12f61065df (patch) | |
| tree | 180a6ae33c1213a60fb42829eccb42cc00fc6955 /util/generic | |
| parent | 7199613d295246a07c2f7b331fbb3128936039dc (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/generic')
| -rw-r--r-- | util/generic/strbase.h | 2 | ||||
| -rw-r--r-- | util/generic/string.h | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/util/generic/strbase.h b/util/generic/strbase.h index ab39fc7537f..eb53a175685 100644 --- a/util/generic/strbase.h +++ b/util/generic/strbase.h @@ -440,7 +440,7 @@ public: inline TCharType operator[](size_t pos) const noexcept { Y_ASSERT(pos < this->size()); - + return Ptr()[pos]; } diff --git a/util/generic/string.h b/util/generic/string.h index 8cd8aa6917f..d376ce256ab 100644 --- a/util/generic/string.h +++ b/util/generic/string.h @@ -251,14 +251,14 @@ public: } inline const_reference operator[](size_t pos) const noexcept { - Y_ASSERT(pos <= length()); + Y_ASSERT(pos <= length()); return this->data()[pos]; - } - + } + inline reference operator[](size_t pos) noexcept { - Y_ASSERT(pos <= length()); - + Y_ASSERT(pos <= length()); + #ifdef TSTRING_IS_STD_STRING return Storage_[pos]; #else |
