Skip to content

Commit

Permalink
WCODE::IsHankaku の cache 引数を const にする
Browse files Browse the repository at this point in the history
  • Loading branch information
kengoide committed Feb 14, 2021
1 parent 21c03ae commit 9f8ec63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sakura_core/charset/charcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace WCODE
bool CalcHankakuByFont(wchar_t);

//2007.08.30 kobake 追加
bool IsHankaku(wchar_t wc, CCharWidthCache& cache)
bool IsHankaku(wchar_t wc, const CCharWidthCache& cache)
{
//※ほぼ未検証。ロジックが確定したらインライン化すると良い。

Expand Down
2 changes: 1 addition & 1 deletion sakura_core/charset/charcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void InitCharWidthCacheFromDC(const LOGFONT* lfs, ECharWidthFontMode fMode, HDC

namespace WCODE {
//!半角文字(縦長長方形)かどうか判定
bool IsHankaku(wchar_t wc, CCharWidthCache& cache = GetCharWidthCache());
bool IsHankaku(wchar_t wc, const CCharWidthCache& cache = GetCharWidthCache());
//!全角文字(正方形)かどうか判定
inline bool IsZenkaku(wchar_t wc) { return !IsHankaku(wc); }
}
Expand Down

0 comments on commit 9f8ec63

Please sign in to comment.