Skip to content

Commit 542a7a5

Browse files
committed
Use nolint blocks because of line breaks due to formatting
1 parent 94208b8 commit 542a7a5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

libs/common/include/Rect.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ template<typename T>
2020
struct RectBase
2121
{
2222
using position_type = Point<T>;
23-
// NOLINTNEXTLINE(modernize-type-traits) Deactivated to bug in clang-tidy
23+
// Deactivated to bug in clang-tidy
24+
// NOLINTBEGIN(modernize-type-traits)
2425
using extent_elem_type =
2526
typename std::conditional_t<std::is_integral_v<T>, std::make_unsigned<T>, std::common_type<T>>::type;
27+
// NOLINTEND(modernize-type-traits)
2628
using extent_type = Point<extent_elem_type>;
2729
T left, top, right, bottom;
2830
constexpr RectBase() : RectBase(position_type::all(0), extent_type::all(0)) {}

libs/common/include/helpers/serializeContainers.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ namespace detail {
3535
void pushContainer(Serializer& ser, const T& container, long)
3636
{
3737
using Type = typename T::value_type;
38-
// NOLINTNEXTLINE(modernize-type-traits) Deactivated to bug in clang-tidy
38+
// Deactivated to bug in clang-tidy
39+
// NOLINTBEGIN(modernize-type-traits)
3940
using Integral =
4041
typename std::conditional_t<std::is_enum_v<Type>, std::underlying_type<Type>, std::common_type<Type>>::type;
42+
// NOLINTEND(modernize-type-traits)
4143
for(const auto el : container)
4244
{
4345
// Cast also required for bool vector -.-

libs/s25main/gameTypes/BuildingTypes.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ struct BldWorkDescription
4545
helpers::OptionalEnum<Job> job = boost::none;
4646
/// Ware produced, if any
4747
helpers::OptionalEnum<GoodType> producedWare = boost::none;
48+
// Required for use in aggregate initialization
49+
// NOLINTBEGIN(readability-redundant-member-init)
4850
/// Wares the building needs, if any
49-
WaresNeeded waresNeeded =
50-
{}; // NOLINT(readability-redundant-member-init): Required for use in aggregate initialization
51+
WaresNeeded waresNeeded = {};
52+
// NOLINTEND(readability-redundant-member-init)
5153
/// How many wares of each type can be stored
5254
uint8_t numSpacesPerWare = 6;
5355
/// True if one of each waresNeeded is used per production cycle

0 commit comments

Comments
 (0)