From 7ab609f1f1529e659f6f635f83c6537e838ccbfb Mon Sep 17 00:00:00 2001 From: Chuck Atkins <chuck.atkins@kitware.com> Date: Tue, 4 Apr 2017 11:02:01 -0400 Subject: [PATCH] Add consistent bracket initialization --- include/engine/bp/BPFileWriter.h | 4 ++-- source/core/Engine.cpp | 4 ++-- source/engine/bp/BPFileWriter.cpp | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/engine/bp/BPFileWriter.h b/include/engine/bp/BPFileWriter.h index 0465333b1..c016e7815 100644 --- a/include/engine/bp/BPFileWriter.h +++ b/include/engine/bp/BPFileWriter.h @@ -34,8 +34,8 @@ public: * @param method * @param debugMode */ - BPFileWriter(ADIOS &adios, const std::string name, - const std::string accessMode, MPI_Comm mpiComm, + BPFileWriter(ADIOS &adios, std::string name, + const std::string &accessMode, MPI_Comm mpiComm, const Method &method, const IOMode iomode = IOMode::INDEPENDENT, const float timeout_sec = 0., const bool debugMode = false, const unsigned int nthreads = 1); diff --git a/source/core/Engine.cpp b/source/core/Engine.cpp index 971c29df8..e6f3cc4ff 100644 --- a/source/core/Engine.cpp +++ b/source/core/Engine.cpp @@ -22,8 +22,8 @@ Engine::Engine(ADIOS &adios, std::string engineType, std::string name, bool debugMode, unsigned int nthreads, std::string endMessage) : m_MPIComm{mpiComm}, m_EngineType{std::move(engineType)}, m_Name{std::move(name)}, m_AccessMode{std::move(accessMode)}, - m_Method{method}, m_ADIOS(adios), m_DebugMode{debugMode}, - m_nThreads{nthreads}, m_EndMessage(std::move(endMessage)) + m_Method{method}, m_ADIOS{adios}, m_DebugMode{debugMode}, + m_nThreads{nthreads}, m_EndMessage{std::move(endMessage)} { if (m_DebugMode == true) { diff --git a/source/engine/bp/BPFileWriter.cpp b/source/engine/bp/BPFileWriter.cpp index 14f0d149b..d8a4cea5a 100644 --- a/source/engine/bp/BPFileWriter.cpp +++ b/source/engine/bp/BPFileWriter.cpp @@ -7,6 +7,7 @@ * Created on: Dec 19, 2016 * Author: wfg */ +#include <utility> #include "engine/bp/BPFileWriter.h" #include "ADIOS.h" @@ -19,14 +20,15 @@ namespace adios { -BPFileWriter::BPFileWriter(ADIOS &adios, const std::string name, - const std::string accessMode, MPI_Comm mpiComm, +BPFileWriter::BPFileWriter(ADIOS &adios, std::string name, + const std::string &accessMode, MPI_Comm mpiComm, const Method &method, const IOMode /*iomode*/, const float /*timeout_sec*/, const bool debugMode, const unsigned int nthreads) -: Engine(adios, "BPFileWriter", name, accessMode, mpiComm, method, debugMode, - nthreads, " BPFileWriter constructor (or call to ADIOS Open).\n"), - m_Buffer{capsule::STLVector(accessMode, m_RankMPI, m_DebugMode)}, +: Engine{adios, "BPFileWriter", std::move(name), accessMode, mpiComm, method, + debugMode, nthreads, + " BPFileWriter constructor (or call to ADIOS Open).\n"}, + m_Buffer{capsule::STLVector{accessMode, m_RankMPI, m_DebugMod}}, m_BP1Aggregator{format::BP1Aggregator(m_MPIComm, debugMode)}, m_MaxBufferSize{m_Buffer.m_Data.max_size()} { -- GitLab