diff --git a/tools/rosbag_storage/src/view.cpp b/tools/rosbag_storage/src/view.cpp index b388b4c1a4..31f8e46d74 100644 --- a/tools/rosbag_storage/src/view.cpp +++ b/tools/rosbag_storage/src/view.cpp @@ -1,9 +1,9 @@ // Copyright (c) 2009, Willow Garage, Inc. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright @@ -12,7 +12,7 @@ // * Neither the name of Willow Garage, Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -135,13 +135,13 @@ void View::iterator::increment() { if (view_->reduce_overlap_) { std::multiset::const_iterator last_iter = iters_.back().iter; - + while (iters_.back().iter == last_iter) { iters_.back().iter++; if (iters_.back().iter == iters_.back().range->end) iters_.pop_back(); - + std::sort(iters_.begin(), iters_.end(), ViewIterHelperCompare()); } @@ -150,7 +150,7 @@ void View::iterator::increment() { iters_.back().iter++; if (iters_.back().iter == iters_.back().range->end) iters_.pop_back(); - + std::sort(iters_.begin(), iters_.end(), ViewIterHelperCompare()); } } @@ -169,11 +169,11 @@ MessageInstance& View::iterator::dereference() const { View::View(bool const& reduce_overlap) : view_revision_(0), size_cache_(0), size_revision_(0), reduce_overlap_(reduce_overlap) { } View::View(Bag const& bag, ros::Time const& start_time, ros::Time const& end_time, bool const& reduce_overlap) : view_revision_(0), size_cache_(0), size_revision_(0), reduce_overlap_(reduce_overlap) { - addQuery(bag, start_time, end_time); + addQuery(bag, start_time, end_time); } View::View(Bag const& bag, boost::function query, ros::Time const& start_time, ros::Time const& end_time, bool const& reduce_overlap) : view_revision_(0), size_cache_(0), size_revision_(0), reduce_overlap_(reduce_overlap) { - addQuery(bag, query, start_time, end_time); + addQuery(bag, query, start_time, end_time); } View::~View() { @@ -226,7 +226,7 @@ View::iterator View::begin() { //! Default constructed iterator signifies end View::iterator View::end() { return iterator(this, true); } -uint32_t View::size() { +uint32_t View::size() { update(); @@ -249,7 +249,7 @@ void View::addQuery(Bag const& bag, ros::Time const& start_time, ros::Time const if ((bag.getMode() & bagmode::Read) != bagmode::Read) throw BagException("Bag not opened for reading"); - boost::function query = TrueQuery(); + boost::function query = TrueQuery(); queries_.push_back(new BagQuery(&bag, Query(query, start_time, end_time), bag.bag_revision_)); @@ -302,7 +302,7 @@ void View::updateQueries(BagQuery* q) { bool found = false; for (vector::iterator k = ranges_.begin(); k != ranges_.end(); k++) { MessageRange* r = *k; - + // If the topic and query are already in our ranges, we update if (r->bag_query == q && r->connection_info->id == connection->id) { r->begin = begin;