diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/consolecolors.h | 36 | ||||
-rw-r--r-- | include/extensible.h | 4 | ||||
-rw-r--r-- | include/hashcomp.h | 38 | ||||
-rw-r--r-- | include/mode.h | 8 |
4 files changed, 43 insertions, 43 deletions
diff --git a/include/consolecolors.h b/include/consolecolors.h index 9b7e0670a..d92be58bc 100644 --- a/include/consolecolors.h +++ b/include/consolecolors.h @@ -29,70 +29,70 @@ extern HANDLE g_hStdout; inline std::ostream& con_green(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor); - return s; + SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor); + return s; } inline std::ostream& con_red(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor); - return s; + SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor); + return s; } inline std::ostream& con_white(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor); - return s; + SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor); + return s; } inline std::ostream& con_white_bright(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor); - return s; + SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor); + return s; } inline std::ostream& con_bright(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor); - return s; + SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor); + return s; } inline std::ostream& con_reset(std::ostream &s) { - SetConsoleTextAttribute(g_hStdout, g_wOriginalColors); - return s; + SetConsoleTextAttribute(g_hStdout, g_wOriginalColors); + return s; } #else inline std::ostream& con_green(std::ostream &s) { - return s << "\033[1;32m"; + return s << "\033[1;32m"; } inline std::ostream& con_red(std::ostream &s) { - return s << "\033[1;31m"; + return s << "\033[1;31m"; } inline std::ostream& con_white(std::ostream &s) { - return s << "\033[0m"; + return s << "\033[0m"; } inline std::ostream& con_white_bright(std::ostream &s) { - return s << "\033[1m"; + return s << "\033[1m"; } inline std::ostream& con_bright(std::ostream &s) { - return s << "\033[1m"; + return s << "\033[1m"; } inline std::ostream& con_reset(std::ostream &s) { - return s << "\033[0m"; + return s << "\033[0m"; } #endif diff --git a/include/extensible.h b/include/extensible.h index 1a51fdaaf..9714e9654 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -38,8 +38,8 @@ enum SerializeFormat class CoreExport ExtensionItem : public ServiceProvider, public usecountbase { public: - /** Extensible subclasses - */ + /** Extensible subclasses + */ enum ExtensibleType { EXT_USER, diff --git a/include/hashcomp.h b/include/hashcomp.h index c99b5d646..87b2636fc 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -72,25 +72,25 @@ CoreExport extern unsigned const char rfc_case_sensitive_map[256]; template<typename T> const T& SearchAndReplace(T& text, const T& pattern, const T& replace) { - T replacement; - if ((!pattern.empty()) && (!text.empty())) - { - for (std::string::size_type n = 0; n != text.length(); ++n) - { - if (text.length() >= pattern.length() && text.substr(n, pattern.length()) == pattern) - { - /* Found the pattern in the text, replace it, and advance */ - replacement.append(replace); - n = n + pattern.length() - 1; - } - else - { - replacement += text[n]; - } - } - } - text = replacement; - return text; + T replacement; + if ((!pattern.empty()) && (!text.empty())) + { + for (std::string::size_type n = 0; n != text.length(); ++n) + { + if (text.length() >= pattern.length() && text.substr(n, pattern.length()) == pattern) + { + // Found the pattern in the text, replace it, and advance + replacement.append(replace); + n = n + pattern.length() - 1; + } + else + { + replacement += text[n]; + } + } + } + text = replacement; + return text; } /** The irc namespace contains a number of helper classes. diff --git a/include/mode.h b/include/mode.h index d8884bf9f..e7ac756ec 100644 --- a/include/mode.h +++ b/include/mode.h @@ -774,10 +774,10 @@ class CoreExport ModeParser : public fakederef<ModeParser> const ModeHandlerMap& GetModes(ModeType mt) const { return modehandlersbyname[mt]; } /** Show the list of a list mode to a user. Modules can deny the listing. - * @param user User to show the list to. - * @param chan Channel to show the list of. - * @param mh List mode to show the list of. - */ + * @param user User to show the list to. + * @param chan Channel to show the list of. + * @param mh List mode to show the list of. + */ void ShowListModeList(User* user, Channel* chan, ModeHandler* mh); }; |