From 69a3a79120a4fa129fd6d6ceec3c64985d4af5f1 Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Sat, 26 Jun 2021 14:46:57 -0700 Subject: [PATCH] clang-tidy performance-* --- CMakeLists.txt | 2 +- include/world_builder/parameters.h | 2 +- source/parameters.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10e9c0736..5e130ea5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ set (WORLD_BUILDER_SOURCE_DIR ${PROJECT_SOURCE_DIR}) # generate version.cc configure_file("${CMAKE_CURRENT_SOURCE_DIR}/source/config.cc.in" "${CMAKE_BINARY_DIR}/source/config.cc" @ONLY) - +set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=performance-*;--fix") # finding support for different languages # finding a fortran compiler set(WB_MAKE_FORTRAN_WRAPPER TRUE CACHE STRING "Whether or not to create a Fortran wrapper for the world builder.") diff --git a/include/world_builder/parameters.h b/include/world_builder/parameters.h index d3b309c11..8b50374ec 100644 --- a/include/world_builder/parameters.h +++ b/include/world_builder/parameters.h @@ -203,7 +203,7 @@ namespace WorldBuilder void declare_model_entries(const std::string &model_group_name, const std::string &parent_name, - std::map declare_map, + const std::map& declare_map, const std::vector &required_entries = {}, const std::vector > &extra_declarations = {}); diff --git a/source/parameters.cc b/source/parameters.cc index 2601641a8..636fe2b71 100644 --- a/source/parameters.cc +++ b/source/parameters.cc @@ -1238,7 +1238,7 @@ namespace WorldBuilder void Parameters::declare_model_entries(const std::string &model_group_name, const std::string &parent_name, - std::map declare_map, + const std::map& declare_map, const std::vector &required_entries, const std::vector > &extra_declarations) {