lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master aee673f 05/10: Fix defect introduced 20170205


From: Greg Chicares
Subject: [lmi-commits] [lmi] master aee673f 05/10: Fix defect introduced 20170205T2107Z: fixed the wrong problem
Date: Mon, 6 Feb 2017 04:10:56 +0000 (UTC)

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

    Fix defect introduced 20170205T2107Z: fixed the wrong problem
    
    There was no newline to remove. Only the code now copied from
    formatted_diagnostics() is wanted.
---
 input_sequence_entry.cpp |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/input_sequence_entry.cpp b/input_sequence_entry.cpp
index 18a1000..8ee719e 100644
--- a/input_sequence_entry.cpp
+++ b/input_sequence_entry.cpp
@@ -29,7 +29,6 @@
 #include "input.hpp"
 #include "input_seq_helpers.hpp"
 #include "input_sequence.hpp"
-#include "miscellany.hpp"               // rtrim()
 #include "mvc_controller.hpp"
 #include "numeric_io_cast.hpp"
 #include "value_cast.hpp"
@@ -1221,7 +1220,11 @@ wxString InputSequenceEditor::get_diagnostics_message()
         ,default_keyword_
         );
     std::string parser_diagnostics(sequence.formatted_diagnostics());
-    rtrim(parser_diagnostics, "\n");
+    std::string::size_type z(parser_diagnostics.find('\n'));
+    if(std::string::npos != z)
+        {
+        parser_diagnostics.erase(z);
+        }
     return wxString(parser_diagnostics.c_str());
 }
 
@@ -1562,7 +1565,11 @@ void InputSequenceEntry::DoOpenEditor()
         );
 
     std::string parser_diagnostics(sequence.formatted_diagnostics());
-    rtrim(parser_diagnostics, "\n");
+    std::string::size_type z(parser_diagnostics.find('\n'));
+    if(std::string::npos != z)
+        {
+        parser_diagnostics.erase(z);
+        }
     if(!parser_diagnostics.empty())
         {
         warning()



reply via email to

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