Add a comment explaining the need for a temporary NULL variable.

Explain the changes of r75162 as they risk not being preserved otherwise.

Also make this variable static and const because it's really a constant.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-10 18:25:43 +00:00
parent 177aa57194
commit f201634c57

View File

@@ -76,7 +76,9 @@ wxXLocale& wxXLocale::GetCLocale()
{
if ( !gs_cLocale )
{
wxXLocaleCTag* tag = NULL;
// Notice that we need a separate variable because clang 3.1 refuses to
// cast nullptr (which is how NULL is defined in it) to anything.
static wxXLocaleCTag* const tag = NULL;
gs_cLocale = new wxXLocale(tag);
}