Merge: Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Jonathan G Rennison
2019-04-11 18:14:13 +01:00
585 changed files with 6604 additions and 6604 deletions

View File

@@ -60,9 +60,9 @@ static inline StringID MakeStringID(StringTab tab, uint index)
}
class StringParameters {
StringParameters *parent; ///< If not NULL, this instance references data from this parent instance.
StringParameters *parent; ///< If not nullptr, this instance references data from this parent instance.
uint64 *data; ///< Array with the actual data.
WChar *type; ///< Array with type information about the data. Can be NULL when no type information is needed. See #StringControlCode.
WChar *type; ///< Array with type information about the data. Can be nullptr when no type information is needed. See #StringControlCode.
public:
uint offset; ///< Current offset in the data/type arrays.
@@ -70,7 +70,7 @@ public:
/** Create a new StringParameters instance. */
StringParameters(uint64 *data, uint num_param, WChar *type) :
parent(NULL),
parent(nullptr),
data(data),
type(type),
offset(0),
@@ -80,9 +80,9 @@ public:
/** Create a new StringParameters instance. */
template <size_t Tnum_param>
StringParameters(int64 (&data)[Tnum_param]) :
parent(NULL),
parent(nullptr),
data((uint64 *)data),
type(NULL),
type(nullptr),
offset(0),
num_param(Tnum_param)
{
@@ -100,8 +100,8 @@ public:
num_param(size)
{
assert(size <= parent.GetDataLeft());
if (parent.type == NULL) {
this->type = NULL;
if (parent.type == nullptr) {
this->type = nullptr;
} else {
this->type = parent.type + parent.offset;
}
@@ -109,7 +109,7 @@ public:
~StringParameters()
{
if (this->parent != NULL) {
if (this->parent != nullptr) {
this->parent->offset += this->num_param;
}
}
@@ -148,7 +148,7 @@ public:
/** Does this instance store information about the type of the parameters. */
bool HasTypeInformation() const
{
return this->type != NULL;
return this->type != nullptr;
}
/** Get the type of a specific element. */
@@ -252,7 +252,7 @@ public:
/**
* Get the next string to search through.
* @return The next string or NULL if there is none.
* @return The next string or nullptr if there is none.
*/
virtual const char *NextString() = 0;
@@ -283,6 +283,6 @@ public:
bool FindMissingGlyphs(const char **str);
};
void CheckForMissingGlyphs(bool base_font = true, MissingGlyphSearcher *search = NULL);
void CheckForMissingGlyphs(bool base_font = true, MissingGlyphSearcher *search = nullptr);
#endif /* STRINGS_FUNC_H */