summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-02-18 15:31:13 (GMT)
committerMarius Kintel <marius@kintel.net>2012-02-18 15:31:13 (GMT)
commit8fde3563b45e7e0b52b905f62773613caba4341b (patch)
tree040243cfdd040e9f18f4d3246b9fb64f90b78003 /src
parentccde3135708a704134cb921a9fffdd7d1aaa4eb3 (diff)
parent6038c8d6b15ed11951e6f2ca306106e531f68318 (diff)
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src')
-rw-r--r--src/func.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/func.cc b/src/func.cc
index eec0986..0c9b450 100644
--- a/src/func.cc
+++ b/src/func.cc
@@ -421,10 +421,10 @@ Value builtin_search(const Context *, const std::vector<std::string>&, const std
Value *resultVector = new Value();
resultVector->type = Value::VECTOR;
for (size_t j = 0; j < searchTableSize; j++) {
- if (searchTable.type == Value::VECTOR &&
- findThis.text[i] == searchTable.vec[j]->vec[index_col_num]->text[0] ||
- searchTable.type == Value::STRING &&
- findThis.text[i] == searchTable.text[j]) {
+ if ((searchTable.type == Value::VECTOR &&
+ findThis.text[i] == searchTable.vec[j]->vec[index_col_num]->text[0]) ||
+ (searchTable.type == Value::STRING &&
+ findThis.text[i] == searchTable.text[j])) {
Value *resultValue = new Value(double(j));
matchCount++;
if (num_returns_per_match==1) {
@@ -447,12 +447,12 @@ Value builtin_search(const Context *, const std::vector<std::string>&, const std
Value *resultVector = new Value();
resultVector->type = Value::VECTOR;
for (size_t j = 0; j < searchTable.vec.size(); j++) {
- if (findThis.vec[i]->type == Value::NUMBER &&
- searchTable.vec[j]->vec[index_col_num]->type == Value::NUMBER &&
- findThis.vec[i]->num == searchTable.vec[j]->vec[index_col_num]->num ||
- findThis.vec[i]->type == Value::STRING &&
- searchTable.vec[j]->vec[index_col_num]->type == Value::STRING &&
- findThis.vec[i]->text == searchTable.vec[j]->vec[index_col_num]->text) {
+ if ((findThis.vec[i]->type == Value::NUMBER &&
+ searchTable.vec[j]->vec[index_col_num]->type == Value::NUMBER &&
+ findThis.vec[i]->num == searchTable.vec[j]->vec[index_col_num]->num) ||
+ (findThis.vec[i]->type == Value::STRING &&
+ searchTable.vec[j]->vec[index_col_num]->type == Value::STRING &&
+ findThis.vec[i]->text == searchTable.vec[j]->vec[index_col_num]->text)) {
Value *resultValue = new Value(double(j));
matchCount++;
if (num_returns_per_match==1) {
contact: Jan Huwald // Impressum