Skip to content

Commit 58c2c13

Browse files
fix comments and clang tidy check
1 parent f269fe5 commit 58c2c13

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Checks: >
2121
-*-non-private-member-variables-in-classes,
2222
-*-magic-numbers,
2323
-concurrency-*,
24+
-bugprone-easily-swappable-parameters,
2425
-clang-analyzer-security*,
2526
-Wpointer-bool-conversion
2627

str_view/str_view.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
MSVC does not. This is how to solve the differing declaration
1616
signature requirements. */
1717
#if defined(__GNUC__) || defined(__clang__) || defined(__INTEL_LLVM_COMPILER)
18-
/* Clang and GCC support static array parameter declarations while
19-
MSVC does not. This is how to solve the differing declaration
20-
signature requirements. */
21-
2218
/* A static array parameter declaration helper. Function parameters
2319
may specify an array of a type of at least SIZE elements large,
2420
allowing compiler optimizations and safety errors. Specify
@@ -854,7 +850,7 @@ sv_rmemcmp(void const *const vl, void const *const vr, size_t n)
854850

855851
/* strcspn is based on musl C-standard library implementation
856852
http://git.musl-libc.org/cgit/musl/tree/src/string/strcspn.c
857-
A custom implemenatation is necessary because C standard library impls
853+
A custom implementation is necessary because C standard library impls
858854
have no concept of a string view and will continue searching beyond the
859855
end of a view until null is found. This way, string searches are
860856
efficient and only within the range specified. */
@@ -989,8 +985,6 @@ sv_rstrnstrn(ptrdiff_t const hay_sz, char const ARR_CONST_GEQ(hay, hay_sz),
989985

990986
/*============== Post-Precomputation Two-Way Search =================*/
991987

992-
/* NOLINTBEGIN(*easily-swappable*) */
993-
994988
/* Definitions for Two-Way String-Matching taken from original authors:
995989
996990
CROCHEMORE M., PERRIN D., 1991, Two-way string-matching,
@@ -1329,8 +1323,6 @@ sv_rpos_normal(ptrdiff_t const hay_sz, char const ARR_CONST_GEQ(hay, hay_sz),
13291323
return hay_sz;
13301324
}
13311325

1332-
/* NOLINTEND(*easily-swappable*) */
1333-
13341326
static inline struct sv_factorization
13351327
sv_rmaximal_suffix(ptrdiff_t const needle_sz,
13361328
char const ARR_CONST_GEQ(needle, needle_sz))

0 commit comments

Comments
 (0)