lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 691605d 2/4: Avoid confusion: string literal


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 691605d 2/4: Avoid confusion: string literal was identical to member name
Date: Fri, 3 Feb 2017 13:40:57 +0000 (UTC)

branch: master
commit 691605d8f5c650be1b5bb758508c9525d32f1af3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Avoid confusion: string literal was identical to member name
    
    Initializing
      ValueInterval::value_keyword to "insane", and
      ValueInterval::insane        to 'true'
    left one wondering whether the two were physically related.
    
    Making them clearly different removed an obstacle to comprehension.
---
 input_sequence.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/input_sequence.cpp b/input_sequence.cpp
index e62f94a..aefeb0b 100644
--- a/input_sequence.cpp
+++ b/input_sequence.cpp
@@ -353,7 +353,7 @@ void InputSequence::realize_vector()
                 << LMI_FLUSH
                 ;
             }
-        if(interval_i.value_is_keyword && "insane" == interval_i.value_keyword)
+        if(interval_i.value_is_keyword && "daft" == interval_i.value_keyword)
             {
             fatal_error()
                 << "Interval "
@@ -818,7 +818,7 @@ void SequenceParser::sequence()
     // them to recognizable, implausible values. Set the 'insane'
     // flag: assume the sequence is insane until known otherwise.
     current_interval.value_number     = -999999999999.999;
-    current_interval.value_keyword    = "insane";
+    current_interval.value_keyword    = "daft";
     current_interval.value_is_keyword = true;
     current_interval.begin_duration   = -1;
     current_interval.begin_mode       = e_invalid_mode;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]