Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cppfig/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <string>
#include <string_view>

#include "cppfig/diff.h"
#include "cppfig/conf.h"
#include "cppfig/diff.h"
#include "cppfig/interface.h"
#include "cppfig/logging.h"
#include "cppfig/serializer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cppfig/cppfig.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "cppfig/conf.h" // IWYU pragma: export
#include "cppfig/configuration.h" // IWYU pragma: export
#include "cppfig/diff.h" // IWYU pragma: export
#include "cppfig/conf.h" // IWYU pragma: export
#include "cppfig/interface.h" // IWYU pragma: export
#include "cppfig/logging.h" // IWYU pragma: export
#include "cppfig/schema.h" // IWYU pragma: export
Expand Down
14 changes: 7 additions & 7 deletions src/cppfig/thread_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ namespace cppfig {
/// @endcode
struct SingleThreadedPolicy {
/// @brief No-op mutex type (lower_case to satisfy C++ BasicLockable/SharedLockable).
struct mutex_type { // NOLINT(readability-identifier-naming)
void lock() {} // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void unlock() {} // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void lock_shared() {} // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void unlock_shared() {} // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
struct mutex_type { // NOLINT(readability-identifier-naming)
void lock() { } // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void unlock() { } // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void lock_shared() { } // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
void unlock_shared() { } // NOLINT(readability-identifier-naming) LCOV_EXCL_LINE
};

/// @brief No-op shared (reader) lock (mirrors std::shared_lock).
struct shared_lock { // NOLINT(readability-identifier-naming)
explicit shared_lock(mutex_type& /*unused*/) {}
explicit shared_lock(mutex_type& /*unused*/) { }
~shared_lock() = default;

shared_lock(const shared_lock&) = delete;
Expand All @@ -37,7 +37,7 @@ struct SingleThreadedPolicy {

/// @brief No-op unique (writer) lock (mirrors std::unique_lock).
struct unique_lock { // NOLINT(readability-identifier-naming)
explicit unique_lock(mutex_type& /*unused*/) {}
explicit unique_lock(mutex_type& /*unused*/) { }
~unique_lock() = default;

unique_lock(const unique_lock&) = delete;
Expand Down
4 changes: 2 additions & 2 deletions test/integration_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ TEST_F(ConfigurationIntegrationTest, SaveCreatesParentDirectories)
TEST_F(ConfigurationIntegrationTest, CustomTypeToAndFromString)
{
// Test the ToString and FromString methods on ConfigTraitsFromJsonAdl
Point p { .x=10, .y=20 };
Point p { .x = 10, .y = 20 };

auto str = ConfigTraits<Point>::ToString(p);
EXPECT_NE(str.find("10"), std::string::npos);
Expand Down Expand Up @@ -1010,7 +1010,7 @@ TEST_F(ConfigurationIntegrationTest, SingleThreadedSaveDirectoryCreationFailure)

TEST_F(ConfigurationIntegrationTest, ConfigTraitsFromJsonAdlToJson)
{
Point p { .x=5, .y=15 };
Point p { .x = 5, .y = 15 };
auto val = ConfigTraits<Point>::Serialize(p);
EXPECT_EQ(val["x"], 5);
EXPECT_EQ(val["y"], 15);
Expand Down
4 changes: 2 additions & 2 deletions test/thread_safety_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ TEST_F(ThreadSafetyTest, ConcurrentReload)

// Multiple loaders
threads.reserve(2);
for (int t = 0; t < 2; ++t) {
for (int t = 0; t < 2; ++t) {
threads.emplace_back([&] {
start_latch.arrive_and_wait();
for (int i = 0; i < k_iters; ++i) {
Expand Down Expand Up @@ -576,7 +576,7 @@ TEST_F(ThreadSafetyTest, StressAllOperationsMixed)

// Thread 0-1: Set Counter
threads.reserve(2);
for (int t = 0; t < 2; ++t) {
for (int t = 0; t < 2; ++t) {
threads.emplace_back([&, t] {
start_latch.arrive_and_wait();
for (int i = 0; i < k_iters; ++i) {
Expand Down
Loading