mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-09-21 06:12:56 -04:00
newer standards prefer nullptr over NULL - this is most of them but there are others too
This commit is contained in:
@@ -253,7 +253,7 @@ jobjectArray JNICALL ScriptMethodsMapNamespace::getPlanetaryMapLocations(
|
||||
if(!JavaLibrary::convert(localCategory, categoryName))
|
||||
{
|
||||
DEBUG_WARNING(true, ("[script bug] invalid category passed to getPlanetaryMapLocations"));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ jobjectArray JNICALL ScriptMethodsMapNamespace::getPlanetaryMapLocations(
|
||||
if(!JavaLibrary::convert(localSubCategory, subCategoryName))
|
||||
{
|
||||
DEBUG_WARNING(true, ("[script bug] invalid SubCategory passed to getPlanetaryMapLocations"));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,12 +282,12 @@ jobjectArray JNICALL ScriptMethodsMapNamespace::getPlanetaryMapLocations(
|
||||
|
||||
jlong jLocationId = mapLocation.getLocationId().getValue();
|
||||
if (!jLocationId)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
JavaString jNameString(mapLocation.getLocationName());
|
||||
|
||||
if (jNameString.getValue() == 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
LocalRefPtr jMapLocation = createNewObject(JavaLibrary::getClsMapLocation(),
|
||||
JavaLibrary::getMidMapLocation(),
|
||||
@@ -299,7 +299,7 @@ jobjectArray JNICALL ScriptMethodsMapNamespace::getPlanetaryMapLocations(
|
||||
static_cast<jbyte> (mapLocation.getFlags()));
|
||||
|
||||
if (jMapLocation == LocalRef::cms_nullPtr)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
setObjectArrayElement(*jlocs, index, *jMapLocation);
|
||||
}
|
||||
@@ -318,7 +318,7 @@ jobjectArray JNICALL ScriptMethodsMapNamespace::getPlanetaryMapCategories (JNI
|
||||
if(!JavaLibrary::convert(localCategory, categoryName))
|
||||
{
|
||||
DEBUG_WARNING(true, ("[script bug] invalid category passed to getPlanetaryMapCategories"));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,14 +350,14 @@ jobject JNICALL ScriptMethodsMapNamespace::getPlanetaryMapLocation (JNI
|
||||
if (id == NetworkId::cms_invalid)
|
||||
{
|
||||
DEBUG_WARNING(true, ("[script bug] invalid locationId passed to getPlanetaryMapCategories"));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int mlt = 0;
|
||||
const MapLocation * const mapLocation = PlanetMapManagerServer::getLocation (id, mlt);
|
||||
|
||||
if (!mapLocation)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
const JavaString jLocName (mapLocation->m_locationName);
|
||||
const JavaString jLocCategoryName (PlanetMapManager::findCategoryName (mapLocation->m_category));
|
||||
|
||||
Reference in New Issue
Block a user