summaryrefslogtreecommitdiff
path: root/src/func.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-02-18 13:47:08 (GMT)
committerMarius Kintel <marius@kintel.net>2012-02-18 13:47:08 (GMT)
commit3300d3f85d7616ed640b1b987f54343ac198ef2f (patch)
treef6b835e782ee96ed8e546b3430a675a9c36e060d /src/func.cc
parent1b63103f636ae2cbc68ee29eadce2d26f02d38c8 (diff)
Kill warnings
Diffstat (limited to 'src/func.cc')
-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