From 56f64b09a0efde4d809abcdd4d3f84a85e989d26 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Fri, 23 Oct 2015 16:00:16 +0200 Subject: [PATCH] Replace boost::shared_ptr with std::shared_ptr Now that we can use them, C++11 smart pointers are probably less hassle. Since boost::exception hard-codes the use of boost::shared_ptr, we can't remove boost:shared_ptr yet. Added a missing include for std::max Change-Id: Iafe8dee8e7f5f952c2680979607428f02aedf98d --- src/gromacs/analysisdata/abstractdata.cpp | 2 +- src/gromacs/analysisdata/abstractdata.h | 4 ++-- src/gromacs/analysisdata/modules/average.h | 6 +++--- src/gromacs/analysisdata/modules/displacement.h | 6 +++--- src/gromacs/analysisdata/modules/histogram.cpp | 4 ++-- src/gromacs/analysisdata/modules/histogram.h | 6 +++--- src/gromacs/analysisdata/modules/lifetime.cpp | 3 ++- src/gromacs/analysisdata/modules/lifetime.h | 4 ++-- src/gromacs/analysisdata/modules/plot.h | 7 +++---- src/gromacs/analysisdata/tests/mock_datamodule.h | 5 +++-- src/gromacs/commandline/cmdlineoptionsmodule.cpp | 2 ++ src/gromacs/commandline/cmdlineoptionsmodule.h | 4 +--- src/gromacs/commandline/pargs.cpp | 2 +- src/gromacs/onlinehelp/helpwritercontext.cpp | 4 +--- src/gromacs/options/behaviorcollection.h | 5 ++--- src/gromacs/selection/nbsearch.h | 7 +++---- src/gromacs/selection/parsetree.cpp | 1 - src/gromacs/selection/selectioncollection.cpp | 7 +++---- src/gromacs/selection/selelem.h | 5 ++--- src/gromacs/selection/sm_keywords.cpp | 5 ++--- src/gromacs/trajectoryanalysis/cmdlinerunner.cpp | 4 ++-- src/gromacs/trajectoryanalysis/modules/select.cpp | 2 +- src/gromacs/utility/exceptions.cpp | 4 ++-- src/gromacs/utility/nodelete.h | 8 ++++---- src/gromacs/utility/textreader.h | 2 +- src/gromacs/utility/textstream.h | 6 +++--- src/gromacs/utility/textwriter.h | 2 +- src/testutils/refdata.cpp | 2 +- src/testutils/refdata.h | 5 ++--- src/testutils/testfileredirector.cpp | 5 ++--- 30 files changed, 60 insertions(+), 69 deletions(-) diff --git a/src/gromacs/analysisdata/abstractdata.cpp b/src/gromacs/analysisdata/abstractdata.cpp index 0410d3ff62..9243b84d9d 100644 --- a/src/gromacs/analysisdata/abstractdata.cpp +++ b/src/gromacs/analysisdata/abstractdata.cpp @@ -176,7 +176,7 @@ AbstractAnalysisData::addColumnModule(int col, int span, { GMX_RELEASE_ASSERT(col >= 0 && span >= 1, "Invalid columns specified for a column module"); - boost::shared_ptr proxy( + std::shared_ptr proxy( new AnalysisDataProxy(col, span, this)); proxy->addModule(module); addModule(proxy); diff --git a/src/gromacs/analysisdata/abstractdata.h b/src/gromacs/analysisdata/abstractdata.h index ac3a9224d2..b4a15e6d25 100644 --- a/src/gromacs/analysisdata/abstractdata.h +++ b/src/gromacs/analysisdata/abstractdata.h @@ -43,7 +43,7 @@ #ifndef GMX_ANALYSISDATA_ABSTRACTDATA_H #define GMX_ANALYSISDATA_ABSTRACTDATA_H -#include +#include #include "gromacs/utility/classhelpers.h" @@ -57,7 +57,7 @@ class AnalysisDataPointSetRef; class IAnalysisDataModule; //! Smart pointer for managing a generic analysis data module. -typedef boost::shared_ptr AnalysisDataModulePointer; +typedef std::shared_ptr AnalysisDataModulePointer; /*! \brief * Abstract base class for all objects that provide data. diff --git a/src/gromacs/analysisdata/modules/average.h b/src/gromacs/analysisdata/modules/average.h index 2bf12e2f04..a6a26eb3dd 100644 --- a/src/gromacs/analysisdata/modules/average.h +++ b/src/gromacs/analysisdata/modules/average.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -142,7 +142,7 @@ class AnalysisDataAverageModule : public AbstractAnalysisArrayData, }; //! Smart pointer to manage an AnalysisDataAverageModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataAverageModulePointer; /*! \brief @@ -188,7 +188,7 @@ class AnalysisDataFrameAverageModule : public AbstractAnalysisData, }; //! Smart pointer to manage an AnalysisDataFrameAverageModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataFrameAverageModulePointer; } // namespace gmx diff --git a/src/gromacs/analysisdata/modules/displacement.h b/src/gromacs/analysisdata/modules/displacement.h index 398acf11ad..966be18b44 100644 --- a/src/gromacs/analysisdata/modules/displacement.h +++ b/src/gromacs/analysisdata/modules/displacement.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -82,7 +82,7 @@ class AnalysisDataDisplacementModule : public AbstractAnalysisData, * * If this function is not called, no histogram is calculated. */ - void setMSDHistogram(boost::shared_ptr histm); + void setMSDHistogram(std::shared_ptr histm); virtual int flags() const; @@ -102,7 +102,7 @@ class AnalysisDataDisplacementModule : public AbstractAnalysisData, }; //! Smart pointer to manage an AnalysisDataDisplacementModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataDisplacementModulePointer; } // namespace gmx diff --git a/src/gromacs/analysisdata/modules/histogram.cpp b/src/gromacs/analysisdata/modules/histogram.cpp index 3af98c8870..1baa1dc0d7 100644 --- a/src/gromacs/analysisdata/modules/histogram.cpp +++ b/src/gromacs/analysisdata/modules/histogram.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -540,7 +540,7 @@ class BasicHistogramImpl { public: //! Smart pointer to manage an BasicAverageHistogramModule object. - typedef boost::shared_ptr + typedef std::shared_ptr BasicAverageHistogramModulePointer; BasicHistogramImpl(); diff --git a/src/gromacs/analysisdata/modules/histogram.h b/src/gromacs/analysisdata/modules/histogram.h index 19a40b061b..43a4b72b68 100644 --- a/src/gromacs/analysisdata/modules/histogram.h +++ b/src/gromacs/analysisdata/modules/histogram.h @@ -528,13 +528,13 @@ class AnalysisDataBinAverageModule : public AbstractAnalysisArrayData, }; //! Smart pointer to manage an AnalysisDataSimpleHistogramModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataSimpleHistogramModulePointer; //! Smart pointer to manage an AnalysisDataWeightedHistogramModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataWeightedHistogramModulePointer; //! Smart pointer to manage an AnalysisDataBinAverageModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataBinAverageModulePointer; } // namespace gmx diff --git a/src/gromacs/analysisdata/modules/lifetime.cpp b/src/gromacs/analysisdata/modules/lifetime.cpp index b375fcf5b8..1c64c4d517 100644 --- a/src/gromacs/analysisdata/modules/lifetime.cpp +++ b/src/gromacs/analysisdata/modules/lifetime.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -45,6 +45,7 @@ #include +#include #include #include diff --git a/src/gromacs/analysisdata/modules/lifetime.h b/src/gromacs/analysisdata/modules/lifetime.h index 728b956831..771719ef27 100644 --- a/src/gromacs/analysisdata/modules/lifetime.h +++ b/src/gromacs/analysisdata/modules/lifetime.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -107,7 +107,7 @@ class AnalysisDataLifetimeModule : public AbstractAnalysisArrayData, }; //! Smart pointer to manage an AnalysisDataLifetimeModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataLifetimeModulePointer; } // namespace gmx diff --git a/src/gromacs/analysisdata/modules/plot.h b/src/gromacs/analysisdata/modules/plot.h index 2eb8b82159..5887c080c8 100644 --- a/src/gromacs/analysisdata/modules/plot.h +++ b/src/gromacs/analysisdata/modules/plot.h @@ -43,10 +43,9 @@ #ifndef GMX_ANALYSISDATA_MODULES_PLOT_H #define GMX_ANALYSISDATA_MODULES_PLOT_H +#include #include -#include - #include "gromacs/analysisdata/datamodule.h" #include "gromacs/options/timeunitmanager.h" #include "gromacs/utility/classhelpers.h" @@ -327,10 +326,10 @@ class AnalysisDataVectorPlotModule : public AbstractPlotModule }; //! Smart pointer to manage an AnalysisDataPlotModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataPlotModulePointer; //! Smart pointer to manage an AnalysisDataVectorPlotModule object. -typedef boost::shared_ptr +typedef std::shared_ptr AnalysisDataVectorPlotModulePointer; } // namespace gmx diff --git a/src/gromacs/analysisdata/tests/mock_datamodule.h b/src/gromacs/analysisdata/tests/mock_datamodule.h index 584804fac2..41c69cd846 100644 --- a/src/gromacs/analysisdata/tests/mock_datamodule.h +++ b/src/gromacs/analysisdata/tests/mock_datamodule.h @@ -45,7 +45,8 @@ #ifndef GMX_ANALYSISDATA_TESTS_MOCK_DATAMODULE_H #define GMX_ANALYSISDATA_TESTS_MOCK_DATAMODULE_H -#include +#include + #include #include "gromacs/analysisdata/dataframe.h" @@ -98,7 +99,7 @@ class MockAnalysisDataModule : public IAnalysisDataModule }; //! Smart pointer to manage an MockAnalysisDataModule object. -typedef boost::shared_ptr +typedef std::shared_ptr MockAnalysisDataModulePointer; } // namespace test diff --git a/src/gromacs/commandline/cmdlineoptionsmodule.cpp b/src/gromacs/commandline/cmdlineoptionsmodule.cpp index e855b3f578..ed87db9542 100644 --- a/src/gromacs/commandline/cmdlineoptionsmodule.cpp +++ b/src/gromacs/commandline/cmdlineoptionsmodule.cpp @@ -43,6 +43,8 @@ #include "cmdlineoptionsmodule.h" +#include + #include "gromacs/commandline/cmdlinehelpwriter.h" #include "gromacs/commandline/cmdlinemodulemanager.h" #include "gromacs/commandline/cmdlineparser.h" diff --git a/src/gromacs/commandline/cmdlineoptionsmodule.h b/src/gromacs/commandline/cmdlineoptionsmodule.h index 0a4ab4e2df..9cc1f73bdf 100644 --- a/src/gromacs/commandline/cmdlineoptionsmodule.h +++ b/src/gromacs/commandline/cmdlineoptionsmodule.h @@ -46,8 +46,6 @@ #include #include -#include - #include "gromacs/commandline/cmdlinemodule.h" namespace gmx @@ -103,7 +101,7 @@ class ICommandLineOptionsModuleSettings * as owned by the options module after this call. */ virtual void addOptionsBehavior( - const boost::shared_ptr &behavior) = 0; + const std::shared_ptr &behavior) = 0; protected: // Disallow deletion through the interface. diff --git a/src/gromacs/commandline/pargs.cpp b/src/gromacs/commandline/pargs.cpp index c83b67a5d1..8fd3da8f47 100644 --- a/src/gromacs/commandline/pargs.cpp +++ b/src/gromacs/commandline/pargs.cpp @@ -530,7 +530,7 @@ gmx_bool parse_common_args(int *argc, char *argv[], unsigned long Flags, gmx::TimeUnit timeUnit = gmx::TimeUnit_Default; if (FF(PCA_TIME_UNIT)) { - boost::shared_ptr timeUnitBehavior( + std::shared_ptr timeUnitBehavior( new gmx::TimeUnitBehavior()); timeUnitBehavior->setTimeUnitStore(&timeUnit); timeUnitBehavior->setTimeUnitFromEnvironment(); diff --git a/src/gromacs/onlinehelp/helpwritercontext.cpp b/src/gromacs/onlinehelp/helpwritercontext.cpp index 839c979f40..3821358b07 100644 --- a/src/gromacs/onlinehelp/helpwritercontext.cpp +++ b/src/gromacs/onlinehelp/helpwritercontext.cpp @@ -50,8 +50,6 @@ #include #include -#include - #include "gromacs/onlinehelp/helpformat.h" #include "gromacs/utility/exceptions.h" #include "gromacs/utility/gmxassert.h" @@ -492,7 +490,7 @@ class HelpWriterContext::Impl }; //! Smart pointer type for managing the shared state. - typedef boost::shared_ptr StatePointer; + typedef std::shared_ptr StatePointer; //! Shorthand for a list of markup/other replacements. typedef std::vector ReplaceList; diff --git a/src/gromacs/options/behaviorcollection.h b/src/gromacs/options/behaviorcollection.h index db73944c1b..8652aa963b 100644 --- a/src/gromacs/options/behaviorcollection.h +++ b/src/gromacs/options/behaviorcollection.h @@ -43,10 +43,9 @@ #ifndef GMX_OPTIONS_BEHAVIORCOLLECTION_H #define GMX_OPTIONS_BEHAVIORCOLLECTION_H +#include #include -#include - #include "gromacs/utility/classhelpers.h" namespace gmx @@ -56,7 +55,7 @@ class IOptionsBehavior; class Options; //! Smart pointer for behaviors stored in OptionsBehaviorCollection. -typedef boost::shared_ptr OptionsBehaviorPointer; +typedef std::shared_ptr OptionsBehaviorPointer; /*! \libinternal \brief * Container for IOptionsBehavior objects. diff --git a/src/gromacs/selection/nbsearch.h b/src/gromacs/selection/nbsearch.h index 062d9b0258..34c89467ff 100644 --- a/src/gromacs/selection/nbsearch.h +++ b/src/gromacs/selection/nbsearch.h @@ -48,10 +48,9 @@ #ifndef GMX_SELECTION_NBSEARCH_H #define GMX_SELECTION_NBSEARCH_H +#include #include -#include - #include "gromacs/math/vec.h" #include "gromacs/math/vectypes.h" #include "gromacs/utility/arrayref.h" @@ -433,7 +432,7 @@ class AnalysisNeighborhoodSearch * AnalysisNeighborhood object. Ownership currently always stays with * AnalysisNeighborhood; it always keeps one instance of the pointer. */ - typedef boost::shared_ptr + typedef std::shared_ptr ImplPointer; /*! \brief @@ -557,7 +556,7 @@ class AnalysisNeighborhoodPairSearch * See AnalysisNeighborhoodSearch::ImplPointer for rationale of using * shared_ptr and ownership semantics. */ - typedef boost::shared_ptr + typedef std::shared_ptr ImplPointer; /*! \brief diff --git a/src/gromacs/selection/parsetree.cpp b/src/gromacs/selection/parsetree.cpp index 197d6b5f57..62e77c9f4d 100644 --- a/src/gromacs/selection/parsetree.cpp +++ b/src/gromacs/selection/parsetree.cpp @@ -228,7 +228,6 @@ #include #include -#include #include "gromacs/selection/selection.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/selection/selectioncollection.cpp b/src/gromacs/selection/selectioncollection.cpp index ffeb6d90f8..29587ec9b5 100644 --- a/src/gromacs/selection/selectioncollection.cpp +++ b/src/gromacs/selection/selectioncollection.cpp @@ -46,11 +46,10 @@ #include #include +#include #include #include -#include - #include "gromacs/fileio/trx.h" #include "gromacs/onlinehelp/helpmanager.h" #include "gromacs/onlinehelp/helpwritercontext.h" @@ -328,13 +327,13 @@ void printHelp(TextWriter *writer, gmx_ana_selcollection_t *sc, SelectionList runParser(yyscan_t scanner, TextInputStream *inputStream, bool bInteractive, int maxnr, const std::string &context) { - boost::shared_ptr scannerGuard(scanner, &_gmx_sel_free_lexer); + std::shared_ptr scannerGuard(scanner, &_gmx_sel_free_lexer); gmx_ana_selcollection_t *sc = _gmx_sel_lexer_selcollection(scanner); gmx_ana_indexgrps_t *grps = _gmx_sel_lexer_indexgrps(scanner); size_t oldCount = sc->sel.size(); { - boost::shared_ptr<_gmx_sel_yypstate> parserState( + std::shared_ptr<_gmx_sel_yypstate> parserState( _gmx_sel_yypstate_new(), &_gmx_sel_yypstate_delete); if (bInteractive) { diff --git a/src/gromacs/selection/selelem.h b/src/gromacs/selection/selelem.h index cb23dd0b99..62838a5d09 100644 --- a/src/gromacs/selection/selelem.h +++ b/src/gromacs/selection/selelem.h @@ -49,10 +49,9 @@ #ifndef GMX_SELECTION_SELELEM_H #define GMX_SELECTION_SELELEM_H +#include #include -#include - #include "gromacs/selection/indexutil.h" #include "gromacs/utility/classhelpers.h" #include "gromacs/utility/real.h" @@ -73,7 +72,7 @@ namespace gmx class SelectionTreeElement; //! Smart pointer type for selection tree element pointers. -typedef boost::shared_ptr SelectionTreeElementPointer; +typedef std::shared_ptr SelectionTreeElementPointer; } // namespace gmx /********************************************************************/ diff --git a/src/gromacs/selection/sm_keywords.cpp b/src/gromacs/selection/sm_keywords.cpp index 4755029122..5dbfc1833b 100644 --- a/src/gromacs/selection/sm_keywords.cpp +++ b/src/gromacs/selection/sm_keywords.cpp @@ -45,10 +45,9 @@ #include #include +#include #include -#include - #include "gromacs/selection/position.h" #include "gromacs/utility/arraysize.h" #include "gromacs/utility/cstringutil.h" @@ -255,7 +254,7 @@ class StringKeywordMatchItem //! The raw string passed for the matcher. std::string str_; //! Regular expression compiled from \p str_, if applicable. - boost::shared_ptr regex_; + std::shared_ptr regex_; }; /*! \internal \brief diff --git a/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp b/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp index eec263898b..a639844e5c 100644 --- a/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp +++ b/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp @@ -93,9 +93,9 @@ class RunnerModule : public ICommandLineOptionsModule void RunnerModule::initOptions( IOptionsContainer *options, ICommandLineOptionsModuleSettings *settings) { - boost::shared_ptr timeUnitBehavior( + std::shared_ptr timeUnitBehavior( new TimeUnitBehavior()); - boost::shared_ptr selectionOptionBehavior( + std::shared_ptr selectionOptionBehavior( new SelectionOptionBehavior(&selections_, common_.topologyProvider())); settings->addOptionsBehavior(timeUnitBehavior); diff --git a/src/gromacs/trajectoryanalysis/modules/select.cpp b/src/gromacs/trajectoryanalysis/modules/select.cpp index 98a8ab0bec..7cacecd891 100644 --- a/src/gromacs/trajectoryanalysis/modules/select.cpp +++ b/src/gromacs/trajectoryanalysis/modules/select.cpp @@ -526,7 +526,7 @@ Select::initAnalysis(const TrajectoryAnalysisSettings &settings, } if (!fnNdx_.empty()) { - boost::shared_ptr writer(new IndexFileWriterModule()); + std::shared_ptr writer(new IndexFileWriterModule()); writer->setFileName(fnNdx_); for (size_t g = 0; g < sel_.size(); ++g) { diff --git a/src/gromacs/utility/exceptions.cpp b/src/gromacs/utility/exceptions.cpp index 365a4e43b8..8d0e61e32a 100644 --- a/src/gromacs/utility/exceptions.cpp +++ b/src/gromacs/utility/exceptions.cpp @@ -45,11 +45,11 @@ #include +#include #include #include #include -#include #include #include "thread_mpi/system_error.h" @@ -120,7 +120,7 @@ class ErrorMessage private: std::string text_; - boost::shared_ptr child_; + std::shared_ptr child_; }; /*! \internal \brief diff --git a/src/gromacs/utility/nodelete.h b/src/gromacs/utility/nodelete.h index 7f9fe0c454..c2abd48132 100644 --- a/src/gromacs/utility/nodelete.h +++ b/src/gromacs/utility/nodelete.h @@ -34,7 +34,7 @@ */ /*! \libinternal \file * \brief - * Declares no_delete deleter for boost::shared_ptr. + * Declares no_delete deleter for std::shared_ptr. * * \author Teemu Murtola * \inlibraryapi @@ -47,13 +47,13 @@ namespace gmx { /*! \libinternal \brief - * Deleter for boost::shared_ptr that does nothing. + * Deleter for std::shared_ptr that does nothing. * * This is useful for cases where a class needs to keep a reference to another * class, and optionally also manage the lifetime of that other class. * The simplest construct (that does not force all callers to use heap - * allocation and boost::shared_ptr for the referenced class) is to use a - * single boost::shared_ptr to hold that reference, and use no_delete as the + * allocation and std::shared_ptr for the referenced class) is to use a + * single std::shared_ptr to hold that reference, and use no_delete as the * deleter if the lifetime is managed externally. * * \inlibraryapi diff --git a/src/gromacs/utility/textreader.h b/src/gromacs/utility/textreader.h index 7b3f8e54e2..3d425ec9d1 100644 --- a/src/gromacs/utility/textreader.h +++ b/src/gromacs/utility/textreader.h @@ -101,7 +101,7 @@ class TextReader * * This constructor is provided for convenience for cases where the * stream is not allocated with `new` and/or not managed by a - * boost::shared_ptr (e.g., if the stream is an object on the stack). + * std::shared_ptr (e.g., if the stream is an object on the stack). */ explicit TextReader(TextInputStream *stream); /*! \brief diff --git a/src/gromacs/utility/textstream.h b/src/gromacs/utility/textstream.h index 14fbfd410b..a6e522bd8c 100644 --- a/src/gromacs/utility/textstream.h +++ b/src/gromacs/utility/textstream.h @@ -43,7 +43,7 @@ #ifndef GMX_UTILITY_TEXTSTREAM_H #define GMX_UTILITY_TEXTSTREAM_H -#include +#include namespace gmx { @@ -139,9 +139,9 @@ class TextOutputStream }; //! Shorthand for a smart pointer to a TextInputStream. -typedef boost::shared_ptr TextInputStreamPointer; +typedef std::shared_ptr TextInputStreamPointer; //! Shorthand for a smart pointer to a TextOutputStream. -typedef boost::shared_ptr TextOutputStreamPointer; +typedef std::shared_ptr TextOutputStreamPointer; } // namespace gmx diff --git a/src/gromacs/utility/textwriter.h b/src/gromacs/utility/textwriter.h index 5f700830f0..e843fdc158 100644 --- a/src/gromacs/utility/textwriter.h +++ b/src/gromacs/utility/textwriter.h @@ -120,7 +120,7 @@ class TextWriter * * This constructor is provided for convenience for cases where the * stream is not allocated with `new` and/or not managed by a - * boost::shared_ptr (e.g., if the stream is an object on the stack). + * std::shared_ptr (e.g., if the stream is an object on the stack). */ explicit TextWriter(TextOutputStream *stream); /*! \brief diff --git a/src/testutils/refdata.cpp b/src/testutils/refdata.cpp index 70bb28afe3..04c082fc2a 100644 --- a/src/testutils/refdata.cpp +++ b/src/testutils/refdata.cpp @@ -137,7 +137,7 @@ namespace { //! Convenience typedef for a smart pointer to TestReferenceDataImpl. -typedef boost::shared_ptr +typedef std::shared_ptr TestReferenceDataImplPointer; /*! \brief diff --git a/src/testutils/refdata.h b/src/testutils/refdata.h index 58d194b91f..72e9d3c61e 100644 --- a/src/testutils/refdata.h +++ b/src/testutils/refdata.h @@ -46,10 +46,9 @@ #define GMX_TESTUTILS_REFDATA_H #include +#include #include -#include - #include "gromacs/utility/basedefinitions.h" #include "gromacs/utility/classhelpers.h" @@ -207,7 +206,7 @@ class TestReferenceData TestReferenceChecker rootChecker(); private: - boost::shared_ptr impl_; + std::shared_ptr impl_; GMX_DISALLOW_COPY_AND_ASSIGN(TestReferenceData); }; diff --git a/src/testutils/testfileredirector.cpp b/src/testutils/testfileredirector.cpp index 66e1823266..5844d99966 100644 --- a/src/testutils/testfileredirector.cpp +++ b/src/testutils/testfileredirector.cpp @@ -43,13 +43,12 @@ #include "testfileredirector.h" +#include #include #include #include #include -#include - #include "gromacs/utility/stringstream.h" #include "testutils/stringtest.h" @@ -95,7 +94,7 @@ bool TestFileInputRedirector::fileExists(const char *filename, class TestFileOutputRedirector::Impl { public: - typedef boost::shared_ptr StringStreamPointer; + typedef std::shared_ptr StringStreamPointer; typedef std::pair FileListEntry; StringStreamPointer stdoutStream_; -- 2.11.4.GIT