From e3d5d30956434732fa99d390f927906742bf7d85 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 3 Feb 2017 16:59:18 -0500 Subject: 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. --- lib/field.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib') 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 { const field& getConditionField() const { - return (type_ == type::join_where) - ? *conditionField_ - : throw std::domain_error("Only condition join fields have a condition field"); + if (type_ == type::join_where) + { + return *conditionField_; + } else { + throw std::domain_error("Only condition join fields have a condition field"); + } } int getConditionValue() const -- cgit 1.4.1