Initialized constant objects explicitly (Bug #208)
From 8.5.9 of the C++ 2003 standard: If no initializer is specified for an object, and the object is of (possibly cv-qualified) non-POD class type (or array thereof), the object shall be default-initialized; if the object is of const-qualified type, the underlying class type shall have a user-declared default constructor. Otherwise, if no initializer is specified for a nonstatic object, the object and its subobjects, if any, have an indeterminate initial value); if the object or any of its subobjects are of const-qualified type, the program is ill-formed.
This commit is contained in:
parent
e919668225
commit
19fded5473
|
@ -169,12 +169,12 @@ const wxMBConv &WrapXerces::getMBConv()
|
|||
return wxConvUTF8;
|
||||
case 2:
|
||||
{
|
||||
const static wxMBConvUTF16 conv;
|
||||
const static wxMBConvUTF16 conv = wxMBConvUTF16();
|
||||
return conv;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
const static wxMBConvUTF32 conv;
|
||||
const static wxMBConvUTF32 conv = wxMBConvUTF32();
|
||||
return conv;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue