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/functions
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/functions')
-rw-r--r--source/blender/functions/FN_field.hh2
-rw-r--r--source/blender/functions/FN_generic_virtual_array.hh44
-rw-r--r--source/blender/functions/FN_generic_virtual_vector_array.hh22
3 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh
index 11f8a7e9b94..1b89c5353e9 100644
--- a/source/blender/functions/FN_field.hh
+++ b/source/blender/functions/FN_field.hh
@@ -448,7 +448,7 @@ class FieldEvaluator : NonMovable, NonCopyable {
* to avoid calculations for unnecessary elements later on. The evaluator will own the indices in
* some cases, so it must live at least as long as the returned mask.
*/
- IndexMask get_evaluated_as_mask(const int field_index);
+ IndexMask get_evaluated_as_mask(int field_index);
};
/**
diff --git a/source/blender/functions/FN_generic_virtual_array.hh b/source/blender/functions/FN_generic_virtual_array.hh
index 6aebca51219..bcb710e3472 100644
--- a/source/blender/functions/FN_generic_virtual_array.hh
+++ b/source/blender/functions/FN_generic_virtual_array.hh
@@ -47,15 +47,15 @@ class GVArrayImpl {
int64_t size_;
public:
- GVArrayImpl(const CPPType &type, const int64_t size);
+ GVArrayImpl(const CPPType &type, int64_t size);
virtual ~GVArrayImpl() = default;
const CPPType &type() const;
int64_t size() const;
- virtual void get(const int64_t index, void *r_value) const;
- virtual void get_to_uninitialized(const int64_t index, void *r_value) const = 0;
+ virtual void get(int64_t index, void *r_value) const;
+ virtual void get_to_uninitialized(int64_t index, void *r_value) const = 0;
virtual bool is_span() const;
virtual GSpan get_internal_span() const;
@@ -73,11 +73,11 @@ class GVArrayImpl {
/* A generic version of #VMutableArrayImpl. */
class GVMutableArrayImpl : public GVArrayImpl {
public:
- GVMutableArrayImpl(const CPPType &type, const int64_t size);
+ GVMutableArrayImpl(const CPPType &type, int64_t size);
- virtual void set_by_copy(const int64_t index, const void *value);
- virtual void set_by_relocate(const int64_t index, void *value);
- virtual void set_by_move(const int64_t index, void *value) = 0;
+ virtual void set_by_copy(int64_t index, const void *value);
+ virtual void set_by_relocate(int64_t index, void *value);
+ virtual void set_by_move(int64_t index, void *value) = 0;
virtual void set_all(const void *src);
@@ -173,13 +173,13 @@ class GVArrayCommon {
*/
void get_internal_single_to_uninitialized(void *r_value) const;
- void get(const int64_t index, void *r_value) const;
+ void get(int64_t index, void *r_value) const;
/**
* Returns a copy of the value at the given index. Usually a typed virtual array should
* be used instead, but sometimes this is simpler when only a few indices are needed.
*/
- template<typename T> T get(const int64_t index) const;
- void get_to_uninitialized(const int64_t index, void *r_value) const;
+ template<typename T> T get(int64_t index) const;
+ void get_to_uninitialized(int64_t index, void *r_value) const;
};
/** Generic version of #VArray. */
@@ -200,9 +200,9 @@ class GVArray : public GVArrayCommon {
template<typename ImplT, typename... Args> static GVArray For(Args &&...args);
- static GVArray ForSingle(const CPPType &type, const int64_t size, const void *value);
- static GVArray ForSingleRef(const CPPType &type, const int64_t size, const void *value);
- static GVArray ForSingleDefault(const CPPType &type, const int64_t size);
+ static GVArray ForSingle(const CPPType &type, int64_t size, const void *value);
+ static GVArray ForSingleRef(const CPPType &type, int64_t size, const void *value);
+ static GVArray ForSingleDefault(const CPPType &type, int64_t size);
static GVArray ForSpan(GSpan span);
static GVArray ForGArray(GArray<> array);
static GVArray ForEmpty(const CPPType &type);
@@ -244,9 +244,9 @@ class GVMutableArray : public GVArrayCommon {
template<typename T> bool try_assign_VMutableArray(VMutableArray<T> &varray) const;
- void set_by_copy(const int64_t index, const void *value);
- void set_by_move(const int64_t index, void *value);
- void set_by_relocate(const int64_t index, void *value);
+ void set_by_copy(int64_t index, const void *value);
+ void set_by_move(int64_t index, void *value);
+ void set_by_relocate(int64_t index, void *value);
void fill(const void *value);
/**
@@ -593,15 +593,15 @@ class GVArrayImpl_For_GSpan : public GVMutableArrayImpl {
GVArrayImpl_For_GSpan(const GMutableSpan span);
protected:
- GVArrayImpl_For_GSpan(const CPPType &type, const int64_t size);
+ GVArrayImpl_For_GSpan(const CPPType &type, int64_t size);
public:
- void get(const int64_t index, void *r_value) const override;
- void get_to_uninitialized(const int64_t index, void *r_value) const override;
+ void get(int64_t index, void *r_value) const override;
+ void get_to_uninitialized(int64_t index, void *r_value) const override;
- void set_by_copy(const int64_t index, const void *value) override;
- void set_by_move(const int64_t index, void *value) override;
- void set_by_relocate(const int64_t index, void *value) override;
+ void set_by_copy(int64_t index, const void *value) override;
+ void set_by_move(int64_t index, void *value) override;
+ void set_by_relocate(int64_t index, void *value) override;
bool is_span() const override;
GSpan get_internal_span() const override;
diff --git a/source/blender/functions/FN_generic_virtual_vector_array.hh b/source/blender/functions/FN_generic_virtual_vector_array.hh
index b80e21eaef1..b89ca22fe7e 100644
--- a/source/blender/functions/FN_generic_virtual_vector_array.hh
+++ b/source/blender/functions/FN_generic_virtual_vector_array.hh
@@ -88,10 +88,10 @@ class GVVectorArray {
}
protected:
- virtual int64_t get_vector_size_impl(const int64_t index) const = 0;
+ virtual int64_t get_vector_size_impl(int64_t index) const = 0;
- virtual void get_vector_element_impl(const int64_t index,
- const int64_t index_in_vector,
+ virtual void get_vector_element_impl(int64_t index,
+ int64_t index_in_vector,
void *r_value) const = 0;
virtual bool is_single_vector_impl() const
@@ -114,8 +114,8 @@ class GVArray_For_GVVectorArrayIndex : public GVArrayImpl {
}
protected:
- void get(const int64_t index_in_vector, void *r_value) const override;
- void get_to_uninitialized(const int64_t index_in_vector, void *r_value) const override;
+ void get(int64_t index_in_vector, void *r_value) const override;
+ void get_to_uninitialized(int64_t index_in_vector, void *r_value) const override;
};
class GVVectorArray_For_SingleGVArray : public GVVectorArray {
@@ -129,9 +129,9 @@ class GVVectorArray_For_SingleGVArray : public GVVectorArray {
}
protected:
- int64_t get_vector_size_impl(const int64_t index) const override;
- void get_vector_element_impl(const int64_t index,
- const int64_t index_in_vector,
+ int64_t get_vector_size_impl(int64_t index) const override;
+ void get_vector_element_impl(int64_t index,
+ int64_t index_in_vector,
void *r_value) const override;
bool is_single_vector_impl() const override;
@@ -148,9 +148,9 @@ class GVVectorArray_For_SingleGSpan : public GVVectorArray {
}
protected:
- int64_t get_vector_size_impl(const int64_t UNUSED(index)) const override;
- void get_vector_element_impl(const int64_t UNUSED(index),
- const int64_t index_in_vector,
+ int64_t get_vector_size_impl(int64_t UNUSED(index)) const override;
+ void get_vector_element_impl(int64_t UNUSED(index),
+ int64_t index_in_vector,
void *r_value) const override;
bool is_single_vector_impl() const override;