implemented suggested changes based off of feedback
This commit is contained in:
parent
d627dac5e8
commit
d2f7ba1cb4
3 changed files with 4 additions and 16 deletions
|
@ -55,7 +55,7 @@ BOOL GetCPInfoW(UINT codepage, CPINFO* cpinfo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//if codepage is utf8
|
||||
// if codepage is utf8
|
||||
if(codepage == 65001)
|
||||
{
|
||||
cpinfo->DefaultChar[0] = '?';
|
||||
|
|
|
@ -598,26 +598,14 @@ typedef unsigned char PAL_Boolean;
|
|||
# define PAL_COUNT(ARR) (sizeof(ARR) / sizeof(ARR[0]))
|
||||
#endif
|
||||
|
||||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** NameSpace
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
//!* NameSpace
|
||||
|
||||
namespace const_cpinfo{
|
||||
constexpr int MAX_DEFAULTCHAR = 2;
|
||||
constexpr int MAX_LEADBYTES = 12;
|
||||
}
|
||||
|
||||
/*
|
||||
**==============================================================================
|
||||
**
|
||||
** Structs
|
||||
**
|
||||
**==============================================================================
|
||||
*/
|
||||
//!* Structs
|
||||
|
||||
typedef struct _cpinfo {
|
||||
UINT MaxCharSize;
|
||||
|
|
|
@ -30,7 +30,7 @@ TEST(GetCPInfo, CodePageNotUTF8)
|
|||
CPINFO* cpinfo;
|
||||
BOOL result = GetCPInfoW(65000, cpinfo);
|
||||
|
||||
ASSERT_TRUE(result == FALSE);
|
||||
ASSERT_EQ(result, FALSE);
|
||||
EXPECT_EQ(errno, ERROR_INVALID_PARAMETER);
|
||||
|
||||
}
|
Loading…
Reference in a new issue