Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors to runtime that can be caught at compile time. Replacing it with a generic C++11 constexpr allows for typecasting, comparison and compile time error checking.
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
|
||||
wxT( "file:" )
|
||||
};
|
||||
|
||||
for( unsigned ii = 0; ii < DIM(url_header); ii++ )
|
||||
for( unsigned ii = 0; ii < arrayDim(url_header); ii++ )
|
||||
{
|
||||
if( aDocName.First( url_header[ii] ) == 0 ) // looks like an internet url
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user