aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-11 14:17:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-21 15:40:00 +0200
commite5e44c6174c7b33aa9ae2f5b5ca45af40b37ec72 (patch)
treee041331f677093cad2a9837c5ee855b71dee94ab
parent16bab3c7af5502f6a32e896a2789cefb7ffcaa72 (diff)
Suppress empty lines
-rw-r--r--odb/emitter.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/odb/emitter.cxx b/odb/emitter.cxx
index 2989ffb..42b88b3 100644
--- a/odb/emitter.cxx
+++ b/odb/emitter.cxx
@@ -31,21 +31,24 @@ sync ()
s.resize (n - 1);
}
- // Temporary restore output diversion.
- //
- bool r (false);
- context& ctx (context::current ());
-
- if (ctx.os.rdbuf () == this)
+ if (!s.empty ())
{
- ctx.restore ();
- r = true;
- }
+ // Temporary restore output diversion.
+ //
+ bool r (false);
+ context& ctx (context::current ());
- e_.line (s);
+ if (ctx.os.rdbuf () == this)
+ {
+ ctx.restore ();
+ r = true;
+ }
- if (r)
- ctx.diverge (this);
+ e_.line (s);
+
+ if (r)
+ ctx.diverge (this);
+ }
str (string ());
return 0;