From d0c67e199b20bff8203fa8d4f4fd3c3cb1947362 Mon Sep 17 00:00:00 2001 From: salix5 Date: Sun, 24 Nov 2024 23:18:53 +0800 Subject: [PATCH] card: remove const member function (#674) --- card.cpp | 8 ++++---- card.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/card.cpp b/card.cpp index c5ffb8b81..d709b4c0e 100644 --- a/card.cpp +++ b/card.cpp @@ -1276,15 +1276,15 @@ uint32 card::get_rscale() { temp.rscale = UINT32_MAX; return rscale; } -uint32 card::get_link_marker() const { +uint32 card::get_link_marker() { if(!(data.type & TYPE_LINK)) return 0; return data.link_marker; } -uint32 card::is_link_marker(uint32 dir) const { +uint32 card::is_link_marker(uint32 dir) { return get_link_marker() & dir; } -uint32 card::get_linked_zone() const { +uint32 card::get_linked_zone() { if(!(data.type & TYPE_LINK) || current.location != LOCATION_MZONE || is_treated_as_not_on_field()) return 0; uint32 zones = 0; @@ -1340,7 +1340,7 @@ void card::get_linked_cards(card_set* cset) { pduel->game_field->get_cards_in_zone(cset, linked_zone, p, LOCATION_MZONE); pduel->game_field->get_cards_in_zone(cset, linked_zone >> 16, 1 - p, LOCATION_MZONE); } -uint32 card::get_mutual_linked_zone() const { +uint32 card::get_mutual_linked_zone() { if(!(data.type & TYPE_LINK) || current.location != LOCATION_MZONE || is_treated_as_not_on_field()) return 0; uint32 zones = 0; diff --git a/card.h b/card.h index 1b52ec92b..7590fd652 100644 --- a/card.h +++ b/card.h @@ -262,11 +262,11 @@ class card { uint32 get_grave_race(uint8 playerid); uint32 get_lscale(); uint32 get_rscale(); - uint32 get_link_marker() const; - uint32 is_link_marker(uint32 dir) const; - uint32 get_linked_zone() const; + uint32 get_link_marker(); + uint32 is_link_marker(uint32 dir); + uint32 get_linked_zone(); void get_linked_cards(card_set* cset); - uint32 get_mutual_linked_zone() const; + uint32 get_mutual_linked_zone(); void get_mutual_linked_cards(card_set * cset); int32 is_link_state(); int32 is_extra_link_state();