Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Apr 6, 2024
1 parent 0535ffc commit 231533e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
26 changes: 14 additions & 12 deletions src/cpp_i18n_review.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ namespace i18n_check
(cppText[1] == L'\n' || cppText[1] == L'\r'))
{
assert(cppText >= m_file_start);
auto prevLineStart =
std::wstring_view{ m_file_start }.find_last_of(L"\n\r", cppText - m_file_start);
auto prevLineStart = std::wstring_view{ m_file_start }.find_last_of(
L"\n\r", cppText - m_file_start);
if (prevLineStart == std::wstring::npos)
{
prevLineStart = 0;
Expand Down Expand Up @@ -291,14 +291,14 @@ namespace i18n_check
{
m_wide_lines.emplace_back(
// truncate and add ellipsis
std::wstring{ currentLine.substr(
0, std::min<size_t>(
32, currentLine.length())) } // NOLINT
.append(L"..."),
string_info::usage_info{
string_info::usage_info::usage_type::orphan,
std::to_wstring(currentLineLength), std::wstring{} },
m_file_name, get_line_and_column(currentPos));
std::wstring{ currentLine.substr(
0, std::min<size_t>(32, currentLine.length())) }
// NOLINT
.append(L"..."),
string_info::usage_info{
string_info::usage_info::usage_type::orphan,
std::to_wstring(currentLineLength), std::wstring{} },
m_file_name, get_line_and_column(currentPos));
}
}
}
Expand Down Expand Up @@ -400,7 +400,8 @@ namespace i18n_check
}
if (*asmStart == L'(')
{
const auto* end = string_util::find_matching_close_tag(asmStart + 1, L'(', L')', false);
const auto* end =
string_util::find_matching_close_tag(asmStart + 1, L'(', L')', false);
if (end == nullptr)
{
log_message(L"asm", L"Missing closing ')' in asm block.", (end - m_file_start));
Expand Down Expand Up @@ -428,7 +429,8 @@ namespace i18n_check
}
if (*asmStart == L'{')
{
const auto* end = string_util::find_matching_close_tag(asmStart + 1, L'{', L'}', false);
const auto* end =
string_util::find_matching_close_tag(asmStart + 1, L'{', L'}', false);
if (end == nullptr)
{
log_message(L"__asm", L"Missing closing '}' in __asm block.",
Expand Down
2 changes: 1 addition & 1 deletion src/donttranslate.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#ifndef __DONTTRANSLATE_H__
#define __DONTTRANSLATE_H__

#include <type_traits>
#include <cstdint>
#include <type_traits>

// Determines whether T is string constant type.
/// @private
Expand Down
8 changes: 4 additions & 4 deletions src/rc_file_review.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ namespace i18n_check
constexpr int32_t maxFontSize{ 10 };
if (fontSize && (fontSize.value() > maxFontSize || fontSize.value() < minFontSize))
{
m_badFontSizes.push_back(string_info{
fontEntry + L": font size " + fontParts[0] +
L" is non-standard (8 is recommended).",
string_info::usage_info{}, fileName, std::make_pair(-1, -1) });
m_badFontSizes.push_back(
string_info{ fontEntry + L": font size " + fontParts[0] +
L" is non-standard (8 is recommended).",
string_info::usage_info{}, fileName, std::make_pair(-1, -1) });
}

if (fontParts[1] != L"MS Shell Dlg" && fontParts[1] != L"MS Shell Dlg 2")
Expand Down

0 comments on commit 231533e

Please sign in to comment.