mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-05 02:58:04 +00:00
Use stdstring in more instances
This commit is contained in:
parent
06f98fcd16
commit
82c62b1693
@ -19,6 +19,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "snes_ntsc/snes_ntsc.h"
|
||||
#include "snes_ntsc/snes_ntsc.c"
|
||||
|
||||
@ -80,22 +83,22 @@ static void blargg_ntsc_snes_initialize(void *data,
|
||||
|
||||
if (config->get_string(userdata, "tvtype", &tvtype, "composite"))
|
||||
{
|
||||
if (!strcmp(tvtype, "composite"))
|
||||
if (string_is_equal(tvtype, "composite"))
|
||||
{
|
||||
setup = snes_ntsc_composite;
|
||||
setup.merge_fields = 1;
|
||||
}
|
||||
else if (!strcmp(tvtype, "rf"))
|
||||
else if (string_is_equal(tvtype, "rf"))
|
||||
{
|
||||
setup = snes_ntsc_composite;
|
||||
setup.merge_fields = 0;
|
||||
}
|
||||
else if (!strcmp(tvtype, "rgb"))
|
||||
else if (string_is_equal(tvtype, "rgb"))
|
||||
{
|
||||
setup = snes_ntsc_rgb;
|
||||
setup.merge_fields = 1;
|
||||
}
|
||||
else if (!strcmp(tvtype, "svideo"))
|
||||
else if (string_is_equal(tvtype, "svideo"))
|
||||
{
|
||||
setup = snes_ntsc_svideo;
|
||||
setup.merge_fields = 1;
|
||||
|
@ -579,7 +579,7 @@ static struct config_entry_list *config_get_entry(const config_file_t *conf,
|
||||
|
||||
for (entry = conf->entries; entry; entry = entry->next)
|
||||
{
|
||||
if (hash == entry->key_hash && !strcmp(key, entry->key))
|
||||
if (hash == entry->key_hash && string_is_equal(key, entry->key))
|
||||
return entry;
|
||||
|
||||
previous = entry;
|
||||
@ -931,7 +931,7 @@ bool config_entry_exists(config_file_t *conf, const char *entry)
|
||||
|
||||
while (list)
|
||||
{
|
||||
if (!strcmp(entry, list->key))
|
||||
if (string_is_equal(entry, list->key))
|
||||
return true;
|
||||
list = list->next;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <compat/strl.h>
|
||||
#include <retro_dirent.h>
|
||||
|
||||
#include <string/stdstring.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
static int qstrcmp_plain(const void *a_, const void *b_)
|
||||
@ -123,7 +124,7 @@ static int parse_dir_entry(const char *name, char *file_path,
|
||||
if (!include_dirs && is_dir)
|
||||
return 1;
|
||||
|
||||
if (!strcmp(name, ".") || !strcmp(name, ".."))
|
||||
if (string_is_equal(name, ".") || string_is_equal(name, ".."))
|
||||
return 1;
|
||||
|
||||
if (!is_dir && ext_list &&
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <net/net_ifinfo.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include <string/stdstring.h>
|
||||
#include <net/net_natt.h>
|
||||
|
||||
#if HAVE_MINIUPNPC
|
||||
@ -189,7 +190,7 @@ bool natt_open_port_any(struct natt_status *status, uint16_t port, enum socket_p
|
||||
struct net_ifinfo_entry *entry = list.entries + i;
|
||||
|
||||
/* ignore localhost */
|
||||
if (!strcmp(entry->host, "127.0.0.1") || !strcmp(entry->host, "::1"))
|
||||
if (string_is_equal(entry->host, "127.0.0.1") || string_is_equal(entry->host, "::1"))
|
||||
continue;
|
||||
|
||||
/* make a request for this host */
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <compat/zlib.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/trans_stream.h>
|
||||
|
||||
struct zlib_trans_stream
|
||||
@ -70,7 +71,7 @@ static void zlib_inflate_stream_free(void *data)
|
||||
static bool zlib_deflate_define(void *data, const char *prop, uint32_t val)
|
||||
{
|
||||
struct zlib_trans_stream *z = (struct zlib_trans_stream *) data;
|
||||
if (!strcmp(prop, "level"))
|
||||
if (string_is_equal(prop, "level"))
|
||||
{
|
||||
z->ex = (int) val;
|
||||
return true;
|
||||
@ -81,7 +82,7 @@ static bool zlib_deflate_define(void *data, const char *prop, uint32_t val)
|
||||
static bool zlib_inflate_define(void *data, const char *prop, uint32_t val)
|
||||
{
|
||||
struct zlib_trans_stream *z = (struct zlib_trans_stream *) data;
|
||||
if (!strcmp(prop, "window_bits"))
|
||||
if (string_is_equal(prop, "window_bits"))
|
||||
{
|
||||
z->ex = (int) val;
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user