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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-16 03:45:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-16 03:45:41 +0400
commit761ac8987799050c860f2b649d626aaa4258a8bd (patch)
tree0c301d1aada48027322f2f37b8bfecd500a23629 /source/gameengine/Expressions
parent769ab3eed81e8b14dff46af7ca28e2b70a7aac41 (diff)
style cleanup
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/InputParser.cpp6
-rw-r--r--source/gameengine/Expressions/Operator2Expr.cpp83
2 files changed, 46 insertions, 43 deletions
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 5a2075d52df..ed89fb13337 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -260,7 +260,8 @@ void CParser::NextSym()
opkind = OPless;
}
break;
- case '\"' : {
+ case '\"' :
+ {
int start;
sym = constsym;
constkind = stringtype;
@@ -464,7 +465,8 @@ CExpression *CParser::Ex(int i)
}
else {
switch (sym) {
- case constsym: {
+ case constsym:
+ {
switch (constkind) {
case booltype:
e1 = new CConstExpr(new CBoolValue(boolvalue));
diff --git a/source/gameengine/Expressions/Operator2Expr.cpp b/source/gameengine/Expressions/Operator2Expr.cpp
index d0240b5ec75..b03d00e7f77 100644
--- a/source/gameengine/Expressions/Operator2Expr.cpp
+++ b/source/gameengine/Expressions/Operator2Expr.cpp
@@ -113,61 +113,61 @@ and m_rhs
}
-/*
+#if 0
bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
{
bool inside;
inside = false;
- switch (m_op)
- {
- case VALUE_ADD_OPERATOR: {
- // inside = first || second; // optimized with early out if first is inside
- // todo: calculate smallest leaf first ! is much faster...
-
- bool second;//first ;//,second;
-
- //first = m_lhs->IsInside(x,y,z);
- second = m_rhs->IsInside(x,y,z,bBorderInclude);
- if (second)
- return true; //early out
-
- // second = m_rhs->IsInside(x,y,z);
+ switch (m_op) {
+ case VALUE_ADD_OPERATOR:
+ {
+ // inside = first || second; // optimized with early out if first is inside
+ // todo: calculate smallest leaf first ! is much faster...
- return m_lhs->IsInside(x,y,z,bBorderInclude);
-
- break;
- }
-
- case VALUE_SUB_OPERATOR: {
- //inside = first && !second; // optimized with early out
- // todo: same as with add_operator: calc smallest leaf first
+ bool second;//first ;//,second;
- bool second;//first ;//,second;
- //first = m_lhs->IsInside(x,y,z);
- second = m_rhs->IsInside(x,y,z,bBorderInclude);
- if (second)
- return false;
+ //first = m_lhs->IsInside(x,y,z);
+ second = m_rhs->IsInside(x,y,z,bBorderInclude);
+ if (second)
+ return true; //early out
- // second space get subtracted -> negate!
- //second = m_rhs->IsInside(x,y,z);
+ // second = m_rhs->IsInside(x,y,z);
- return (m_lhs->IsInside(x,y,z,bBorderInclude));
+ return m_lhs->IsInside(x,y,z,bBorderInclude);
-
- break;
- }
- default:{
- assert(false);
- // not yet implemented, only add or sub csg operations
- }
+ break;
+ }
+
+ case VALUE_SUB_OPERATOR:
+ {
+ //inside = first && !second; // optimized with early out
+ // todo: same as with add_operator: calc smallest leaf first
+
+ bool second;//first ;//,second;
+ //first = m_lhs->IsInside(x,y,z);
+ second = m_rhs->IsInside(x,y,z,bBorderInclude);
+ if (second)
+ return false;
+
+ // second space get subtracted -> negate!
+ //second = m_rhs->IsInside(x,y,z);
+
+ return (m_lhs->IsInside(x,y,z,bBorderInclude));
+
+
+ break;
+ }
+ default:
+ {
+ assert(false);
+ // not yet implemented, only add or sub csg operations
+ }
}
return inside;
}
-
-
bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude)
{
return m_rhs->IsInside(x,y,z,bBorderInclude);
@@ -177,7 +177,8 @@ bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude)
{
return m_lhs->IsInside(x,y,z,bBorderInclude);
}
-*/
+#endif
+
bool COperator2Expr::NeedsRecalculated()
{
// added some lines, just for debugging purposes, it could be a one-liner :)