summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/lib/osdobj_common.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-02-28 11:09:00 +1100
committer Vas Crabb <vas@vastheman.com>2016-02-28 13:36:19 +1100
commitaec01e740736db267e452f0ed5947649f79e3408 (patch)
tree633ca7d80a756bfcc05d871817201c729e55142d /src/osd/modules/lib/osdobj_common.h
parent3cba23966f6c1c6f9ee616e5af00ebcfcb0d0b0a (diff)
Replace strformat, strprintf and strcatprintf with type-safe steam_format and string_format
Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools
Diffstat (limited to 'src/osd/modules/lib/osdobj_common.h')
-rw-r--r--src/osd/modules/lib/osdobj_common.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index d4fba565964..8152c7bfea9 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -118,10 +118,10 @@ public:
const char *aspect() const { return value(OSDOPTION_ASPECT); }
const char *resolution() const { return value(OSDOPTION_RESOLUTION); }
const char *view() const { return value(OSDOPTION_VIEW); }
- const char *screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SCREEN, index); return value(temp.c_str()); }
- const char *aspect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_ASPECT, index); return value(temp.c_str()); }
- const char *resolution(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_RESOLUTION, index); return value(temp.c_str()); }
- const char *view(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_VIEW, index); return value(temp.c_str()); }
+ const char *screen(int index) const { return value(string_format("%s%d", OSDOPTION_SCREEN, index).c_str()); }
+ const char *aspect(int index) const { return value(string_format("%s%d", OSDOPTION_ASPECT, index).c_str()); }
+ const char *resolution(int index) const { return value(string_format("%s%d", OSDOPTION_RESOLUTION, index).c_str()); }
+ const char *view(int index) const { return value(string_format("%s%d", OSDOPTION_VIEW, index).c_str()); }
// full screen options
bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); }
@@ -137,8 +137,8 @@ public:
bool gl_pbo() const { return bool_value(OSDOPTION_GL_PBO); }
bool gl_glsl() const { return bool_value(OSDOPTION_GL_GLSL); }
bool glsl_filter() const { return bool_value(OSDOPTION_GLSL_FILTER); }
- const char *shader_mame(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_MAME, index); return value(temp.c_str()); }
- const char *shader_screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_SCREEN, index); return value(temp.c_str()); }
+ const char *shader_mame(int index) const { return value(string_format("%s%d", OSDOPTION_SHADER_MAME, index).c_str()); }
+ const char *shader_screen(int index) const { return value(string_format("%s%d", OSDOPTION_SHADER_SCREEN, index).c_str()); }
// sound options
const char *sound() const { return value(OSDOPTION_SOUND); }
@@ -146,7 +146,7 @@ public:
// CoreAudio specific options
const char *audio_output() const { return value(OSDOPTION_AUDIO_OUTPUT); }
- const char *audio_effect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_AUDIO_EFFECT, index); return value(temp.c_str()); }
+ const char *audio_effect(int index) const { return value(string_format("%s%d", OSDOPTION_AUDIO_EFFECT, index).c_str()); }
private:
static const options_entry s_option_entries[];