Skip to content

Commit

Permalink
update clang format conf
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Aug 5, 2023
1 parent 6397d71 commit 03c9180
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ Standard: c++20
TabWidth: 8
UseTab: Never
SpaceBeforeRangeBasedForLoopColon: false
QualifierAlignment: Right
2 changes: 1 addition & 1 deletion src/kana_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ auto create_map(std::string_view from, std::string_view to) -> std::map<std::str

auto half_to_full(std::string& str) -> std::string&
{
static std::map<std::string_view, std::string_view> const conv_map = {
static std::map<std::string_view, std::string_view> const conv_map = {
{ "ο½±", "γ‚’" }, { "ο½²", "γ‚€" }, { "ο½³", "ウ" }, { "エ", "エ" }, { "。", "γ‚ͺ" }, { "ο½Ά", "γ‚«" }, { "ο½·", "γ‚­" },
{ "ο½Έ", "γ‚―" }, { "ο½Ή", "γ‚±" }, { "ο½Ί", "γ‚³" }, { "ο½»", "γ‚΅" }, { "ο½Ό", "γ‚·" }, { "ο½½", "γ‚Ή" }, { "ο½Ύ", "γ‚»" },
{ "ο½Ώ", "γ‚½" }, { "οΎ€", "γ‚Ώ" }, { "チ", "チ" }, { "οΎ‚", "ツ" }, { "οΎƒ", "テ" }, { "οΎ„", "γƒˆ" }, { "οΎ…", "γƒŠ" },
Expand Down
2 changes: 1 addition & 1 deletion src/kana_conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ constexpr auto iter_unicode_chars(std::string_view str)
template<Direction D>
auto convert_kana(std::string_view str) -> std::string
{
static const auto conv_map{ [] {
static auto const conv_map{ [] {
if constexpr (D == Direction::kata_to_hira) {
return create_map(katakana_chars, hiragana_chars);
} else {
Expand Down
5 changes: 2 additions & 3 deletions src/marisa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "precompiled.h"
#include "util.h"

// TODO convert half width chars to full width chars
// TODO inflections; fix things like γ‚°γƒ©γ€γ„γŸ
// ι¦–γ‚’γͺγ§γ‚‰γ‚ŒγŸ
// θ­·γ‚Šζ‰‹γŸγ‘γŒγƒœγƒ€γ„γ¦γŸγ‚“γ γ‚ˆ
Expand Down Expand Up @@ -74,7 +73,7 @@ static constexpr std::size_t max_forward_search_len_bytes{ CharByteLen::THREE *

auto find_dic_file() -> std::filesystem::path
{
static const auto locations = {
static auto const locations = {
// possible .dic locations
std::filesystem::path("/usr/share/gd-tools/marisa_words.dic"),
std::filesystem::path(std::getenv("HOME")) / ".local/share/gd-tools/marisa_words.dic"
Expand Down Expand Up @@ -107,7 +106,7 @@ struct marisa_params

struct KanaInsensitiveCompare
{
bool operator()(const std::string& lhs, const std::string& rhs) const
bool operator()(std::string const& lhs, std::string const& rhs) const
{
return hiragana_to_katakana(lhs) < hiragana_to_katakana(rhs);
}
Expand Down

0 comments on commit 03c9180

Please sign in to comment.