Skip to content

Commit 7056df6

Browse files
committed
Apply clang-format
1 parent cce3057 commit 7056df6

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

application/argumentparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ ArgumentCompletionInfo ArgumentParser::determineCompletionInfo(
11671167
completion.lastSpecifiedArgIndex = static_cast<unsigned int>(argc) - 1;
11681168
completion.lastSpecifiedArg = argv + completion.lastSpecifiedArgIndex;
11691169
for (; completion.lastSpecifiedArg >= argv && **completion.lastSpecifiedArg == '\0';
1170-
--completion.lastSpecifiedArg, --completion.lastSpecifiedArgIndex)
1170+
--completion.lastSpecifiedArg, --completion.lastSpecifiedArgIndex)
11711171
;
11721172
}
11731173

conversion/stringbuilder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ template <class StringType, class ViewType> using IsStringViewType = std::is_sam
1616
template <class StringType, class CharType> using IsCharType = std::is_same<typename StringType::value_type, CharType>;
1717
namespace Detail {
1818
template <typename StringType, typename T>
19-
auto IsStringType(
20-
int) -> decltype(std::declval<StringType &>().append(std::declval<const T &>()), std::declval<const T &>().size(), Traits::Bool<true>{});
19+
auto IsStringType(int)
20+
-> decltype(std::declval<StringType &>().append(std::declval<const T &>()), std::declval<const T &>().size(), Traits::Bool<true>{});
2121
template <typename StringType, typename T> Traits::Bool<false> IsStringType(...);
2222
template <typename StringType> void functionTakingConstStringRef(const StringType &str);
2323
template <typename StringType, typename T>
2424
auto IsConvertibleToConstStringRef(int) -> decltype(functionTakingConstStringRef<StringType>(std::declval<const T &>()), Traits::Bool<true>{});
2525
template <typename StringType, typename T> Traits::Bool<false> IsConvertibleToConstStringRef(...);
2626
template <typename StringType, typename T>
27-
auto IsConvertibleToConstStringRefViaNative(
28-
int) -> decltype(functionTakingConstStringRef<StringType>(std::declval<const T &>().native()), Traits::Bool<true>{});
27+
auto IsConvertibleToConstStringRefViaNative(int)
28+
-> decltype(functionTakingConstStringRef<StringType>(std::declval<const T &>().native()), Traits::Bool<true>{});
2929
template <typename StringType, typename T> Traits::Bool<false> IsConvertibleToConstStringRefViaNative(...);
3030
} // namespace Detail
3131
template <typename StringType, typename StringType2>

conversion/stringconversion.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,17 @@
2727

2828
namespace CppUtilities {
2929

30+
// clang-format off
3031
/*!
3132
* \brief The StringDataDeleter struct deletes the data of a StringData instance.
3233
*/
33-
struct CPP_UTILITIES_EXPORT StringDataDeleter {
34-
/*!
34+
struct CPP_UTILITIES_EXPORT StringDataDeleter{ /*!
3535
* \brief Deletes the specified \a stringData with std::free(), because the memory has been
3636
* allocated using std::malloc()/std::realloc().
3737
*/
38-
void operator()(char *stringData)
39-
{
40-
std::free(stringData);
41-
}
38+
void operator()(char *stringData){ std::free(stringData); }
4239
};
40+
// clang-format on
4341

4442
/*!
4543
* \brief Type used to return string encoding conversion result.
@@ -304,7 +302,7 @@ template <typename StringType> bool endsWith(const StringType &str, const String
304302
return false;
305303
}
306304
for (auto stri = str.cend() - static_cast<typename StringType::difference_type>(phrase.size()), strend = str.cend(), phrasei = phrase.cbegin();
307-
stri != strend; ++stri, ++phrasei) {
305+
stri != strend; ++stri, ++phrasei) {
308306
if (*stri != *phrasei) {
309307
return false;
310308
}
@@ -322,7 +320,7 @@ template <typename StringType> bool endsWith(const StringType &str, const typena
322320
return false;
323321
}
324322
for (auto stri = str.cend() - static_cast<typename StringType::difference_type>(phraseSize), strend = str.cend(); stri != strend;
325-
++stri, ++phrase) {
323+
++stri, ++phrase) {
326324
if (*stri != *phrase) {
327325
return false;
328326
}

0 commit comments

Comments
 (0)