[gtkmm] demos: Avoid a warning about a fallthrough.



commit 75a2ec3462feac301c07efbfc13623a650fc708b
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Feb 21 22:11:53 2018 +0100

    demos: Avoid a warning about a fallthrough.

 demos/gtk-demo/demowindow.cc |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/demowindow.cc b/demos/gtk-demo/demowindow.cc
index c0129e4..2e23d3b 100644
--- a/demos/gtk-demo/demowindow.cc
+++ b/demos/gtk-demo/demowindow.cc
@@ -355,6 +355,12 @@ void DemoWindow::load_file(const std::string& filename)
             p = lines[i];
             state++;
             /* Fall through */
+            // TODO: Replace with [[fallthrough]] annotation (to case 3)
+            // when we ue C++17.
+            /* Reading program body */
+            start = refBufferSource->insert(start, p);
+            start = refBufferSource->insert(start, "\n");
+            break;
           }
          else
            break;


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