From 0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 23:17:56 +0500 Subject: Add include guards and header comments to sources --- src/core/config/boolean.cc | 5 +++++ src/core/config/boolean.hh | 9 +++++++++ src/core/config/ivalue.hh | 9 +++++++++ src/core/config/number.hh | 9 +++++++++ src/core/config/string.cc | 5 +++++ src/core/config/string.hh | 9 +++++++++ 6 files changed, 46 insertions(+) (limited to 'src/core/config') diff --git a/src/core/config/boolean.cc b/src/core/config/boolean.cc index 45d5a38..74c7b07 100644 --- a/src/core/config/boolean.cc +++ b/src/core/config/boolean.cc @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: boolean.cc +// Description: Boolean config value + #include "core/pch.hh" #include "core/config/boolean.hh" diff --git a/src/core/config/boolean.hh b/src/core/config/boolean.hh index cfd8b0b..238b978 100644 --- a/src/core/config/boolean.hh +++ b/src/core/config/boolean.hh @@ -1,3 +1,10 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: boolean.hh +// Description: Boolean config value + +#ifndef CORE_CONFIG_BOOLEAN_HH +#define CORE_CONFIG_BOOLEAN_HH #pragma once #include "core/config/ivalue.hh" @@ -23,3 +30,5 @@ public: static bool from_string(std::string_view value); }; } // namespace config + +#endif diff --git a/src/core/config/ivalue.hh b/src/core/config/ivalue.hh index 13e9a3a..088276a 100644 --- a/src/core/config/ivalue.hh +++ b/src/core/config/ivalue.hh @@ -1,3 +1,10 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: ivalue.hh +// Description: Base config value interface + +#ifndef CORE_CONFIG_IVALUE_HH +#define CORE_CONFIG_IVALUE_HH #pragma once namespace config @@ -9,3 +16,5 @@ public: virtual std::string_view get(void) const = 0; }; } // namespace config + +#endif diff --git a/src/core/config/number.hh b/src/core/config/number.hh index 4f185e1..eb1f462 100644 --- a/src/core/config/number.hh +++ b/src/core/config/number.hh @@ -1,3 +1,10 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: number.hh +// Description: Arithmetic config value + +#ifndef CORE_CONFIG_NUMBER_HH +#define CORE_CONFIG_NUMBER_HH #pragma once #include "core/config/ivalue.hh" @@ -128,3 +135,5 @@ inline void config::Number::set_limits(T min_value, T max_value) m_value = std::clamp(m_value, m_min_value, m_max_value); m_string = std::to_string(m_value); } + +#endif diff --git a/src/core/config/string.cc b/src/core/config/string.cc index 198b448..e5820f6 100644 --- a/src/core/config/string.cc +++ b/src/core/config/string.cc @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: string.cc +// Description: String config value + #include "core/pch.hh" #include "core/config/string.hh" diff --git a/src/core/config/string.hh b/src/core/config/string.hh index 8fd3901..faecb67 100644 --- a/src/core/config/string.hh +++ b/src/core/config/string.hh @@ -1,3 +1,10 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: string.hh +// Description: String config value + +#ifndef CORE_CONFIG_STRING_HH +#define CORE_CONFIG_STRING_HH #pragma once #include "core/config/ivalue.hh" @@ -29,3 +36,5 @@ constexpr const char* config::String::c_str(void) const noexcept { return m_value.c_str(); } + +#endif -- cgit