diff options
author | Marco Bubke <marco.bubke@qt.io> | 2017-11-16 17:48:53 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2017-11-23 11:55:15 +0000 |
commit | a15250051d711df826b1e07990e144f1cea0971d (patch) | |
tree | b4280581e7e646765e5a38d17795d594d9635244 /src/libs/utils/smallstringview.h | |
parent | bb2f9574b4a5f3db75c1ba506f2f394eeb08b16d (diff) |
Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the
compiler is warning you if you try the wrong format.
Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/libs/utils/smallstringview.h')
-rw-r--r-- | src/libs/utils/smallstringview.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libs/utils/smallstringview.h b/src/libs/utils/smallstringview.h index 39cb86b193c..ce5e63292f1 100644 --- a/src/libs/utils/smallstringview.h +++ b/src/libs/utils/smallstringview.h @@ -104,6 +104,18 @@ public: } constexpr + SmallStringView mid(size_type position) const noexcept + { + return SmallStringView(data() + position, size() - position); + } + + constexpr + SmallStringView mid(size_type position, size_type length) const noexcept + { + return SmallStringView(data() + position, length); + } + + constexpr const_iterator begin() const noexcept { return data(); |