Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/condition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,13 @@
};
}

conditional_t::func f_is_wall_adjacent( bool is_npc )
{
return [is_npc]( const_dialogue const & d ) {

Check failure on line 1591 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / iwyu

no viable conversion from returned value of type '(lambda at /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/Cataclysm-DDA/src/condition.cpp:1591:12)' to function return type 'conditional_t::func' (aka 'function<bool (const const_dialogue &)>')

Check failure on line 1591 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang oldest supported, Ubuntu, Curses)

no viable conversion from returned value of type '(lambda at src/condition.cpp:1591:12)' to function return type 'conditional_t::func' (aka 'function<bool (const const_dialogue &)>')

Check failure on line 1591 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / run-clang-tidy (directly-changed)

no viable conversion from returned value of type '(lambda at /home/runner/work/Cataclysm-DDA/Cataclysm-DDA/src/condition.cpp:1591:12)' to function return type 'conditional_t::func' (aka 'function<bool (const const_dialogue &)>') [clang-diagnostic-error]
return d.const_actor( is_npc )->is_wall_adjacent();

Check failure on line 1592 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / iwyu

no member named 'is_wall_adjacent' in 'const_talker'

Check failure on line 1592 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang oldest supported, Ubuntu, Curses)

no member named 'is_wall_adjacent' in 'const_talker'

Check failure on line 1592 in src/condition.cpp

View workflow job for this annotation

GitHub Actions / run-clang-tidy (directly-changed)

no member named 'is_wall_adjacent' in 'const_talker' [clang-diagnostic-error]
};
}

conditional_t::func f_is_underwater( bool is_npc )
{
const map &here = get_map();
Expand Down
1 change: 1 addition & 0 deletions src/npctalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5224,6 +5224,7 @@
const bool same_snippet = jo.get_bool( "same_snippet", false );
const bool outdoor_only = jo.get_bool( "outdoor_only", false );
const bool store_in_lore = jo.get_bool( "store_in_lore", false );
const bool is_wall_adjacent = jo.get_bool( "is_wall_adjacent", false );

Check failure on line 5227 in src/npctalk.cpp

View workflow job for this annotation

GitHub Actions / iwyu

unused variable 'is_wall_adjacent' [-Werror,-Wunused-variable]

Check failure on line 5227 in src/npctalk.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang oldest supported, Ubuntu, Curses)

unused variable 'is_wall_adjacent' [-Werror,-Wunused-variable]

Check failure on line 5227 in src/npctalk.cpp

View workflow job for this annotation

GitHub Actions / run-clang-tidy (directly-changed)

unused variable 'is_wall_adjacent' [clang-diagnostic-unused-variable,-warnings-as-errors]

Check failure on line 5227 in src/npctalk.cpp

View workflow job for this annotation

GitHub Actions / run-clang-tidy (directly-changed)

Value stored to 'is_wall_adjacent' during its initialization is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
const bool sound = jo.get_bool( "sound", false );
const bool popup_msg = jo.get_bool( "popup", false );
const bool popup_w_interrupt_query_msg = jo.get_bool( "popup_w_interrupt_query", false );
Expand Down
Loading