From 349ee4657e34a8ae980b985be81f5d1cc27fd3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Thu, 5 Jul 2018 14:01:09 +0200 Subject: [PATCH] WindowedArray: Switch to Explicitly Using vector Suggested by: [at]joakim-hove and [at]atgeirr --- opm/output/eclipse/WindowedArray.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/opm/output/eclipse/WindowedArray.hpp b/opm/output/eclipse/WindowedArray.hpp index 60c1cab7b..1c87ca371 100644 --- a/opm/output/eclipse/WindowedArray.hpp +++ b/opm/output/eclipse/WindowedArray.hpp @@ -32,17 +32,14 @@ namespace Opm { namespace RestartIO { namespace Helpers { template class WindowedArray { - private: - using Vector = std::vector; - public: using WriteWindow = boost::iterator_range< - typename Vector::iterator>; + typename std::vector::iterator>; using ReadWindow = boost::iterator_range< - typename Vector::const_iterator>; + typename std::vector::const_iterator>; - using Idx = typename Vector::size_type; + using Idx = typename std::vector::size_type; struct NumWindows { Idx value; }; struct WindowSize { Idx value; }; @@ -84,12 +81,12 @@ namespace Opm { namespace RestartIO { namespace Helpers { return { b, e }; } - const Vector& data() const + const std::vector& data() const { return this->x_; } - Vector getDataDestructively() + std::vector getDataDestructively() { return std::move(this->x_); }