summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-19 18:16:50 +0000
committerDavid Robillard <d@drobilla.net>2008-09-19 18:16:50 +0000
commitf201dc3e3c06f888f097ed6d378a597e99e244fd (patch)
tree01502833cdf1e36eb164e2114574871387f0150b /gtk2_ardour/editor_ops.cc
parent48a8363080c0b9c79ace0b0b70943ed4ce074d26 (diff)
Fix a bunch of stupid warnings.
Q: What's a lot harder than initializing a variable? A: Fixing future non-deterministic bugs that would have been deterministic if you initialized the damn variable :) git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3767 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index e3d2f88a20..139e07a366 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3257,9 +3257,9 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
return;
}
- nframes64_t distance;
+ nframes64_t distance = 0;
nframes64_t pos = 0;
- int dir;
+ int dir = 1;
list<RegionView*> sorted;
rs.by_position (sorted);
@@ -3271,7 +3271,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
pos = position;
if (position > r->position()) {
distance = position - r->position();
- dir = 1;
} else {
distance = r->position() - position;
dir = -1;
@@ -3282,7 +3281,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
if (position > r->last_frame()) {
distance = position - r->last_frame();
pos = r->position() + distance;
- dir = 1;
} else {
distance = r->last_frame() - position;
pos = r->position() - distance;
@@ -3294,7 +3292,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
pos = r->adjust_to_sync (position);
if (pos > r->position()) {
distance = pos - r->position();
- dir = 1;
} else {
distance = r->position() - pos;
dir = -1;
@@ -4740,7 +4737,7 @@ Editor::toggle_fade_active (bool in)
const char* cmd = (in ? _("toggle fade in active") : _("toggle fade out active"));
bool have_switch = false;
- bool yn;
+ bool yn = false;
begin_reversible_command (cmd);