OSDN Git Service

[Refactor] #3733 optional 型の値取得処理 value() を撤廃した その3
[hengbandforosx/hengbandosx.git] / src / cmd-action / cmd-hissatsu.cpp
index 5d616fe..c042ee0 100644 (file)
@@ -112,11 +112,11 @@ static int get_hissatsu_power(PlayerType *player_ptr, SPELL_IDX *sn)
             choice = ' ';
         } else {
             const auto new_choice = input_command(prompt);
-            if (!new_choice.has_value()) {
+            if (!new_choice) {
                 break;
             }
 
-            choice = new_choice.value();
+            choice = *new_choice;
         }
 
         auto should_redraw_cursor = true;
@@ -396,7 +396,7 @@ void do_cmd_gain_hissatsu(PlayerType *player_ptr)
         return;
     }
 
-    const auto sval = o_ptr->bi_key.sval().value();
+    const auto sval = *o_ptr->bi_key.sval();
     auto gain = false;
     for (auto i = sval * 8; i < sval * 8 + 8; i++) {
         if (player_ptr->spell_learned1 & (1UL << i)) {