Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions libc/src/__support/CPP/string_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class string_view {

LIBC_INLINE static int compareMemory(const char *Lhs, const char *Rhs,
size_t Length) {
for (size_t I = 0; I < Length; ++I)
if (int Diff = (int)Lhs[I] - (int)Rhs[I])
for (size_t i = 0; i < Length; ++i)
if (int Diff = (int)Lhs[i] - (int)Rhs[i])
return Diff;
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions libc/src/__support/CPP/utility/in_place.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ template <class T> struct in_place_type_t {
};
template <class T> LIBC_INLINE_VAR constexpr in_place_type_t<T> in_place_type{};

template <size_t I> struct in_place_index_t {
template <size_t IDX> struct in_place_index_t {
LIBC_INLINE explicit in_place_index_t() = default;
};
template <size_t I>
LIBC_INLINE_VAR constexpr in_place_index_t<I> in_place_index{};
template <size_t IDX>
LIBC_INLINE_VAR constexpr in_place_index_t<IDX> in_place_index{};

} // namespace cpp
} // namespace LIBC_NAMESPACE_DECL
Expand Down
Loading