fprintf(fff, _("\n\n [手に入れたエッセンス]\n\n", "\n\n [Get Essence]\n\n"));
fprintf(fff, _("エッセンス 個数 エッセンス 個数 エッセンス 個数", "Essence Num Essence Num Essence Num "));
- auto essences = Smith::get_essence_list();
+ const auto &essences = Smith::get_essence_list();
auto n = essences.size();
std::vector<int> amounts;
std::transform(essences.begin(), essences.end(), std::back_inserter(amounts),
return;
}
- char p[60][80];
- for (int i = 0; i < 60; i++) {
- p[i][0] = '\0';
- }
-
- int col = 0;
+ char p[60][80]{};
+ auto col = 0;
strcat(p[col], _("\n\n [学習済みの青魔法]\n", "\n\n [Learned Blue Magic]\n"));
for (auto SpellProcessType : BLUE_MAGIC_TYPE_LIST) {
EnumClassFlagGroup<MonsterAbilityType>::get_flags(learnt_magic.ability_flags, std::back_inserter(learnt_spells));
col++;
- bool pcol = false;
+ auto pcol = false;
strcat(p[col], " ");
for (auto spell : learnt_spells) {
pcol = true;
- int l1 = strlen(p[col]);
- int l2 = strlen(monster_powers_short.at(spell));
+ auto l1 = strlen(p[col]);
+ auto l2 = strlen(monster_powers_short.at(spell));
if ((l1 + l2) >= 75) {
strcat(p[col], "\n");
col++;
*/
static errr interpret_macro_keycodes(int tok, char **zz)
{
- char buf_aux[MAX_MACRO_CHARS];
- char *t, *s;
+ char buf_aux[MAX_MACRO_CHARS]{};
if (max_macrotrigger >= MAX_MACRO_TRIG) {
msg_print(_("マクロトリガーの設定が多すぎます!", "Too many macro triggers!"));
return 1;
}
- int m = max_macrotrigger;
+ auto m = max_macrotrigger;
max_macrotrigger++;
- t = buf_aux;
- s = zz[0];
+ auto *t = buf_aux;
+ auto *s = zz[0];
while (*s) {
if ('\\' == *s) {
s++;
safe_setuid_grab();
fd_kill(savefile_new);
if (type == SaveType::DEBUG) {
- const auto debug_save_dir = std::filesystem::path(debug_savefile).remove_filename();
+ const std::filesystem::path debug_save_dir = std::filesystem::path(debug_savefile).remove_filename();
std::error_code ec;
std::filesystem::create_directory(debug_save_dir, ec);
}
+
safe_setuid_drop();
w_ptr->update_playtime();
auto result = false;