Start using string_is_empty in more places

This commit is contained in:
twinaphex 2015-12-26 07:13:43 +01:00
parent 91f61afa16
commit f8ce509b21
2 changed files with 6 additions and 4 deletions

View File

@ -21,6 +21,7 @@
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <dynamic/dylib.h>
#include <string/stdstring.h>
#include <boolean.h>
@ -692,7 +693,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
if (settings->system_directory[0] == '\0')
if (string_is_empty(settings->system_directory))
{
char *fullpath = NULL;
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);

View File

@ -25,6 +25,7 @@
#include <compat/msvc.h>
#include <file/file_path.h>
#include <file/file_extract.h>
#include <string/stdstring.h>
#include "patch.h"
#include "file_ops.h"
@ -522,7 +523,7 @@ static bool try_bps_patch(uint8_t **buf, ssize_t *size)
if (!allow_bps)
return false;
if (global->name.bps[0] == '\0')
if (string_is_empty(global->name.bps))
return false;
return apply_patch_content(buf, size, "BPS", global->name.bps,
@ -536,7 +537,7 @@ static bool try_ups_patch(uint8_t **buf, ssize_t *size)
if (!allow_ups)
return false;
if (global->name.ups[0] == '\0')
if (string_is_empty(global->name.ups))
return false;
return apply_patch_content(buf, size, "UPS", global->name.ups,
@ -550,7 +551,7 @@ static bool try_ips_patch(uint8_t **buf, ssize_t *size)
if (!allow_ips)
return false;
if (global->name.ips[0] == '\0')
if (string_is_empty(global->name.ips))
return false;
return apply_patch_content(buf, size, "IPS", global->name.ips,