summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2008-06-05 06:06:34 +0000
committerpjrm <pjrm@users.sourceforge.net>2008-06-05 06:06:34 +0000
commit9d4e27fed9b83fd1c0c3f85cdb561d34de05fef5 (patch)
tree1176b15e3ea08c07684d28da0e5d02dff722078d
parentfirst try at attribute overloading (diff)
downloadinkscape-9d4e27fed9b83fd1c0c3f85cdb561d34de05fef5.tar.gz
inkscape-9d4e27fed9b83fd1c0c3f85cdb561d34de05fef5.zip
Fix expression whose behaviour is undefined in C++. N.B. This “fix” involves guessing at the intended meaning. I've mailed the author to confirm.
(bzr r5809)
-rw-r--r--src/display/nr-filter-specularlighting.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/display/nr-filter-specularlighting.cpp b/src/display/nr-filter-specularlighting.cpp
index 1c131b4cc..3a14eb78f 100644
--- a/src/display/nr-filter-specularlighting.cpp
+++ b/src/display/nr-filter-specularlighting.cpp
@@ -108,7 +108,8 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
- data_o[j++] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ data_o[j] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ ++j;
}
out->empty = FALSE;
delete dl;
@@ -135,7 +136,8 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
- data_o[j++] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ data_o[j] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ ++j;
}
out->empty = FALSE;
delete pl;
@@ -162,7 +164,8 @@ int FilterSpecularLighting::render(FilterSlot &slot, FilterUnits const &units) {
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_RED]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_GREEN]);
data_o[j++] = CLAMP_D_TO_U8(inter * LC[LIGHT_BLUE]);
- data_o[j++] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ data_o[j] = MAX(MAX(data_o[j-3], data_o[j-2]), data_o[j-1]);
+ ++j;
}
out->empty = FALSE;
delete sl;