diff options
author | Lazydodo <github@lazydodo.com> | 2019-08-04 23:24:29 +0300 |
---|---|---|
committer | Lazydodo <github@lazydodo.com> | 2019-08-04 23:24:29 +0300 |
commit | 418fdee5dc9950fef17c1d2fc9f6137af5a42ac9 (patch) | |
tree | e0ab9b03ca18f31f8dbe8c631f6cd9ad38def745 /intern/cycles | |
parent | 37cef86f0d7a4c617d651f56b1c5347e7ec7d479 (diff) |
Cleanup: Mark large arrays of of constant data as const.
For background information see D5345
Reviewers: brecht, sergey
Differential Revision: https://developer.blender.org/D5345
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/sobol.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/render/sobol.cpp b/intern/cycles/render/sobol.cpp index 5fb3531b03b..c821249b239 100644 --- a/intern/cycles/render/sobol.cpp +++ b/intern/cycles/render/sobol.cpp @@ -62,7 +62,7 @@ typedef struct SobolDirectionNumbers { /* Keep simple alignment. */ /* clang-format off */ -static SobolDirectionNumbers SOBOL_NUMBERS[SOBOL_MAX_DIMENSIONS - 1] = { +static const SobolDirectionNumbers SOBOL_NUMBERS[SOBOL_MAX_DIMENSIONS - 1] = { {2, 1, 0, {1}}, {3, 2, 1, {1, 3}}, {4, 3, 1, {1, 3, 1}}, @@ -21279,10 +21279,10 @@ void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int dimensions v[i] = 1 << (31 - i); // all m's = 1 for (int dim = 1; dim < dimensions; dim++) { - SobolDirectionNumbers *numbers = &SOBOL_NUMBERS[dim - 1]; - uint s = numbers->s; - uint a = numbers->a; - uint *m = numbers->m; + const SobolDirectionNumbers *numbers = &SOBOL_NUMBERS[dim - 1]; + const uint s = numbers->s; + const uint a = numbers->a; + const uint *m = numbers->m; v = vectors[dim]; |