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:
authorAnkit Meel <ankitjmeel@gmail.com>2020-11-07 19:08:27 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-11-07 19:22:53 +0300
commit4429b4b77ef6754739a3c2b4fabd0537999e9bdc (patch)
treeb253409c27c0ea0c523be837cd734a9d670b4d88
parent9cd9ea591f060b8f454c418a5ceceeba7146cd6b (diff)
Cleanup: Clang-tidy, readability-non-const-parameter.
-rw-r--r--intern/sky/source/sky_model.cpp5
-rw-r--r--intern/sky/source/sky_nishita.cpp2
-rw-r--r--source/blender/makesrna/intern/rna_access.c6
3 files changed, 6 insertions, 7 deletions
diff --git a/intern/sky/source/sky_model.cpp b/intern/sky/source/sky_model.cpp
index e835e04d164..165444003d3 100644
--- a/intern/sky/source/sky_model.cpp
+++ b/intern/sky/source/sky_model.cpp
@@ -272,9 +272,8 @@ static double ArHosekSkyModel_CookRadianceConfiguration(ArHosekSkyModel_Radiance
return res;
}
-static double ArHosekSkyModel_GetRadianceInternal(SKY_ArHosekSkyModelConfiguration configuration,
- double theta,
- double gamma)
+static double ArHosekSkyModel_GetRadianceInternal(
+ const SKY_ArHosekSkyModelConfiguration configuration, const double theta, const double gamma)
{
const double expM = exp(configuration[4] * gamma);
const double rayM = cos(gamma) * cos(gamma);
diff --git a/intern/sky/source/sky_nishita.cpp b/intern/sky/source/sky_nishita.cpp
index 68fc2085448..e3b6ca021fe 100644
--- a/intern/sky/source/sky_nishita.cpp
+++ b/intern/sky/source/sky_nishita.cpp
@@ -87,7 +87,7 @@ static float3 geographical_to_direction(float lat, float lon)
return make_float3(cosf(lat) * cosf(lon), cosf(lat) * sinf(lon), sinf(lat));
}
-static float3 spec_to_xyz(float *spectrum)
+static float3 spec_to_xyz(const float *spectrum)
{
float3 xyz = make_float3(0.0f, 0.0f, 0.0f);
for (int i = 0; i < num_wavelengths; i++) {
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 361168bcf3f..a59a552c66d 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1662,7 +1662,7 @@ void RNA_property_enum_items(bContext *C,
#ifdef WITH_INTERNATIONAL
static void property_enum_translate(PropertyRNA *prop,
EnumPropertyItem **r_item,
- int *r_totitem,
+ const int *totitem,
bool *r_free)
{
if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) {
@@ -1684,8 +1684,8 @@ static void property_enum_translate(PropertyRNA *prop,
const EnumPropertyItem *item = *r_item;
int tot;
- if (r_totitem) {
- tot = *r_totitem;
+ if (totitem) {
+ tot = *totitem;
}
else {
/* count */