set_target_properties(libgromacs PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};--checks=\
-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-core.NullDereference,\
bugprone-*,misc-*,readability-*,performance-*,mpi-*,\
- -misc-misplaced-widening-cast,-readability-named-parameter,-performance-noexcept-move-constructor,\
- -readability-misleading-indentation,-misc-suspicious-string-compare,\
+ -misc-misplaced-widening-cast,-readability-named-parameter,\
+ -misc-suspicious-string-compare,\
-readability-redundant-control-flow,-performance-unnecessary-value-param,\
-readability-static-definition-in-anonymous-namespace,-misc-suspicious-missing-comma,\
-readability-redundant-member-init,-misc-misplaced-const,\
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, 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.
{
}
-CommandLineHelpContext::CommandLineHelpContext(CommandLineHelpContext &&other)
+CommandLineHelpContext::CommandLineHelpContext(CommandLineHelpContext &&other) noexcept
: impl_(std::move(other.impl_))
{
}
CommandLineHelpContext &CommandLineHelpContext::operator=(
- CommandLineHelpContext &&other)
+ CommandLineHelpContext &&other) noexcept
{
impl_ = std::move(other.impl_);
return *this;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2018, 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.
//! Creates a copy of the context.
explicit CommandLineHelpContext(const CommandLineHelpContext &other);
//! Moves the context.
- CommandLineHelpContext(CommandLineHelpContext &&other);
+ CommandLineHelpContext(CommandLineHelpContext &&other) noexcept;
//! Move-assigns the context.
- CommandLineHelpContext &operator=(CommandLineHelpContext &&other);
+ CommandLineHelpContext &operator=(CommandLineHelpContext &&other) noexcept;
~CommandLineHelpContext();
/*! \brief
fr->not_ok = DATA_NOT_OK;
}
}
- else
- if (!bOK)
+ else if (!bOK)
{
fr->not_ok = HEADER_NOT_OK;
}
rr1 += dx;
rr2 += dx;
}
- else
- if (bFW)
+ else if (bFW)
{
rr1 += dx;
rr2 += dy;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
switch (status)
{
/* expect a number */
- case sBefore: if (std::isdigit(c))
+ case sBefore:
+ if (std::isdigit(c))
{
start = pos;
status = sNumber;
else
{
status = sError;
- } break;
+ }
+ break;
/* have read a number, expect ',' or '-' */
- case sNumber: if (c == ',')
+ case sNumber:
+ if (c == ',')
{
/*store number*/
srenew(*list, nvecs+1);
else
{
status = sError;
- } break;
+ }
+ break;
/* have read a '-' -> expect a number */
case sMinus:
else
{
status = sError;
- } break;
+ }
+ break;
case sSteppedRange:
if (std::isdigit(c))
else
{
status = sError;
- } break;
+ }
+ break;
/* have read the number after a minus, expect ',' or ':' */
case sRange:
else
{
status = sError;
- } break;
+ }
+ break;
/* format error occured */
case sError:
{
frout_time = tzero + frame*timestep;
}
- else
- if (bSetTime)
+ else if (bSetTime)
{
frout_time += tshift;
}
{
top_file2 = nullptr;
}
- else
- if (bITP)
+ else if (bITP)
{
top_file2 = itp_file;
}
explicit PrivateImplPointer(Impl *ptr) : ptr_(ptr) {}
//! \cond
// Explicitly declared to work around MSVC problems.
- PrivateImplPointer(PrivateImplPointer &&other) : ptr_(std::move(other.ptr_)) {}
- PrivateImplPointer &operator=(PrivateImplPointer &&other)
+ PrivateImplPointer(PrivateImplPointer &&other) noexcept : ptr_(std::move(other.ptr_)) {}
+ PrivateImplPointer &operator=(PrivateImplPointer &&other) noexcept
{
ptr_ = std::move(other.ptr_);
return *this;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, 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.
}
KeyValueTreeTransformRulesScoped::KeyValueTreeTransformRulesScoped(
- KeyValueTreeTransformRulesScoped &&) = default;
+ KeyValueTreeTransformRulesScoped &&) noexcept = default;
KeyValueTreeTransformRulesScoped &
KeyValueTreeTransformRulesScoped::operator=(
- KeyValueTreeTransformRulesScoped &&) = default;
+ KeyValueTreeTransformRulesScoped &&) noexcept = default;
KeyValueTreeTransformRulesScoped::~KeyValueTreeTransformRulesScoped()
{
internal::KeyValueTreeTransformerImpl *impl,
const KeyValueTreePath &prefix);
//! Supports returning the object from IKeyValueTreeTransformRules::scopedTransform().
- KeyValueTreeTransformRulesScoped(KeyValueTreeTransformRulesScoped &&other);
+ KeyValueTreeTransformRulesScoped(KeyValueTreeTransformRulesScoped &&other) noexcept;
//! Supports returning the object from IKeyValueTreeTransformRules::scopedTransform().
- KeyValueTreeTransformRulesScoped &operator=(KeyValueTreeTransformRulesScoped &&other);
+ KeyValueTreeTransformRulesScoped &operator=(KeyValueTreeTransformRulesScoped &&other) noexcept;
~KeyValueTreeTransformRulesScoped();
//! Returns the interface for adding rules to this scope.
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018, 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.
{
}
-LoggerOwner::LoggerOwner(LoggerOwner &&other)
+LoggerOwner::LoggerOwner(LoggerOwner &&other) noexcept
: impl_(std::move(other.impl_)), logger_(&impl_->logger_)
{
}
-LoggerOwner &LoggerOwner::operator=(LoggerOwner &&other)
+LoggerOwner &LoggerOwner::operator=(LoggerOwner &&other) noexcept
{
impl_ = std::move(other.impl_);
logger_ = &impl_->logger_;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018, 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.
{
public:
//! Move-constructs the owner.
- LoggerOwner(LoggerOwner &&other);
+ LoggerOwner(LoggerOwner &&other) noexcept;
~LoggerOwner();
//! Move-assings the owner.
- LoggerOwner &operator=(LoggerOwner &&other);
+ LoggerOwner &operator=(LoggerOwner &&other) noexcept;
//! Returns the logger for writing the logs.
const MDLogger &logger() const { return *logger_; }