mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 22:03:12 +00:00
Format some C++ files with clang-format
This commit is contained in:
parent
ee62bee9cd
commit
45da77c5c5
2 changed files with 6 additions and 5 deletions
|
@ -5711,16 +5711,16 @@ static void test_highlighting() {
|
||||||
highlight_tests.push_back({
|
highlight_tests.push_back({
|
||||||
{L"echo", highlight_role_t::command},
|
{L"echo", highlight_role_t::command},
|
||||||
{L"\\UFDFD", highlight_role_t::escape},
|
{L"\\UFDFD", highlight_role_t::escape},
|
||||||
});
|
});
|
||||||
#if WCHAR_T_BITS > 16
|
#if WCHAR_T_BITS > 16
|
||||||
highlight_tests.push_back({
|
highlight_tests.push_back({
|
||||||
{L"echo", highlight_role_t::command},
|
{L"echo", highlight_role_t::command},
|
||||||
{L"\\U10FFFF", highlight_role_t::escape},
|
{L"\\U10FFFF", highlight_role_t::escape},
|
||||||
});
|
});
|
||||||
highlight_tests.push_back({
|
highlight_tests.push_back({
|
||||||
{L"echo", highlight_role_t::command},
|
{L"echo", highlight_role_t::command},
|
||||||
{L"\\U110000", highlight_role_t::error},
|
{L"\\U110000", highlight_role_t::error},
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
const auto saved_flags = fish_features();
|
const auto saved_flags = fish_features();
|
||||||
mutable_fish_features().set(features_t::ampersand_nobg_in_token, true);
|
mutable_fish_features().set(features_t::ampersand_nobg_in_token, true);
|
||||||
|
|
|
@ -138,8 +138,9 @@ class maybe_t : private maybe_detail::conditionally_copyable_t<T> {
|
||||||
// Not enabled if the type T is already bool-convertible to prevent accidental misuse,
|
// Not enabled if the type T is already bool-convertible to prevent accidental misuse,
|
||||||
// otherwise the "typename std::enable_if<....>::type" evaluates to bool, giving us a definition
|
// otherwise the "typename std::enable_if<....>::type" evaluates to bool, giving us a definition
|
||||||
// of `explicit operator bool() const { ... }`
|
// of `explicit operator bool() const { ... }`
|
||||||
template <typename U = T> explicit operator
|
template <typename U = T>
|
||||||
typename std::enable_if<!std::is_convertible<U, bool>::value, bool>::type() const {
|
explicit operator typename std::enable_if<!std::is_convertible<U, bool>::value, bool>::type()
|
||||||
|
const {
|
||||||
return impl_.filled;
|
return impl_.filled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue