diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-10-10 19:12:42 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-10-10 19:12:42 +0200 |
commit | 1736c0cef497335beb0cc98c6995d29a6e88137b (patch) | |
tree | d2ca9c763ff7e0b96f41973dea4e6cb3d3306b35 /src/kernel_preprocessor.cpp | |
parent | c163868e1822a97750b4380f0d9cdd38369f9f0b (diff) |
Fixed pre-processor warnings related to the subgroup shuffling
Diffstat (limited to 'src/kernel_preprocessor.cpp')
-rw-r--r-- | src/kernel_preprocessor.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/kernel_preprocessor.cpp b/src/kernel_preprocessor.cpp index 1c422d33..bc2ab540 100644 --- a/src/kernel_preprocessor.cpp +++ b/src/kernel_preprocessor.cpp @@ -182,6 +182,31 @@ bool EvaluateCondition(std::string condition, const auto right = condition.substr(equal_pos + 4); return (left == right); } + + // Process the not equal sign + const auto not_equal_pos = condition.find(" != "); + if (not_equal_pos != std::string::npos) { + const auto left = condition.substr(0, not_equal_pos); + const auto right = condition.substr(not_equal_pos + 4); + return (left != right); + } + + // Process the smaller than sign + const auto smaller_than_pos = condition.find(" < "); + if (smaller_than_pos != std::string::npos) { + const auto left = condition.substr(0, smaller_than_pos); + const auto right = condition.substr(smaller_than_pos + 3); + return (left < right); + } + + // Process the larger than sign + const auto larger_than_pos = condition.find(" > "); + if (larger_than_pos != std::string::npos) { + const auto left = condition.substr(0, larger_than_pos); + const auto right = condition.substr(larger_than_pos + 3); + return (left > right); + } + printf("Warning unknown condition: %s\n", condition.c_str()); return false; // unknown error } |