Add support for size_t to wxConfig
Allow writing and reading size_t values directly too, there were not previously accepted unlike all the other arithmetic types. Closes #19091.
This commit is contained in:
parent
fce8780297
commit
0c837e5310
4 changed files with 65 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ TEST_CASE("wxConfig::ReadWriteLocal", "[config]")
|
|||
const wxULongLong_t uval64 = wxULL(0x9000000000000009);
|
||||
config->Write("ull", uval64);
|
||||
|
||||
config->Write("size", size_t(UINT_MAX));
|
||||
#ifdef wxHAS_CONFIG_TEMPLATE_RW
|
||||
config->Write("color1", wxColour(11,22,33,44));
|
||||
#endif // wxHAS_CONFIG_TEMPLATE_RW
|
||||
|
|
@ -110,6 +111,10 @@ TEST_CASE("wxConfig::ReadWriteLocal", "[config]")
|
|||
CHECK( ll == static_cast<wxLongLong_t>(uval64) );
|
||||
CHECK( config->ReadLongLong("ull", 0) == static_cast<wxLongLong_t>(uval64) );
|
||||
|
||||
size_t size;
|
||||
CHECK( config->Read("size", &size) );
|
||||
CHECK( size == UINT_MAX );
|
||||
|
||||
#ifdef wxHAS_CONFIG_TEMPLATE_RW
|
||||
wxColour color1;
|
||||
r = config->Read("color1", &color1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue