From 878fd4453b09a0abd1e6c52f72e5f3150613054e Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sun, 14 Dec 2014 08:19:22 -0800 Subject: [PATCH] Fix whitespace --- libaegisub/common/charset_conv.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libaegisub/common/charset_conv.cpp b/libaegisub/common/charset_conv.cpp index 202904fba..a8efba7eb 100644 --- a/libaegisub/common/charset_conv.cpp +++ b/libaegisub/common/charset_conv.cpp @@ -49,28 +49,28 @@ namespace { /// @brief Map a user-friendly encoding name to the real encoding name const char *get_real_encoding_name(const char *name) { - struct pair { const char *pretty; const char *real; }; - static pair pretty_names[] = { + struct pair { const char *pretty; const char *real; }; + static pair pretty_names[] = { # define ADD(pretty, real) pair{pretty, real}, # include # undef ADD - }; + }; - static bool init = false; - if (!init) { - init = true; - boost::sort(pretty_names, [](pair a, pair b) { - return strcmp(a.pretty, b.pretty) < 0; - }); - } + static bool init = false; + if (!init) { + init = true; + boost::sort(pretty_names, [](pair a, pair b) { + return strcmp(a.pretty, b.pretty) < 0; + }); + } - auto enc = boost::lower_bound(pretty_names, name, [](pair a, const char *b) { + auto enc = boost::lower_bound(pretty_names, name, [](pair a, const char *b) { return strcmp(a.pretty, b) < 0; - }); + }); - if (enc != std::end(pretty_names) && strcmp(enc->pretty, name) == 0) - return enc->real; - return name; + if (enc != std::end(pretty_names) && strcmp(enc->pretty, name) == 0) + return enc->real; + return name; } size_t get_bom_size(Iconv& cd) {