style: fix typos

This commit is contained in:
zzyyyl
2022-07-05 17:55:14 +08:00
parent 34dd3228fe
commit bfb26b358e
2 changed files with 4 additions and 4 deletions

View File

@@ -25,8 +25,8 @@ bool asst::InfrastConfiger::parse(const json::value& json)
skill.templ_name = templ_name;
m_templ_required.emplace(skill.templ_name);
// 默认id就是模板名去掉格式
std::string defalut_id = templ_name.substr(0, templ_name.find_last_of('.'));
std::string id = skill_json.get("id", defalut_id);
std::string default_id = templ_name.substr(0, templ_name.find_last_of('.'));
std::string id = skill_json.get("id", default_id);
skill.id = id;
if (skill_json.contains("name")) {
for (const json::value& skill_names : skill_json.at("name").as_array()) {

View File

@@ -23,7 +23,7 @@ namespace MeoAsstGui
private static readonly string _configBakFilename = System.Environment.CurrentDirectory + "\\gui.json.bak";
private static JObject _viewStatus = new JObject();
public static string Get(string key, string defalut_value)
public static string Get(string key, string default_value)
{
if (_viewStatus.ContainsKey(key))
{
@@ -31,7 +31,7 @@ namespace MeoAsstGui
}
else
{
return defalut_value;
return default_value;
}
}