From e7ef2071e5f64e1a34201961592750a410060f1f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 16 Jul 2012 20:38:04 -0500 Subject: Streamline code and fix scope capture --- lib/libtqtrla/src/tqtrla.cpp | 50 ++++---------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) (limited to 'lib') diff --git a/lib/libtqtrla/src/tqtrla.cpp b/lib/libtqtrla/src/tqtrla.cpp index b3fc1ec..711804e 100644 --- a/lib/libtqtrla/src/tqtrla.cpp +++ b/lib/libtqtrla/src/tqtrla.cpp @@ -326,30 +326,9 @@ TQDataStream &operator<<( TQDataStream &s, const TQFloatArray &data ) { TQ_UINT32 i; TQ_UINT32 count = data.count(); s << count; - - TQIODevice* dev = s.device(); - if (dev) { - // This uses the channel efficiently by writing all the data in one large block - TQBuffer ba; - ba.open(IO_ReadWrite); - TQDataStream ds(&ba); - ds.setPrintableData(s.isPrintableData()); - - for (i=0; iwriteBlock(buffer.data(), buffer.size()); - } - else { - // This uses the channel inefficiently by writing the data in byte-sized chunks - for (i=0; iwriteBlock(buffer.data(), buffer.size()); - } - else { - // This uses the channel inefficiently by writing the data in byte-sized chunks - for (i=0; i