File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -347,14 +347,15 @@ void avatar::set_active_mission( mission &cur_mission )
347
347
348
348
void avatar::set_active_point_of_interest ( point_of_interest active_point_of_interest )
349
349
{
350
- for ( auto iter = points_of_interest. begin (); iter < points_of_interest. end (); iter++ ) {
350
+ for ( auto iter : points_of_interest ) {
351
351
// It's really sufficient to only check the position as used...
352
- if ( iter._Ptr -> pos == active_point_of_interest.pos &&
353
- iter._Ptr -> text == active_point_of_interest.text ) {
352
+ if ( iter.pos == active_point_of_interest.pos &&
353
+ iter.text == active_point_of_interest.text ) {
354
354
this ->active_point_of_interest = active_point_of_interest;
355
355
active_mission = nullptr ;
356
356
return ;
357
357
}
358
+
358
359
}
359
360
360
361
debugmsg ( " active point of interest %s is not in the points_of_interest list" ,
@@ -446,7 +447,7 @@ void avatar::add_point_of_interest( point_of_interest new_point_of_interest )
446
447
void avatar::delete_point_of_interest ( tripoint_abs_omt pos )
447
448
{
448
449
for ( auto iter = points_of_interest.begin (); iter != points_of_interest.end (); iter++ ) {
449
- if ( iter. _Ptr ->pos == pos ) {
450
+ if ( iter->pos == pos ) {
450
451
points_of_interest.erase ( iter );
451
452
452
453
if ( active_point_of_interest.pos == pos ) {
Original file line number Diff line number Diff line change 25
25
#include " magic_teleporter_list.h"
26
26
#include " mdarray.h"
27
27
#include " memory_fast.h"
28
+ #include " point.h"
28
29
#include " type_id.h"
29
30
#include " units.h"
30
31
Original file line number Diff line number Diff line change 18
18
#include " npc.h"
19
19
#include " faction.h"
20
20
#include " output.h"
21
+ #include " point.h"
21
22
#include " string_formatter.h"
22
23
#include " talker.h"
23
24
#include " translation.h"
@@ -239,8 +240,8 @@ void mission_ui_impl::draw_controls()
239
240
get_avatar ().delete_point_of_interest ( upoints_of_interest[selected_mission].pos );
240
241
}
241
242
242
- if ( selected_tab != mission_ui_tab_enum::POINTS_OF_INTEREST && umissions.empty () ||
243
- selected_tab == mission_ui_tab_enum::POINTS_OF_INTEREST && upoints_of_interest.empty () ) {
243
+ if ( ( selected_tab != mission_ui_tab_enum::POINTS_OF_INTEREST && umissions.empty () ) ||
244
+ ( selected_tab == mission_ui_tab_enum::POINTS_OF_INTEREST && upoints_of_interest.empty () ) ) {
244
245
static const std::map< mission_ui_tab_enum, std::string > nope = {
245
246
{ mission_ui_tab_enum::ACTIVE, translate_marker ( " You have no active missions!" ) },
246
247
{ mission_ui_tab_enum::COMPLETED, translate_marker ( " You haven't completed any missions!" ) },
You can’t perform that action at this time.
0 commit comments