diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-05 13:27:52 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-11-05 13:36:50 +0300 |
commit | 035026f48a2766cd5793f92062c7268bfb02a5c6 (patch) | |
tree | 4a8bc6831ee9a4b7c5d233fe02a5bb7e2a6c4659 /source/blender/compositor | |
parent | 1073c6ae8e2337ef95eca69b201ddfca44db8415 (diff) |
Code cleanup: Replace magic number with verbose name for math node operations
Should be no functional changes, just much less cryptic code.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/nodes/COM_MathNode.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp index ef7046b8165..4cd6964ed3b 100644 --- a/source/blender/compositor/nodes/COM_MathNode.cpp +++ b/source/blender/compositor/nodes/COM_MathNode.cpp @@ -29,61 +29,61 @@ void MathNode::convertToOperations(NodeConverter &converter, const CompositorCon MathBaseOperation *operation = NULL; switch (this->getbNode()->custom1) { - case 0: /* Add */ + case NODE_MATH_ADD: operation = new MathAddOperation(); break; - case 1: /* Subtract */ + case NODE_MATH_SUB: operation = new MathSubtractOperation(); break; - case 2: /* Multiply */ + case NODE_MATH_MUL: operation = new MathMultiplyOperation(); break; - case 3: /* Divide */ + case NODE_MATH_DIVIDE: operation = new MathDivideOperation(); break; - case 4: /* Sine */ + case NODE_MATH_SIN: operation = new MathSineOperation(); break; - case 5: /* Cosine */ + case NODE_MATH_COS: operation = new MathCosineOperation(); break; - case 6: /* Tangent */ + case NODE_MATH_TAN: operation = new MathTangentOperation(); break; - case 7: /* Arc-Sine */ + case NODE_MATH_ASIN: operation = new MathArcSineOperation(); break; - case 8: /* Arc-Cosine */ + case NODE_MATH_ACOS: operation = new MathArcCosineOperation(); break; - case 9: /* Arc-Tangent */ + case NODE_MATH_ATAN: operation = new MathArcTangentOperation(); break; - case 10: /* Power */ + case NODE_MATH_POW: operation = new MathPowerOperation(); break; - case 11: /* Logarithm */ + case NODE_MATH_LOG: operation = new MathLogarithmOperation(); break; - case 12: /* Minimum */ + case NODE_MATH_MIN: operation = new MathMinimumOperation(); break; - case 13: /* Maximum */ + case NODE_MATH_MAX: operation = new MathMaximumOperation(); break; - case 14: /* Round */ + case NODE_MATH_ROUND: operation = new MathRoundOperation(); break; - case 15: /* Less Than */ + case NODE_MATH_LESS: operation = new MathLessThanOperation(); break; - case 16: /* Greater Than */ + case NODE_MATH_GREATER: operation = new MathGreaterThanOperation(); break; - case 17: /* Modulo */ + case NODE_MATH_MOD: operation = new MathModuloOperation(); break; - case 18: /* Absolute Value */ + case NODE_MATH_ABS: operation = new MathAbsoluteOperation(); break; } |