diff --git a/include/nbla/function/utils/base_pooling.hpp b/include/nbla/function/utils/base_pooling.hpp index ae5514647..96fa8817e 100644 --- a/include/nbla/function/utils/base_pooling.hpp +++ b/include/nbla/function/utils/base_pooling.hpp @@ -70,7 +70,7 @@ class BasePooling : public BaseFunction { } virtual ~BasePooling() {} - virtual shared_ptr copy() const { return NULL; } + virtual shared_ptr copy() const { return nullptr; } virtual vector in_types() { return vector{get_dtype()}; } virtual vector out_types() { return vector{get_dtype()}; } virtual int min_inputs() { return 1; } diff --git a/src/nbla/logger.cpp b/src/nbla/logger.cpp index c35a7b14d..788cc4758 100644 --- a/src/nbla/logger.cpp +++ b/src/nbla/logger.cpp @@ -38,7 +38,7 @@ std::shared_ptr get_logger(void) { #ifdef _WIN32 TCHAR szPath[MAX_PATH]; - if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, + if (SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_APPDATA | CSIDL_FLAG_CREATE, nullptr, 0, szPath))) { logpath = szPath; logpath += "\\NNabla"; @@ -49,13 +49,13 @@ std::shared_ptr get_logger(void) { } #else const char *homedir = getenv("HOME"); - if (homedir == NULL) { + if (homedir == nullptr) { struct passwd *pw = getpwuid(getuid()); - if (pw != NULL) { + if (pw != nullptr) { homedir = pw->pw_dir; } } - if (homedir == NULL) { + if (homedir == nullptr) { logpath = "/tmp_"; logpath += getuid(); } else {