summaryrefslogtreecommitdiff
path: root/src/rebuild.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-12-09 20:02:33 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-12-09 20:28:00 +0100
commit4f3422c58ed4fc14b222cd474843affb9cc509c4 (patch)
tree5d6079f5309fabf553119fad5b01779c6a8097d0 /src/rebuild.cc
parent5ba36c7be0a12b9b052fb172a209d3b6dffc9a99 (diff)
Various clang-tidy fixes.
Diffstat (limited to 'src/rebuild.cc')
-rw-r--r--src/rebuild.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/rebuild.cc b/src/rebuild.cc
index 460bbfb..c176744 100644
--- a/src/rebuild.cc
+++ b/src/rebuild.cc
@@ -163,22 +163,23 @@ bool recompileCheck(const ctor::settings& global_settings, int argc, char* argv[
config.name = "ctor";
config.system = ctor::output_system::build;
- config.flags.cxxflags.push_back({ctor::cxx_opt::optimization, "3"});
- config.flags.cxxflags.push_back({ctor::cxx_opt::cpp_std, "c++20"});
+ config.flags.cxxflags.emplace_back(ctor::cxx_opt::optimization, "3");
+ config.flags.cxxflags.emplace_back(ctor::cxx_opt::cpp_std, "c++20");
const auto& c = ctor::get_configuration();
if(c.has(ctor::cfg::ctor_includedir))
{
- config.flags.cxxflags.push_back({ctor::cxx_opt::include_path,
- c.get(ctor::cfg::ctor_includedir)});
+ config.flags.cxxflags.emplace_back(ctor::cxx_opt::include_path,
+ c.get(ctor::cfg::ctor_includedir));
}
if(c.has(ctor::cfg::ctor_libdir))
{
- config.flags.ldflags.push_back({ctor::ld_opt::library_path, c.get(ctor::cfg::ctor_libdir)});
+ config.flags.ldflags.emplace_back(ctor::ld_opt::library_path,
+ c.get(ctor::cfg::ctor_libdir));
}
- config.flags.ldflags.push_back({ctor::ld_opt::link, "ctor"});
- config.flags.ldflags.push_back({ctor::ld_opt::strip});
- config.flags.ldflags.push_back({ctor::ld_opt::threads});
+ config.flags.ldflags.emplace_back(ctor::ld_opt::link, "ctor");
+ config.flags.ldflags.emplace_back(ctor::ld_opt::strip);
+ config.flags.ldflags.emplace_back(ctor::ld_opt::threads);
ctor::settings settings{global_settings};
settings.verbose = -1; // Make check completely silent.
@@ -261,14 +262,14 @@ bool recompileCheck(const ctor::settings& global_settings, int argc, char* argv[
if(reconfigure)
{
std::vector<std::string> args;
- args.push_back("reconfigure");
+ args.emplace_back("reconfigure");
if(!relaunch_allowed)
{
- args.push_back("--no-rerun");
+ args.emplace_back("--no-rerun");
}
for(int i = 1; i < argc; ++i)
{
- args.push_back(argv[i]);
+ args.emplace_back(argv[i]);
}
auto ret = execute(settings, argv[0], args);
//if(ret != 0)