summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 16:59:18 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-02-03 16:59:18 -0500
commite3d5d30956434732fa99d390f927906742bf7d85 (patch)
treeb338b06d7000afb5822b4eae09058292e494a5df
parent5caeb000b00ff7833c3b3c44893d4beffc0afb82 (diff)
downloadverbly-e3d5d30956434732fa99d390f927906742bf7d85.tar.gz
verbly-e3d5d30956434732fa99d390f927906742bf7d85.tar.bz2
verbly-e3d5d30956434732fa99d390f927906742bf7d85.zip
Fixed reference to local address bug with gcc
Using the ternary operator appeared to cause a reference to local address bug with field::getConditionField. Replacing the ternary operator with an if statement fixes the problem. This problem did not occur with clang.
-rw-r--r--lib/field.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/field.h b/lib/field.h index 7451885..bec0618 100644 --- a/lib/field.h +++ b/lib/field.h
@@ -228,9 +228,12 @@ namespace verbly {
228 228
229 const field& getConditionField() const 229 const field& getConditionField() const
230 { 230 {
231 return (type_ == type::join_where) 231 if (type_ == type::join_where)
232 ? *conditionField_ 232 {
233 : throw std::domain_error("Only condition join fields have a condition field"); 233 return *conditionField_;
234 } else {
235 throw std::domain_error("Only condition join fields have a condition field");
236 }
234 } 237 }
235 238
236 int getConditionValue() const 239 int getConditionValue() const