From d9379cccf574c7a5a5f5b1e2699cbd67435087e3 Mon Sep 17 00:00:00 2001 From: Christoph Bachhuber Date: Thu, 5 Dec 2019 03:17:06 +0100 Subject: [PATCH] Clang-tidy fixes (#360) * Clang-tidy fixes * Format * Satisfy pre-commit hooks * Fix getters to constref return * Final name getter as constref --- include/CLI/Option.hpp | 34 ++++++++++++++++++---------------- include/CLI/Validators.hpp | 2 +- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index 3923957a..f53986ec 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -87,7 +87,7 @@ template class OptionBase { // setters /// Changes the group membership - CRTP *group(std::string name) { + CRTP *group(const std::string &name) { group_ = name; return static_cast(this); } @@ -346,7 +346,7 @@ class Option : public OptionBase