*: use nullptr instead of NULL
This commit is contained in:
@@ -48,8 +48,8 @@ static bool
|
||||
IsSupportedCharset(const char *charset)
|
||||
{
|
||||
/* convert a space to check if the charset is valid */
|
||||
char *test = g_convert(" ", 1, charset, "UTF-8", NULL, NULL, NULL);
|
||||
if (test == NULL)
|
||||
char *test = g_convert(" ", 1, charset, "UTF-8", nullptr, nullptr, nullptr);
|
||||
if (test == nullptr)
|
||||
return false;
|
||||
|
||||
g_free(test);
|
||||
@@ -59,7 +59,7 @@ IsSupportedCharset(const char *charset)
|
||||
void
|
||||
SetFSCharset(const char *charset)
|
||||
{
|
||||
assert(charset != NULL);
|
||||
assert(charset != nullptr);
|
||||
|
||||
if (!IsSupportedCharset(charset))
|
||||
FormatFatalError("invalid filesystem charset: %s", charset);
|
||||
|
@@ -38,15 +38,15 @@
|
||||
void
|
||||
ConfigureFS()
|
||||
{
|
||||
const char *charset = NULL;
|
||||
const char *charset = nullptr;
|
||||
|
||||
charset = config_get_string(CONF_FS_CHARSET, NULL);
|
||||
if (charset == NULL) {
|
||||
charset = config_get_string(CONF_FS_CHARSET, nullptr);
|
||||
if (charset == nullptr) {
|
||||
#ifndef WIN32
|
||||
const gchar **encodings;
|
||||
g_get_filename_charsets(&encodings);
|
||||
|
||||
if (encodings[0] != NULL && *encodings[0] != '\0')
|
||||
if (encodings[0] != nullptr && *encodings[0] != '\0')
|
||||
charset = encodings[0];
|
||||
#else
|
||||
/* Glib claims that file system encoding is always utf-8
|
||||
|
Reference in New Issue
Block a user