aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/military')
-rw-r--r--src/openvic-simulation/military/Unit.cpp14
-rw-r--r--src/openvic-simulation/military/Unit.hpp14
2 files changed, 14 insertions, 14 deletions
diff --git a/src/openvic-simulation/military/Unit.cpp b/src/openvic-simulation/military/Unit.cpp
index 3da24da..63ece91 100644
--- a/src/openvic-simulation/military/Unit.cpp
+++ b/src/openvic-simulation/military/Unit.cpp
@@ -27,7 +27,7 @@ Unit::type_t Unit::get_type() const {
return type;
}
-std::string const& Unit::get_sprite() const {
+std::string_view Unit::get_sprite() const {
return sprite;
}
@@ -35,7 +35,7 @@ bool Unit::is_active() const {
return active;
}
-std::string const& Unit::get_unit_type() const {
+std::string_view Unit::get_unit_type() const {
return unit_type;
}
@@ -88,15 +88,15 @@ bool LandUnit::get_primary_culture() const {
return primary_culture;
}
-std::string const& LandUnit::get_sprite_override() const {
+std::string_view LandUnit::get_sprite_override() const {
return sprite_override;
}
-std::string const& LandUnit::get_sprite_mount() const {
+std::string_view LandUnit::get_sprite_mount() const {
return sprite_mount;
}
-std::string const& LandUnit::get_sprite_mount_attach_node() const {
+std::string_view LandUnit::get_sprite_mount_attach_node() const {
return sprite_mount_attach_node;
}
@@ -146,11 +146,11 @@ bool NavalUnit::is_transport() const {
return transport;
}
-std::string const& NavalUnit::get_move_sound() const {
+std::string_view NavalUnit::get_move_sound() const {
return move_sound;
}
-std::string const& NavalUnit::get_select_sound() const {
+std::string_view NavalUnit::get_select_sound() const {
return select_sound;
}
diff --git a/src/openvic-simulation/military/Unit.hpp b/src/openvic-simulation/military/Unit.hpp
index 65e6259..de30763 100644
--- a/src/openvic-simulation/military/Unit.hpp
+++ b/src/openvic-simulation/military/Unit.hpp
@@ -57,9 +57,9 @@ namespace OpenVic {
icon_t get_icon() const;
type_t get_type() const;
- std::string const& get_sprite() const;
+ std::string_view get_sprite() const;
bool is_active() const;
- std::string const& get_unit_type() const;
+ std::string_view get_unit_type() const;
bool has_floating_flag() const;
uint32_t get_priority() const;
@@ -94,9 +94,9 @@ namespace OpenVic {
LandUnit(LandUnit&&) = default;
bool get_primary_culture() const;
- std::string const& get_sprite_override() const;
- std::string const& get_sprite_mount() const;
- std::string const& get_sprite_mount_attach_node() const;
+ std::string_view get_sprite_override() const;
+ std::string_view get_sprite_mount() const;
+ std::string_view get_sprite_mount_attach_node() const;
fixed_point_t get_reconnaissance() const;
fixed_point_t get_attack() const;
@@ -138,8 +138,8 @@ namespace OpenVic {
bool can_sail() const;
bool is_transport() const;
bool is_capital() const;
- std::string const& get_move_sound() const;
- std::string const& get_select_sound() const;
+ std::string_view get_move_sound() const;
+ std::string_view get_select_sound() const;
fixed_point_t get_colonial_points() const;
bool can_build_overseas() const;
uint32_t get_min_port_level() const;