diff --git a/gtsam/base/FastVector.h b/gtsam/base/FastVector.h index 7d1cb970c..3616704f7 100644 --- a/gtsam/base/FastVector.h +++ b/gtsam/base/FastVector.h @@ -35,9 +35,7 @@ namespace gtsam { template class FastVector: public std::vector::type> { - -public: - + public: typedef std::vector::type> Base; @@ -66,13 +64,13 @@ public: } /** Copy constructor from the base class */ - FastVector(const Base& x) : + explicit FastVector(const Base& x) : Base(x) { } /** Copy constructor from a standard STL container */ template - FastVector(const std::vector& x) { + explicit FastVector(const std::vector& x) { // This if statement works around a bug in boost pool allocator and/or // STL vector where if the size is zero, the pool allocator will allocate // huge amounts of memory. @@ -85,14 +83,12 @@ public: return std::vector(this->begin(), this->end()); } -private: + private: /** Serialization function */ friend class boost::serialization::access; template void serialize(ARCHIVE & ar, const unsigned int /*version*/) { ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base); } - }; - -} +} // namespace gtsam