diff --git a/dtool/src/prc/configPage.cxx b/dtool/src/prc/configPage.cxx index b8acfa879a..1059f2ea46 100644 --- a/dtool/src/prc/configPage.cxx +++ b/dtool/src/prc/configPage.cxx @@ -153,7 +153,7 @@ read_prc(istream &in) { // Look for the first line in the buffer.. char *newline = (char *)memchr((void *)buffer, '\n', count); - if (newline == NULL) { + if (newline == (char *)NULL) { // The buffer was one long line. Huh. prev_line += string(buffer, count); @@ -165,7 +165,7 @@ read_prc(istream &in) { // Now look for the next line, etc. char *start = newline + 1; newline = (char *)memchr((void *)start, '\n', buffer_end - start); - while (newline != NULL) { + while (newline != (char *)NULL) { length = newline - start; read_prc_line(string(start, length + 1)); start = newline + 1; @@ -290,7 +290,7 @@ get_num_declarations() const { //////////////////////////////////////////////////////////////////// const ConfigDeclaration *ConfigPage:: get_declaration(int n) const { - nassertr(n >= 0 && n < (int)_declarations.size(), NULL); + nassertr(n >= 0 && n < (int)_declarations.size(), (ConfigDeclaration *)NULL); return _declarations[n]; } diff --git a/dtool/src/prc/configPageManager.I b/dtool/src/prc/configPageManager.I index 451ed77b48..e4ccb8044d 100644 --- a/dtool/src/prc/configPageManager.I +++ b/dtool/src/prc/configPageManager.I @@ -137,7 +137,7 @@ get_num_implicit_pages() const { INLINE ConfigPage *ConfigPageManager:: get_implicit_page(int n) const { check_sort_pages(); - nassertr(n >= 0 && n < (int)_implicit_pages.size(), NULL); + nassertr(n >= 0 && n < (int)_implicit_pages.size(), (ConfigPage *)NULL); return _implicit_pages[n]; } @@ -163,7 +163,7 @@ get_num_explicit_pages() const { INLINE ConfigPage *ConfigPageManager:: get_explicit_page(int n) const { check_sort_pages(); - nassertr(n >= 0 && n < (int)_explicit_pages.size(), NULL); + nassertr(n >= 0 && n < (int)_explicit_pages.size(), (ConfigPage *)NULL); return _explicit_pages[n]; } diff --git a/dtool/src/prc/configVariableCore.I b/dtool/src/prc/configVariableCore.I index d6a27f42a6..4b105b7e1e 100644 --- a/dtool/src/prc/configVariableCore.I +++ b/dtool/src/prc/configVariableCore.I @@ -204,7 +204,7 @@ get_num_references() const { INLINE const ConfigDeclaration *ConfigVariableCore:: get_reference(int n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_declarations.size(), NULL); + nassertr(n >= 0 && n < (int)_declarations.size(), (ConfigDeclaration *)NULL); return _declarations[n]; } @@ -238,7 +238,7 @@ get_num_trusted_references() const { INLINE const ConfigDeclaration *ConfigVariableCore:: get_trusted_reference(int n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_trusted_declarations.size(), NULL); + nassertr(n >= 0 && n < (int)_trusted_declarations.size(), (ConfigDeclaration *)NULL); return _trusted_declarations[n]; } @@ -265,7 +265,7 @@ get_num_unique_references() const { INLINE const ConfigDeclaration *ConfigVariableCore:: get_unique_reference(int n) const { check_sort_declarations(); - nassertr(n >= 0 && n < (int)_unique_declarations.size(), NULL); + nassertr(n >= 0 && n < (int)_unique_declarations.size(), (ConfigDeclaration *)NULL); return _unique_declarations[n]; } diff --git a/dtool/src/prc/configVariableCore.cxx b/dtool/src/prc/configVariableCore.cxx index 8c730b784c..43cb14e532 100644 --- a/dtool/src/prc/configVariableCore.cxx +++ b/dtool/src/prc/configVariableCore.cxx @@ -246,7 +246,7 @@ bool ConfigVariableCore:: clear_local_value() { if (_local_value != (ConfigDeclaration *)NULL) { ConfigPage::get_local_page()->delete_declaration(_local_value); - _local_value = NULL; + _local_value = (ConfigDeclaration *)NULL; _value_seq++; return true; } diff --git a/dtool/src/prc/configVariableManager.I b/dtool/src/prc/configVariableManager.I index 85de8f4ba7..5c03e21b0f 100644 --- a/dtool/src/prc/configVariableManager.I +++ b/dtool/src/prc/configVariableManager.I @@ -35,7 +35,7 @@ get_num_variables() const { //////////////////////////////////////////////////////////////////// INLINE ConfigVariableCore *ConfigVariableManager:: get_variable(int n) const { - nassertr(n >= 0 && n < (int)_variables.size(), NULL); + nassertr(n >= 0 && n < (int)_variables.size(), (ConfigVariableCore *)NULL); return _variables[n]; } diff --git a/dtool/src/prc/notify.cxx b/dtool/src/prc/notify.cxx index 489e6df468..fb65a8c970 100644 --- a/dtool/src/prc/notify.cxx +++ b/dtool/src/prc/notify.cxx @@ -253,7 +253,7 @@ get_top_category() { NotifyCategory *Notify:: get_category(const string &basename, NotifyCategory *parent_category) { // The string should not contain colons. - nassertr(basename.find(':') == string::npos, NULL); + nassertr(basename.find(':') == string::npos, (NotifyCategory *)NULL); string fullname; if (parent_category != (NotifyCategory *)NULL) { @@ -270,7 +270,7 @@ get_category(const string &basename, NotifyCategory *parent_category) { } pair result = - _categories.insert(Categories::value_type(fullname, NULL)); + _categories.insert(Categories::value_type(fullname, (NotifyCategory *)NULL)); bool inserted = result.second; NotifyCategory *&category = (*result.first).second; diff --git a/dtool/src/prc/prcKeyRegistry.cxx b/dtool/src/prc/prcKeyRegistry.cxx index 7b597bc931..56442c6efc 100644 --- a/dtool/src/prc/prcKeyRegistry.cxx +++ b/dtool/src/prc/prcKeyRegistry.cxx @@ -66,7 +66,7 @@ void PrcKeyRegistry:: record_keys(const KeyDef *key_def, int num_keys) { for (int i = 0; i < num_keys; i++) { const KeyDef *def = &key_def[i]; - if (def->_data != NULL) { + if (def->_data != (char *)NULL) { // Clear the ith key. while ((int)_keys.size() <= i) { Key key; @@ -136,7 +136,7 @@ get_num_keys() const { //////////////////////////////////////////////////////////////////// EVP_PKEY *PrcKeyRegistry:: get_key(int n) const { - nassertr(n >= 0 && n < (int)_keys.size(), NULL); + nassertr(n >= 0 && n < (int)_keys.size(), (EVP_PKEY *)NULL); if (_keys[n]._def != (KeyDef *)NULL) { if (_keys[n]._pkey == (EVP_PKEY *)NULL) {