From 3c2937982167fbd88a79a43e85acfaf14f0514b7 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 16 Mar 2011 17:36:48 +0100 Subject: [PATCH] [Positioning] InputCSV: use read_point3d() Use CSVFileReader::read_point3d() to read the coordinates, instead of reading 3 floats. --- owlps-positioning/src/inputcsv.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/owlps-positioning/src/inputcsv.cc b/owlps-positioning/src/inputcsv.cc index 7b58df8..254da16 100644 --- a/owlps-positioning/src/inputcsv.cc +++ b/owlps-positioning/src/inputcsv.cc @@ -54,14 +54,13 @@ const Request& InputCSV::get_next_request() current_request->set_time_sent(timestamp) ; // Read position fields - float pos[3] ; - for (int i = 0 ; i < 3 ; ++i) - if (! file.read_field(pos[i])) - { - // Wrong number of fields: blank current request - current_request->clear() ; - return *current_request ; - } + Point3D pos ; + if (! file.read_point3d(pos)) + { + // Wrong number of fields: blank current request + current_request->clear() ; + return *current_request ; + } // Read direction field Direction direction ;