Codechange: use std::string_view for the string setting defaults

This commit is contained in:
Rubidium
2025-05-01 17:47:47 +02:00
committed by rubidium42
parent 5c7b04a0c2
commit 5ca686261e
9 changed files with 42 additions and 42 deletions

View File

@@ -61,7 +61,7 @@ max = CalendarTime::MAX_YEAR
[SDT_SSTR]
var = prefix
type = SLE_STRQ
def = nullptr
def = """"
[SDT_SSTR]
var = suffix

View File

@@ -176,7 +176,7 @@ var = locale.digit_group_separator
type = SLE_STRQ
from = SLV_118
flags = SettingFlag::NoNetworkSync
def = nullptr
def = """"
post_cb = [](auto) { MarkWholeScreenDirty(); }
cat = SC_BASIC
@@ -185,7 +185,7 @@ var = locale.digit_group_separator_currency
type = SLE_STRQ
from = SLV_118
flags = SettingFlag::NoNetworkSync
def = nullptr
def = """"
post_cb = [](auto) { MarkWholeScreenDirty(); }
cat = SC_BASIC
@@ -194,6 +194,6 @@ var = locale.digit_decimal_separator
type = SLE_STRQ
from = SLV_126
flags = SettingFlag::NoNetworkSync
def = nullptr
def = """"
post_cb = [](auto) { MarkWholeScreenDirty(); }
cat = SC_BASIC

View File

@@ -111,48 +111,48 @@ cat = SC_BASIC
name = ""soundsset""
type = SLE_STRQ
var = BaseSounds::ini_set
def = nullptr
def = """"
cat = SC_BASIC
[SDTG_SSTR]
name = ""musicset""
type = SLE_STRQ
var = BaseMusic::ini_set
def = nullptr
def = """"
cat = SC_BASIC
[SDTG_SSTR]
name = ""videodriver""
type = SLE_STRQ
var = _ini_videodriver
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_SSTR]
name = ""musicdriver""
type = SLE_STRQ
var = _ini_musicdriver
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_SSTR]
name = ""sounddriver""
type = SLE_STRQ
var = _ini_sounddriver
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_SSTR]
name = ""blitter""
type = SLE_STRQ
var = _ini_blitter
def = nullptr
def = """"
[SDTG_SSTR]
name = ""language""
type = SLE_STR
var = _config_language_file
def = nullptr
def = """"
cat = SC_BASIC
; workaround for implicit lengthof() in SDTG_LIST
@@ -168,14 +168,14 @@ cat = SC_BASIC
name = ""screenshot_format""
type = SLE_STR
var = _screenshot_format_name
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_SSTR]
name = ""savegame_format""
type = SLE_STR
var = _savegame_format
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_BOOL]
@@ -188,28 +188,28 @@ ifdef = HAS_TRUETYPE_FONT
name = ""small_font""
type = SLE_STR
var = _fcsettings.small.font
def = nullptr
def = """"
[SDTG_SSTR]
ifdef = HAS_TRUETYPE_FONT
name = ""medium_font""
type = SLE_STR
var = _fcsettings.medium.font
def = nullptr
def = """"
[SDTG_SSTR]
ifdef = HAS_TRUETYPE_FONT
name = ""large_font""
type = SLE_STR
var = _fcsettings.large.font
def = nullptr
def = """"
[SDTG_SSTR]
ifdef = HAS_TRUETYPE_FONT
name = ""mono_font""
type = SLE_STR
var = _fcsettings.mono.font
def = nullptr
def = """"
[SDTG_VAR]
ifdef = HAS_TRUETYPE_FONT
@@ -308,14 +308,14 @@ cat = SC_BASIC
name = ""keyboard""
type = SLE_STR
var = _keyboard_opt[0]
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_SSTR]
name = ""keyboard_caps""
type = SLE_STR
var = _keyboard_opt[1]
def = nullptr
def = """"
cat = SC_EXPERT
[SDTG_VAR]

View File

@@ -132,14 +132,14 @@ cat = SC_BASIC
var = music.custom_1
type = SLE_UINT8
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
cat = SC_BASIC
[SDTC_LIST]
var = music.custom_2
type = SLE_UINT8
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
cat = SC_BASIC
[SDTC_BOOL]

View File

@@ -47,7 +47,7 @@ var = network.client_name
type = SLE_STR
length = NETWORK_CLIENT_NAME_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
pre_cb = NetworkValidateClientName
post_cb = NetworkUpdateClientName
cat = SC_BASIC
@@ -57,7 +57,7 @@ var = network.server_name
type = SLE_STR
length = NETWORK_NAME_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"
pre_cb = NetworkValidateServerName
post_cb = [](auto) { UpdateClientConfigValues(); }
cat = SC_BASIC
@@ -67,7 +67,7 @@ var = network.connect_to_ip
type = SLE_STR
length = 0
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
[SDTC_SSTR]
var = network.last_joined

View File

@@ -39,7 +39,7 @@ var = network.server_password
type = SLE_STR
length = NETWORK_PASSWORD_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"
pre_cb = ReplaceAsteriskWithEmptyPassword
post_cb = [](auto) { NetworkServerUpdateGameInfo(); }
cat = SC_BASIC
@@ -49,7 +49,7 @@ var = network.rcon_password
type = SLE_STR
length = NETWORK_PASSWORD_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"
pre_cb = ReplaceAsteriskWithEmptyPassword
cat = SC_BASIC
@@ -58,7 +58,7 @@ var = network.admin_password
type = SLE_STR
length = NETWORK_PASSWORD_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"
cat = SC_BASIC
[SDTC_SSTR]
@@ -66,7 +66,7 @@ var = network.client_secret_key
type = SLE_STR
length = NETWORK_SECRET_KEY_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
; Prevent the user from setting the secret key from the console using 'setting'
pre_cb = [](auto) { return false; }
@@ -75,7 +75,7 @@ var = network.client_public_key
type = SLE_STR
length = NETWORK_SECRET_KEY_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync
def = nullptr
def = """"
; Prevent the user from setting the public key from the console using 'setting'
pre_cb = [](auto) { return false; }
@@ -84,11 +84,11 @@ var = network.server_invite_code
type = SLE_STR
length = NETWORK_INVITE_CODE_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"
[SDTC_SSTR]
var = network.server_invite_code_secret
type = SLE_STR
length = NETWORK_INVITE_CODE_SECRET_LENGTH
flags = SettingFlag::NotInSave, SettingFlag::NoNetworkSync, SettingFlag::NetworkOnly
def = nullptr
def = """"

View File

@@ -75,7 +75,7 @@ type = SLE_FILE_I16 | SLE_VAR_U16
flags = SettingFlag::NotInConfig
var = _old_diff_custom
length = 17
def = nullptr
def = """"
to = SLV_4
[SDTG_LIST]
@@ -86,7 +86,7 @@ type = SLE_UINT16
flags = SettingFlag::NotInConfig
var = _old_diff_custom
length = 18
def = nullptr
def = """"
full = nullptr
from = SLV_4