diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-06 00:08:01 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-06 00:08:01 +0200 |
| commit | baf3732247886f0e055708b580b6e8c2ab52af6d (patch) | |
| tree | 4176c63b95156861a681d82b6817434c7f70a453 | |
| parent | fix a warning (diff) | |
| download | winapi-common-baf3732247886f0e055708b580b6e8c2ab52af6d.tar.gz winapi-common-baf3732247886f0e055708b580b6e8c2ab52af6d.zip | |
minor fixes
Diffstat (limited to '')
| -rw-r--r-- | include/winapi/handle.hpp | 2 | ||||
| -rw-r--r-- | include/winapi/shmem.hpp | 2 | ||||
| -rw-r--r-- | test/unit_tests/process_worker.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/winapi/handle.hpp b/include/winapi/handle.hpp index 7af7252..23e5a3c 100644 --- a/include/winapi/handle.hpp +++ b/include/winapi/handle.hpp @@ -84,7 +84,7 @@ public: template <typename CharT, typename Traits = std::char_traits<CharT>, typename Allocator = std::allocator<CharT>> - void write(const std::basic_string<CharT, Traits, Allocator> src) const { + void write(const std::basic_string<CharT, Traits, Allocator>& src) const { write(std::basic_string_view<CharT>{src}); } diff --git a/include/winapi/shmem.hpp b/include/winapi/shmem.hpp index 3290cf3..aecae85 100644 --- a/include/winapi/shmem.hpp +++ b/include/winapi/shmem.hpp @@ -95,7 +95,7 @@ public: T& operator*() const { return get(); } private: - explicit SharedObject(SharedMemory&& shmem) : m_shmem(std::move(shmem)) {} + explicit SharedObject(SharedMemory&& shmem) : m_shmem{std::move(shmem)} {} SharedMemory m_shmem; // Destruct only once, no matter the number of mappings. diff --git a/test/unit_tests/process_worker.cpp b/test/unit_tests/process_worker.cpp index d05efaa..a08ab10 100644 --- a/test/unit_tests/process_worker.cpp +++ b/test/unit_tests/process_worker.cpp @@ -151,7 +151,7 @@ void check_console_buffer_new(Worker& worker, const std::vector<std::string>& ex // Placeholder lines are still last in this process's window: const auto& worker_expected = expected; - const std::vector<std::string> this_expected(numof_lines, PLACEHOLDER); + const std::vector<std::string> this_expected{numof_lines, PLACEHOLDER}; BOOST_TEST(worker_actual == worker_expected); BOOST_TEST(this_actual == this_expected); |
