aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-05 00:24:39 +0200
committerEgor Tensin <egor@tensin.name>2026-06-05 00:24:39 +0200
commit6f0f4feab3ecf41fa0d519195e26bd386612ffde (patch)
tree7c5585873f6f59b56fb8066533a82b012ce79480
parentupgrade to nested namespaces (diff)
downloadwinapi-common-6f0f4feab3ecf41fa0d519195e26bd386612ffde.tar.gz
winapi-common-6f0f4feab3ecf41fa0d519195e26bd386612ffde.zip
switch to {} initializers
-rw-r--r--include/winapi/sid.hpp2
-rw-r--r--test/unit_tests/fixtures.hpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/include/winapi/sid.hpp b/include/winapi/sid.hpp
index ab8c62c..af4251b 100644
--- a/include/winapi/sid.hpp
+++ b/include/winapi/sid.hpp
@@ -24,7 +24,7 @@ public:
static Sid builtin_administrators();
- explicit Sid(const Buffer& buffer) : m_buffer(buffer) {}
+ explicit Sid(const Buffer& buffer) : m_buffer{buffer} {}
explicit operator SID&() { return get_impl(); }
explicit operator const SID&() const { return get_impl(); }
diff --git a/test/unit_tests/fixtures.hpp b/test/unit_tests/fixtures.hpp
index 011fb75..f3e8a8e 100644
--- a/test/unit_tests/fixtures.hpp
+++ b/test/unit_tests/fixtures.hpp
@@ -19,7 +19,7 @@
class RemoveFileGuard {
public:
- explicit RemoveFileGuard(const winapi::CanonicalPath& path) : m_path(path) {}
+ explicit RemoveFileGuard(const winapi::CanonicalPath& path) : m_path{path} {}
~RemoveFileGuard() {
try {
@@ -38,7 +38,7 @@ private:
class WithParam {
public:
- WithParam(const std::string& param_prefix) : m_value(find_param_value(param_prefix)) {}
+ WithParam(const std::string& param_prefix) : m_value{find_param_value(param_prefix)} {}
const std::string& get_value() { return m_value; }
@@ -59,14 +59,14 @@ private:
class WithEchoExe : public WithParam {
public:
- WithEchoExe() : WithParam("--echo_exe=") {}
+ WithEchoExe() : WithParam{"--echo_exe="} {}
const std::string& get_echo_exe() { return get_value(); }
};
class WithWorkerExe : public WithParam {
public:
- WithWorkerExe() : WithParam("--worker_exe="), m_cmd(worker::Command::create()) {}
+ WithWorkerExe() : WithParam{"--worker_exe="}, m_cmd{worker::Command::create()} {}
const std::string& get_worker_exe() { return get_value(); }