The following commit has been merged in the master branch:
commit fa5e87e990d3717f9d2a3288f9ca1872d5931c43
Author: Andrei Zavada <johnhom...@gmail.com>
Date:   Sun Jul 14 00:37:32 2013 +0300

    use enum class in place of bool for some args of cairo_draw_signal

diff --git a/src/aghermann/ui/libcommon.cc b/src/aghermann/ui/libcommon.cc
index 992c7a2..6ef69f0 100644
--- a/src/aghermann/ui/libcommon.cc
+++ b/src/aghermann/ui/libcommon.cc
@@ -194,8 +194,9 @@ cairo_draw_signal( cairo_t *cr, const valarray<TFloat>& V,
                   const size_t hspan, const float hoff, const float voff, 
const float scale,
                   const unsigned short decimate,
                   const aghui::TDrawSignalDirection direction,
-                  const bool continue_path)
+                  const aghui::TDrawSignalPathOption continue_path_option)
 {
+       bool continue_path = continue_path_option == TDrawSignalPathOption::yes;
        switch ( direction ) {
 
        case TDrawSignalDirection::forward:
diff --git a/src/aghermann/ui/sf/d/patterns-draw.cc 
b/src/aghermann/ui/sf/d/patterns-draw.cc
index 2fa672a..8975eb1 100644
--- a/src/aghermann/ui/sf/d/patterns-draw.cc
+++ b/src/aghermann/ui/sf/d/patterns-draw.cc
@@ -108,7 +108,7 @@ draw_thing( cairo_t *cr)
                                                  da_thing_wd, 0, zeroline, 
thing_display_scale);
                        aghui::cairo_draw_signal( cr, env_l, 0, env_l.size(),
                                                  da_thing_wd, 0, zeroline, 
thing_display_scale,
-                                                 1, 
aghui::TDrawSignalDirection::backward, true);
+                                                 1, 
aghui::TDrawSignalDirection::backward);
                        cairo_close_path( cr);
                        cairo_fill( cr);
                        cairo_stroke( cr);
@@ -178,8 +178,7 @@ draw_field( cairo_t *cr)
                        cr,
                        profile, 0, profile.size(),
                        da_field_wd, 0., da_field_ht/2,
-                       field_display_scale,
-                       1, TDrawSignalDirection::forward, true);
+                       field_display_scale);
                cairo_line_to( cr, da_field_wd, da_field_ht/2);
                cairo_line_to( cr, 0, da_field_ht/2);
                cairo_close_path( cr);
diff --git a/src/aghermann/ui/sf/montage.cc b/src/aghermann/ui/sf/montage.cc
index b45201f..22011a0 100644
--- a/src/aghermann/ui/sf/montage.cc
+++ b/src/aghermann/ui/sf/montage.cc
@@ -41,7 +41,7 @@ draw_signal( const valarray<TFloat>& signal,
                                  start - half_pad,
                                  end + half_pad,
                                  width, 0, vdisp, signal_display_scale,
-                                 resample_signal ? max((unsigned short)1, 
(unsigned short)spp()) : 1);
+                                 resample_signal ? max(1u, (unsigned)spp()) : 
1);
 }
 
 
@@ -293,7 +293,9 @@ draw_page( cairo_t *cr,
                                        aghui::cairo_draw_signal(
                                                cr, env_l, 0, env_l.size(),
                                                me-ma, ma, y0, 
signal_display_scale,
-                                               1, 
aghui::TDrawSignalDirection::backward, true);
+                                               1,
+                                               
aghui::TDrawSignalDirection::backward,
+                                               
aghui::TDrawSignalPathOption::yes);
                                        cairo_close_path( cr);
                                        cairo_fill( cr);
                                        cairo_stroke( cr);
diff --git a/src/aghermann/ui/ui.hh b/src/aghermann/ui/ui.hh
index faeb2a9..9bcbc6c 100644
--- a/src/aghermann/ui/ui.hh
+++ b/src/aghermann/ui/ui.hh
@@ -121,7 +121,8 @@ void gtk_cell_layout_set_renderer( GtkComboBox*);
 
 
 
-enum TDrawSignalDirection { forward, backward };
+enum class TDrawSignalDirection { forward, backward };
+enum class TDrawSignalPathOption { yes, no };
 
 void
 cairo_draw_signal( cairo_t*,
@@ -130,7 +131,7 @@ cairo_draw_signal( cairo_t*,
                   size_t da_wd, float hdisp, float vdisp, float display_scale,
                   unsigned short decimate = 1,
                   TDrawSignalDirection direction = 
TDrawSignalDirection::forward,
-                  bool continue_path = false);
+                  TDrawSignalPathOption continue_path = 
TDrawSignalPathOption::yes);
 void
 cairo_draw_envelope( cairo_t*,
                     const valarray<TFloat>&,
@@ -144,7 +145,7 @@ cairo_draw_signal( cairo_t *cr,
                   size_t width, double hdisp, double vdisp, float 
display_scale,
                   unsigned short decimate = 1,
                   TDrawSignalDirection direction = 
TDrawSignalDirection::forward,
-                  bool continue_path = false)
+                  TDrawSignalPathOption continue_path = 
TDrawSignalPathOption::yes)
 {
        valarray<TFloat> tmp (end - start); // avoid copying other rows, cols
        for ( ssize_t c = 0; c < (end-start); ++c )

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to