Cleanup: remove redundant const qualifiers for scalar & enum types
This commit is contained in:
parent
44bac4c8cc
commit
0f29f2c3e6
|
@ -64,13 +64,13 @@ bool BKE_id_attribute_remove(struct ID *id,
|
|||
|
||||
struct CustomDataLayer *BKE_id_attribute_find(const struct ID *id,
|
||||
const char *name,
|
||||
const int type,
|
||||
const eAttrDomain domain);
|
||||
int type,
|
||||
eAttrDomain domain);
|
||||
|
||||
struct CustomDataLayer *BKE_id_attribute_search(const struct ID *id,
|
||||
const char *name,
|
||||
const eCustomDataMask type,
|
||||
const eAttrDomainMask domain_mask);
|
||||
eCustomDataMask type,
|
||||
eAttrDomainMask domain_mask);
|
||||
|
||||
eAttrDomain BKE_id_attribute_domain(const struct ID *id, const struct CustomDataLayer *layer);
|
||||
int BKE_id_attribute_data_length(struct ID *id, struct CustomDataLayer *layer);
|
||||
|
|
|
@ -376,7 +376,7 @@ class CustomDataAttributes {
|
|||
* value for the type will be used.
|
||||
*/
|
||||
blender::GVArray get_for_read(const AttributeIDRef &attribute_id,
|
||||
const eCustomDataType data_type,
|
||||
eCustomDataType data_type,
|
||||
const void *default_value) const;
|
||||
|
||||
template<typename T>
|
||||
|
@ -389,10 +389,8 @@ class CustomDataAttributes {
|
|||
}
|
||||
|
||||
std::optional<blender::GMutableSpan> get_for_write(const AttributeIDRef &attribute_id);
|
||||
bool create(const AttributeIDRef &attribute_id, const eCustomDataType data_type);
|
||||
bool create_by_move(const AttributeIDRef &attribute_id,
|
||||
const eCustomDataType data_type,
|
||||
void *buffer);
|
||||
bool create(const AttributeIDRef &attribute_id, eCustomDataType data_type);
|
||||
bool create_by_move(const AttributeIDRef &attribute_id, eCustomDataType data_type, void *buffer);
|
||||
bool remove(const AttributeIDRef &attribute_id);
|
||||
|
||||
/**
|
||||
|
|
|
@ -749,7 +749,7 @@ void CustomData_debug_info_from_layers(const struct CustomData *data,
|
|||
# include "BLI_cpp_type.hh"
|
||||
|
||||
namespace blender::bke {
|
||||
const CPPType *custom_data_type_to_cpp_type(const eCustomDataType type);
|
||||
const CPPType *custom_data_type_to_cpp_type(eCustomDataType type);
|
||||
eCustomDataType cpp_type_to_custom_data_type(const CPPType &type);
|
||||
} // namespace blender::bke
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,7 @@ VArray<float3> curve_normals_varray(const CurveComponent &component, const eAttr
|
|||
VArray<float3> mesh_normals_varray(const MeshComponent &mesh_component,
|
||||
const Mesh &mesh,
|
||||
const IndexMask mask,
|
||||
const eAttrDomain domain);
|
||||
eAttrDomain domain);
|
||||
|
||||
class NormalFieldInput : public GeometryFieldInput {
|
||||
public:
|
||||
|
|
|
@ -157,7 +157,7 @@ class GeometryComponent {
|
|||
/** Returns true when the attribute has been created. */
|
||||
bool attribute_try_create(const blender::bke::AttributeIDRef &attribute_id,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType data_type,
|
||||
eCustomDataType data_type,
|
||||
const AttributeInit &initializer);
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ class GeometryComponent {
|
|||
*/
|
||||
blender::GVArray attribute_try_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType data_type) const;
|
||||
eCustomDataType data_type) const;
|
||||
|
||||
/**
|
||||
* Get a virtual array that refers to the data of an attribute, interpolated to the given domain.
|
||||
|
@ -199,7 +199,7 @@ class GeometryComponent {
|
|||
* cannot be converted.
|
||||
*/
|
||||
blender::bke::ReadAttributeLookup attribute_try_get_for_read(
|
||||
const blender::bke::AttributeIDRef &attribute_id, const eCustomDataType data_type) const;
|
||||
const blender::bke::AttributeIDRef &attribute_id, eCustomDataType data_type) const;
|
||||
|
||||
/**
|
||||
* Get a virtual array that refers to the data of an attribute, interpolated to the given domain
|
||||
|
@ -208,7 +208,7 @@ class GeometryComponent {
|
|||
*/
|
||||
blender::GVArray attribute_get_for_read(const blender::bke::AttributeIDRef &attribute_id,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType data_type,
|
||||
eCustomDataType data_type,
|
||||
const void *default_value = nullptr) const;
|
||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
||||
template<typename T>
|
||||
|
@ -235,7 +235,7 @@ class GeometryComponent {
|
|||
blender::bke::OutputAttribute attribute_try_get_for_output(
|
||||
const blender::bke::AttributeIDRef &attribute_id,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType data_type,
|
||||
eCustomDataType data_type,
|
||||
const void *default_value = nullptr);
|
||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
||||
template<typename T>
|
||||
|
@ -258,7 +258,7 @@ class GeometryComponent {
|
|||
blender::bke::OutputAttribute attribute_try_get_for_output_only(
|
||||
const blender::bke::AttributeIDRef &attribute_id,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType data_type);
|
||||
eCustomDataType data_type);
|
||||
/* Use instead of the method above when the type is known at compile time for type safety. */
|
||||
template<typename T>
|
||||
blender::bke::OutputAttribute_Typed<T> attribute_try_get_for_output_only(
|
||||
|
|
|
@ -95,11 +95,11 @@ typedef enum eIDRemapType {
|
|||
*/
|
||||
void BKE_libblock_remap_multiple_locked(struct Main *bmain,
|
||||
struct IDRemapper *mappings,
|
||||
const short remap_flags);
|
||||
short remap_flags);
|
||||
|
||||
void BKE_libblock_remap_multiple(struct Main *bmain,
|
||||
struct IDRemapper *mappings,
|
||||
const short remap_flags);
|
||||
short remap_flags);
|
||||
|
||||
/**
|
||||
* Replace all references in given Main to \a old_id by \a new_id
|
||||
|
@ -142,9 +142,9 @@ void BKE_libblock_relink_ex(struct Main *bmain,
|
|||
*/
|
||||
void BKE_libblock_relink_multiple(struct Main *bmain,
|
||||
struct LinkNode *ids,
|
||||
const eIDRemapType remap_type,
|
||||
eIDRemapType remap_type,
|
||||
struct IDRemapper *id_remapper,
|
||||
const short remap_flags);
|
||||
short remap_flags);
|
||||
|
||||
/**
|
||||
* Remaps ID usages of given ID to their `id->newid` pointer if not None, and proceeds recursively
|
||||
|
|
|
@ -55,17 +55,17 @@ IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin);
|
|||
* finished.
|
||||
*/
|
||||
void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state,
|
||||
const float x,
|
||||
const float y,
|
||||
const int img_w,
|
||||
const int img_h,
|
||||
const eGPUTextureFormat gpu_format,
|
||||
const bool use_filter,
|
||||
float x,
|
||||
float y,
|
||||
int img_w,
|
||||
int img_h,
|
||||
eGPUTextureFormat gpu_format,
|
||||
bool use_filter,
|
||||
const void *rect,
|
||||
const float scaleX,
|
||||
const float scaleY,
|
||||
const float xzoom,
|
||||
const float yzoom,
|
||||
float scaleX,
|
||||
float scaleY,
|
||||
float xzoom,
|
||||
float yzoom,
|
||||
const float color[4]);
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,5 +49,5 @@ typedef void (*gpBakeCb)(struct GpencilModifierData *md_,
|
|||
void generic_bake_deform_stroke(struct Depsgraph *depsgraph,
|
||||
struct GpencilModifierData *md,
|
||||
struct Object *ob,
|
||||
const bool retime,
|
||||
bool retime,
|
||||
gpBakeCb bake_cb);
|
||||
|
|
|
@ -519,10 +519,10 @@ enum {
|
|||
* \{ */
|
||||
|
||||
void IMB_colormanagement_blackbody_temperature_to_rgb_table(float *r_table,
|
||||
const int width,
|
||||
const float min,
|
||||
const float max);
|
||||
void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, const int width);
|
||||
int width,
|
||||
float min,
|
||||
float max);
|
||||
void IMB_colormanagement_wavelength_to_rgb_table(float *r_table, int width);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@ typedef struct ImFileType {
|
|||
* dimensions of the full-size image in r_width & r_height.
|
||||
*/
|
||||
struct ImBuf *(*load_filepath_thumbnail)(const char *filepath,
|
||||
const int flags,
|
||||
const size_t max_thumb_size,
|
||||
int flags,
|
||||
size_t max_thumb_size,
|
||||
char colorspace[IM_MAX_SPACE],
|
||||
size_t *r_width,
|
||||
size_t *r_height);
|
||||
|
@ -155,8 +155,8 @@ struct ImBuf *imb_load_jpeg(const unsigned char *buffer,
|
|||
int flags,
|
||||
char colorspace[IM_MAX_SPACE]);
|
||||
struct ImBuf *imb_thumbnail_jpeg(const char *filepath,
|
||||
const int flags,
|
||||
const size_t max_thumb_size,
|
||||
int flags,
|
||||
size_t max_thumb_size,
|
||||
char colorspace[IM_MAX_SPACE],
|
||||
size_t *r_width,
|
||||
size_t *r_height);
|
||||
|
|
|
@ -27,8 +27,8 @@ bool imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags);
|
|||
struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags, char *colorspace);
|
||||
|
||||
struct ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath,
|
||||
const int flags,
|
||||
const size_t max_thumb_size,
|
||||
int flags,
|
||||
size_t max_thumb_size,
|
||||
char colorspace[],
|
||||
size_t *r_width,
|
||||
size_t *r_height);
|
||||
|
|
|
@ -308,7 +308,7 @@ class GeoNodeExecParams {
|
|||
GVArray get_input_attribute(const StringRef name,
|
||||
const GeometryComponent &component,
|
||||
eAttrDomain domain,
|
||||
const eCustomDataType type,
|
||||
eCustomDataType type,
|
||||
const void *default_value) const;
|
||||
|
||||
template<typename T>
|
||||
|
@ -328,7 +328,7 @@ class GeoNodeExecParams {
|
|||
*/
|
||||
eCustomDataType get_input_attribute_data_type(const StringRef name,
|
||||
const GeometryComponent &component,
|
||||
const eCustomDataType default_type) const;
|
||||
eCustomDataType default_type) const;
|
||||
|
||||
/**
|
||||
* If any of the corresponding input sockets are attributes instead of single values,
|
||||
|
|
|
@ -247,15 +247,15 @@ void RE_render_result_full_channel_name(char *fullname,
|
|||
const char *passname,
|
||||
const char *viewname,
|
||||
const char *chan_id,
|
||||
const int channel);
|
||||
int channel);
|
||||
|
||||
struct ImBuf *RE_render_result_rect_to_ibuf(struct RenderResult *rr,
|
||||
const struct ImageFormatData *imf,
|
||||
const float dither,
|
||||
const int view_id);
|
||||
int view_id);
|
||||
void RE_render_result_rect_from_ibuf(struct RenderResult *rr,
|
||||
const struct ImBuf *ibuf,
|
||||
const int view_id);
|
||||
int view_id);
|
||||
|
||||
struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name);
|
||||
float *RE_RenderLayerGetPass(struct RenderLayer *rl, const char *name, const char *viewname);
|
||||
|
|
|
@ -27,16 +27,13 @@ struct Mesh;
|
|||
*/
|
||||
void RE_generate_texturemargin_adjacentfaces(struct ImBuf *ibuf,
|
||||
char *mask,
|
||||
const int margin,
|
||||
int margin,
|
||||
struct Mesh const *me,
|
||||
char const *uv_layer,
|
||||
const float uv_offset[2]);
|
||||
|
||||
void RE_generate_texturemargin_adjacentfaces_dm(struct ImBuf *ibuf,
|
||||
char *mask,
|
||||
const int margin,
|
||||
struct DerivedMesh *dm,
|
||||
const float uv_offset[2]);
|
||||
void RE_generate_texturemargin_adjacentfaces_dm(
|
||||
struct ImBuf *ibuf, char *mask, int margin, struct DerivedMesh *dm, const float uv_offset[2]);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ void SEQ_channels_duplicate(struct ListBase *channels_dst, struct ListBase *chan
|
|||
void SEQ_channels_free(struct ListBase *channels);
|
||||
|
||||
struct SeqTimelineChannel *SEQ_channel_get_by_index(const struct ListBase *channels,
|
||||
const int channel_index);
|
||||
char *SEQ_channel_name_get(struct ListBase *channels, const int channel_index);
|
||||
int channel_index);
|
||||
char *SEQ_channel_name_get(struct ListBase *channels, int channel_index);
|
||||
bool SEQ_channel_is_locked(const struct SeqTimelineChannel *channel);
|
||||
bool SEQ_channel_is_muted(const struct SeqTimelineChannel *channel);
|
||||
int SEQ_channel_index_get(const struct SeqTimelineChannel *channel);
|
||||
|
|
Loading…
Reference in New Issue