+ code cleanup

This commit is contained in:
Rainer Kottenhoff 2018-10-11 17:13:01 +02:00
parent 8e5e93880c
commit 4e7329770b
2 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ using namespace Scintilla;
// *** Oningmo configuration ***
// ============================================================================
const OnigEncoding g_pOnigEncodingType = ONIG_ENCODING_UTF8; // ONIG_ENCODING_ASCII;
constexpr OnigEncoding g_pOnigEncodingType = ONIG_ENCODING_UTF8; // ONIG_ENCODING_ASCII;
static OnigEncoding g_UsedEncodingsTypes[] = { g_pOnigEncodingType };
// ============================================================================
@ -147,16 +147,16 @@ RegexSearchBase *Scintilla::CreateRegexSearch(CharClassify *charClassTable)
*
* Is the character an octal digit?
*/
inline bool IsOctalDigit(char ch)
constexpr bool IsOctalDigit(char ch)
{
return ((ch >= '0') && (ch <= '7'));
}
// ----------------------------------------------------------------------------
/**
* If the character is an hexa digit, get its value.
* If the character is an hex digit, get its value.
*/
inline int GetHexDigit(char ch)
constexpr int GetHexDigit(char ch)
{
if ((ch >= '0') && (ch <= '9')) {
return (ch - '0');

View File

@ -291,7 +291,7 @@ extern "C" int Encoding_CountOf()
// ============================================================================
static int MapCPI2Encoding(const int iNP3Encoding)
constexpr int MapCPI2Encoding(const int iNP3Encoding)
{
if ((iNP3Encoding < 0) || (iNP3Encoding >= Encoding_CountOf())) {
return UNKNOWN_ENCODING; // CPI_NONE, CPI_GET
@ -305,7 +305,7 @@ static int MapCPI2Encoding(const int iNP3Encoding)
static int FindCodePage(const Encoding& encoding)
constexpr int FindCodePage(const Encoding& encoding)
{
int iCodePage = -1;