diff --git a/src/import/html_encode.h b/src/import/html_encode.h index 498975d9..4fa394c5 100644 --- a/src/import/html_encode.h +++ b/src/import/html_encode.h @@ -12,7 +12,7 @@ #ifndef __HTML_ENCODE_H__ #define __HTML_ENCODE_H__ -#include "../i18n-check/src/string_util.h" +#include "../util/string_util.h" #include "html_extract_text.h" namespace lily_of_the_valley @@ -28,8 +28,7 @@ namespace lily_of_the_valley @param encodeSpaces @c true to preserve consecutive spaces with `&#nbsp;`. @returns A string encoded to HTML.*/ [[nodiscard]] - std::wstring - operator()(const std::wstring_view text, const bool encodeSpaces) const + std::wstring operator()(const std::wstring_view text, const bool encodeSpaces) const { std::wstring encoded_text; if (text.empty()) diff --git a/src/import/rtf_encode.h b/src/import/rtf_encode.h index b5aa2570..c2f53a1b 100644 --- a/src/import/rtf_encode.h +++ b/src/import/rtf_encode.h @@ -12,7 +12,7 @@ #ifndef __RTF_ENCODE_H__ #define __RTF_ENCODE_H__ -#include "../i18n-check/src/string_util.h" +#include "../util/string_util.h" namespace lily_of_the_valley { diff --git a/src/import/rtf_extract_text.h b/src/import/rtf_extract_text.h index adb40db0..5853075d 100644 --- a/src/import/rtf_extract_text.h +++ b/src/import/rtf_extract_text.h @@ -12,7 +12,7 @@ #ifndef __RTF_EXTRACT_H__ #define __RTF_EXTRACT_H__ -#include "../i18n-check/src/string_util.h" +#include "../util/string_util.h" #include "extract_text.h" #include "html_extract_text.h" #include @@ -267,8 +267,7 @@ namespace lily_of_the_valley rtf_symbol() = delete; [[nodiscard]] - bool - operator<(const rtf_symbol& that) const noexcept + bool operator<(const rtf_symbol& that) const noexcept { return (szKeyword.compare(that.szKeyword) < 0); } diff --git a/src/ui/app.h b/src/ui/app.h index 4520a7cf..83850ed1 100644 --- a/src/ui/app.h +++ b/src/ui/app.h @@ -13,8 +13,8 @@ #define __BASEAPP_H__ #include "../debug/debug_profile.h" -#include "../i18n-check/src/donttranslate.h" #include "../math/safe_math.h" +#include "../util/donttranslate.h" #include "../util/logfile.h" #include "../util/resource_manager.h" #include "mainframe.h" @@ -213,10 +213,7 @@ namespace Wisteria::UI /// @param append @c true to append to the log file from today; /// @c false to overwrite it. /// @note This must be called before BaseApp::OnInit(). - void AppendDailyLog(const bool append) noexcept - { - m_appendDailyLog = append; - } + void AppendDailyLog(const bool append) noexcept { m_appendDailyLog = append; } /// @brief Sets a support email for the application. /// @param email The email address. diff --git a/src/ui/controls/codeeditor.h b/src/ui/controls/codeeditor.h index 3f373adb..20a9422b 100644 --- a/src/ui/controls/codeeditor.h +++ b/src/ui/controls/codeeditor.h @@ -12,8 +12,8 @@ #ifndef __CODE_EDITOR_H__ #define __CODE_EDITOR_H__ -#include "../../i18n-check/src/donttranslate.h" -#include "../../i18n-check/src/string_util.h" +#include "../../util/donttranslate.h" +#include "../../util/string_util.h" #include #include #include @@ -234,8 +234,7 @@ namespace Wisteria::UI struct wxStringCmpNoCase { [[nodiscard]] - bool - operator()(const wxString& s1, const wxString& s2) const + bool operator()(const wxString& s1, const wxString& s2) const { return s1.CmpNoCase(s2) < 0; } @@ -244,8 +243,7 @@ namespace Wisteria::UI struct wxStringPartialCmpNoCase { [[nodiscard]] - bool - operator()(const wxString& s1, const wxString& s2) const + bool operator()(const wxString& s1, const wxString& s2) const { return s1.CmpNoCase(s2.substr(0, s1.length())) < 0; } @@ -269,7 +267,8 @@ namespace Wisteria::UI using wxStringNoCaseMap = std::map; // Library name, string of function names, and map of function names // and their respective full signature - using ObjectAndFunctionsMap = std::map, wxStringCmpNoCase>; + using ObjectAndFunctionsMap = + std::map, wxStringCmpNoCase>; ObjectAndFunctionsMap m_libraryCollection; ObjectAndFunctionsMap m_classCollection; diff --git a/src/ui/controls/formattedtextctrl.h b/src/ui/controls/formattedtextctrl.h index 724154ce..27b5375d 100644 --- a/src/ui/controls/formattedtextctrl.h +++ b/src/ui/controls/formattedtextctrl.h @@ -14,34 +14,34 @@ #include #if defined(__WXMSW__) + #include #include #include - #include #endif -#include +#include "../../base/canvas.h" +#include "../../import/rtf_extract_text.h" +#include "../../util/clipboard_rtf.h" +#include "../../util/donttranslate.h" +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include #include -#include -#include +#include #include #include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include "../../import/rtf_extract_text.h" -#include "../../i18n-check/src/donttranslate.h" -#include "../../util/clipboard_rtf.h" -#include "../../base/canvas.h" /// @private -static constexpr int TWIPS_PER_INCH = 1440; +constexpr static int TWIPS_PER_INCH = 1440; namespace Wisteria::UI { @@ -504,7 +504,7 @@ namespace Wisteria::UI wxDECLARE_DYNAMIC_CLASS(FormattedTextCtrl); }; - } + } // namespace Wisteria::UI /** @}*/ diff --git a/src/ui/controls/htmltablewin.h b/src/ui/controls/htmltablewin.h index 629ff0ac..42f24979 100644 --- a/src/ui/controls/htmltablewin.h +++ b/src/ui/controls/htmltablewin.h @@ -13,7 +13,7 @@ #define __HTML_TABLE_WINDOW_H__ #include "../../base/canvas.h" -#include "../../i18n-check/src/donttranslate.h" +#include "../../util/donttranslate.h" #include #include #include diff --git a/src/ui/dialogs/functionbrowserdlg.h b/src/ui/dialogs/functionbrowserdlg.h index b677e6b3..b74c9299 100644 --- a/src/ui/dialogs/functionbrowserdlg.h +++ b/src/ui/dialogs/functionbrowserdlg.h @@ -12,9 +12,9 @@ #ifndef __FUNCTION_BROWSER_DLG_H__ #define __FUNCTION_BROWSER_DLG_H__ -#include "../../i18n-check/src/string_util.h" #include "../../import/html_encode.h" #include "../../import/html_extract_text.h" +#include "../../util/string_util.h" #include "../controls/sidebar.h" #include "dialogwithhelp.h" #include @@ -167,8 +167,7 @@ namespace Wisteria::UI CategoryInfo() = default; [[nodiscard]] - bool - operator<(const CategoryInfo& that) const noexcept + bool operator<(const CategoryInfo& that) const noexcept { return string_util::stricmp(m_name.c_str(), that.m_name.c_str()) < 0; } diff --git a/src/util/resource_manager.h b/src/util/resource_manager.h index f909fdbb..8ac43e27 100644 --- a/src/util/resource_manager.h +++ b/src/util/resource_manager.h @@ -12,8 +12,8 @@ #ifndef __RESOURCE_MANAGER_H__ #define __RESOURCE_MANAGER_H__ -#include "../i18n-check/src/donttranslate.h" #include "../math/mathematics.h" +#include "../util/donttranslate.h" #include "memorymappedfile.h" #include "zipcatalog.h" #include diff --git a/src/util/xml_format.h b/src/util/xml_format.h index 085332ed..4d2dd2ab 100644 --- a/src/util/xml_format.h +++ b/src/util/xml_format.h @@ -12,9 +12,9 @@ #ifndef __XML_FORMAT_H__ #define __XML_FORMAT_H__ -#include "../i18n-check/src/donttranslate.h" #include "../import/html_encode.h" #include "../math/mathematics.h" +#include "../util/donttranslate.h" #include #include #include diff --git a/tests/mapstests.cpp b/tests/mapstests.cpp index da5438d4..ad28aa04 100644 --- a/tests/mapstests.cpp +++ b/tests/mapstests.cpp @@ -5,7 +5,7 @@ #include #include "../src/util/frequencymap.h" #include "../src/math/mathematics.h" -#include "../src/i18n-check/src/string_util.h" +#include "../src/util/string_util.h" using namespace Catch::Matchers;