Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/blenlib/BLI_string_ref.hh
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/blenlib/BLI_string_ref.hh')
-rw-r--r--source/blender/blenlib/BLI_string_ref.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh
index dc73208350f..3769e711a50 100644
--- a/source/blender/blenlib/BLI_string_ref.hh
+++ b/source/blender/blenlib/BLI_string_ref.hh
@@ -64,7 +64,7 @@ class StringRefBase {
const char *data_;
int64_t size_;
- constexpr StringRefBase(const char *data, const int64_t size);
+ constexpr StringRefBase(const char *data, int64_t size);
public:
/* Similar to string_view::npos, but signed. */
@@ -84,12 +84,12 @@ class StringRefBase {
constexpr IndexRange index_range() const;
void unsafe_copy(char *dst) const;
- void copy(char *dst, const int64_t dst_size) const;
+ void copy(char *dst, int64_t dst_size) const;
template<size_t N> void copy(char (&dst)[N]) const;
constexpr bool startswith(StringRef prefix) const;
constexpr bool endswith(StringRef suffix) const;
- constexpr StringRef substr(int64_t start, const int64_t size) const;
+ constexpr StringRef substr(int64_t start, int64_t size) const;
constexpr const char &front() const;
constexpr const char &back() const;
@@ -123,11 +123,11 @@ class StringRefNull : public StringRefBase {
public:
constexpr StringRefNull();
- constexpr StringRefNull(const char *str, const int64_t size);
+ constexpr StringRefNull(const char *str, int64_t size);
StringRefNull(const char *str);
StringRefNull(const std::string &str);
- constexpr char operator[](const int64_t index) const;
+ constexpr char operator[](int64_t index) const;
constexpr const char *c_str() const;
};
@@ -139,14 +139,14 @@ class StringRef : public StringRefBase {
constexpr StringRef();
constexpr StringRef(StringRefNull other);
constexpr StringRef(const char *str);
- constexpr StringRef(const char *str, const int64_t length);
+ constexpr StringRef(const char *str, int64_t length);
constexpr StringRef(const char *begin, const char *one_after_end);
constexpr StringRef(std::string_view view);
StringRef(const std::string &str);
- constexpr StringRef drop_prefix(const int64_t n) const;
+ constexpr StringRef drop_prefix(int64_t n) const;
constexpr StringRef drop_known_prefix(StringRef prefix) const;
- constexpr StringRef drop_suffix(const int64_t n) const;
+ constexpr StringRef drop_suffix(int64_t n) const;
constexpr char operator[](int64_t index) const;
};