mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 01:40:10 +00:00
Made formula_callable::get_inputs and add_input take a reference instead of a pointer
This commit is contained in:
parent
766008978f
commit
92d0be3941
@ -386,7 +386,7 @@ wfl::variant attack_analysis::get_value(const std::string& key) const
|
||||
}
|
||||
}
|
||||
|
||||
void attack_analysis::get_inputs(wfl::formula_input_vector* inputs) const
|
||||
void attack_analysis::get_inputs(wfl::formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "target");
|
||||
add_input(inputs, "movements");
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
|
||||
double rating(double aggression, const readonly_context& ai_obj) const;
|
||||
wfl::variant get_value(const std::string& key) const;
|
||||
void get_inputs(wfl::formula_input_vector* inputs) const;
|
||||
void get_inputs(wfl::formula_input_vector& inputs) const;
|
||||
|
||||
bool attack_close(const map_location& loc) const;
|
||||
|
||||
|
@ -562,7 +562,7 @@ variant formula_ai::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void formula_ai::get_inputs(formula_input_vector* inputs) const
|
||||
void formula_ai::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "aggression");
|
||||
add_input(inputs, "leader_aggression");
|
||||
|
@ -163,7 +163,7 @@ private:
|
||||
void display_message(const std::string& msg) const;
|
||||
virtual wfl::variant get_value(const std::string& key) const;
|
||||
void set_value(const std::string& key, const wfl::variant& value);
|
||||
virtual void get_inputs(wfl::formula_input_vector* inputs) const;
|
||||
virtual void get_inputs(wfl::formula_input_vector& inputs) const;
|
||||
|
||||
mutable wfl::variant keeps_cache_;
|
||||
|
||||
|
@ -63,7 +63,7 @@ variant move_map_callable::get_value(const std::string& key) const
|
||||
}
|
||||
}
|
||||
|
||||
void move_map_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void move_map_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "moves");
|
||||
}
|
||||
@ -134,7 +134,7 @@ variant position_callable::get_value(const std::string& key) const {
|
||||
}
|
||||
}
|
||||
|
||||
void position_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void position_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "chance");
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ variant outcome_callable::get_value(const std::string& key) const {
|
||||
}
|
||||
}
|
||||
|
||||
void outcome_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void outcome_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "hitpoints_left");
|
||||
add_input(inputs, "probability");
|
||||
add_input(inputs, "possible_status");
|
||||
@ -179,7 +179,7 @@ variant attack_callable::get_value(const std::string& key) const {
|
||||
}
|
||||
}
|
||||
|
||||
void attack_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void attack_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "attack_from");
|
||||
add_input(inputs, "defender");
|
||||
add_input(inputs, "move_from");
|
||||
@ -264,7 +264,7 @@ variant attack_map_callable::get_value(const std::string& key) const {
|
||||
}
|
||||
}
|
||||
|
||||
void attack_map_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void attack_map_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "attacks");
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ variant recall_callable::get_value(const std::string& key) const {
|
||||
return variant();
|
||||
}
|
||||
|
||||
void recall_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void recall_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "id");
|
||||
add_input(inputs, "loc");
|
||||
}
|
||||
@ -328,7 +328,7 @@ variant recruit_callable::get_value(const std::string& key) const {
|
||||
return variant();
|
||||
}
|
||||
|
||||
void recruit_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void recruit_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "unit_type");
|
||||
add_input(inputs, "recruit_loc");
|
||||
}
|
||||
@ -364,7 +364,7 @@ variant set_unit_var_callable::get_value(const std::string& key) const {
|
||||
return variant();
|
||||
}
|
||||
|
||||
void set_unit_var_callable::get_inputs(formula_input_vector* inputs) const {
|
||||
void set_unit_var_callable::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "loc");
|
||||
add_input(inputs, "key");
|
||||
add_input(inputs, "value");
|
||||
|
@ -39,7 +39,7 @@ private:
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
|
||||
/* add to vars all attacks on enemy units around <attack_position> tile. attacker_location is tile where unit is currently standing. It's moved to attack_position first and then performs attack.*/
|
||||
void collect_possible_attacks(std::vector<variant>& vars, map_location attacker_location, map_location attack_position) const;
|
||||
@ -50,7 +50,7 @@ class attack_callable : public action_callable {
|
||||
battle_context bc_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
attack_callable(const map_location& move_from,
|
||||
const map_location& src, const map_location& dst, int weapon);
|
||||
@ -79,7 +79,7 @@ class move_callable : public action_callable {
|
||||
return variant();
|
||||
}
|
||||
}
|
||||
void get_inputs(formula_input_vector* inputs) const {
|
||||
void get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "src");
|
||||
add_input(inputs, "dst");
|
||||
}
|
||||
@ -108,7 +108,7 @@ class move_partial_callable : public action_callable {
|
||||
return variant();
|
||||
}
|
||||
}
|
||||
void get_inputs(formula_input_vector* inputs) const {
|
||||
void get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "src");
|
||||
add_input(inputs, "dst");
|
||||
}
|
||||
@ -132,7 +132,7 @@ class recall_callable : public action_callable {
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
recall_callable(const map_location& loc, const std::string& id)
|
||||
: loc_(loc), id_(id)
|
||||
@ -149,7 +149,7 @@ class recruit_callable : public action_callable {
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
recruit_callable(const map_location& loc, const std::string& type)
|
||||
: loc_(loc), type_(type)
|
||||
@ -166,7 +166,7 @@ class set_unit_var_callable : public action_callable {
|
||||
map_location loc_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
set_unit_var_callable(const std::string& key, const variant& value, const map_location& loc)
|
||||
: key_(key), value_(value), loc_(loc)
|
||||
@ -193,7 +193,7 @@ class move_map_callable : public formula_callable {
|
||||
const unit_map& units_;
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
move_map_callable(const move_map& srcdst, const move_map& dstsrc, const unit_map& units)
|
||||
: srcdst_(srcdst), dstsrc_(dstsrc), units_(units)
|
||||
@ -210,7 +210,7 @@ class position_callable : public formula_callable {
|
||||
int chance_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
position_callable(/*unit_map* units,*/ int chance) :
|
||||
//units_(),
|
||||
@ -241,7 +241,7 @@ class outcome_callable : public formula_callable {
|
||||
std::vector<variant> hitLeft_, prob_, status_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
outcome_callable( const std::vector<variant>& hitLeft,
|
||||
const std::vector<variant>& prob,
|
||||
|
@ -62,11 +62,11 @@ public:
|
||||
formula_input_vector inputs() const
|
||||
{
|
||||
formula_input_vector res;
|
||||
get_inputs(&res);
|
||||
get_inputs(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
virtual void get_inputs(formula_input_vector* /*inputs*/) const {}
|
||||
virtual void get_inputs(formula_input_vector& /*inputs*/) const {}
|
||||
|
||||
bool equals(const formula_callable* other) const
|
||||
{
|
||||
@ -124,9 +124,9 @@ protected:
|
||||
return variant(tmp);
|
||||
}
|
||||
|
||||
static inline void add_input(formula_input_vector* inputs, const std::string& key, FORMULA_ACCESS_TYPE access_type = FORMULA_READ_ONLY)
|
||||
static inline void add_input(formula_input_vector& inputs, const std::string& key, FORMULA_ACCESS_TYPE access_type = FORMULA_READ_ONLY)
|
||||
{
|
||||
inputs->push_back(formula_input(key, access_type));
|
||||
inputs.push_back(formula_input(key, access_type));
|
||||
}
|
||||
|
||||
virtual void set_value(const std::string& key, const variant& /*value*/)
|
||||
@ -193,7 +193,7 @@ private:
|
||||
return var;
|
||||
}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
main_.get_inputs(inputs);
|
||||
backup_.get_inputs(inputs);
|
||||
@ -221,7 +221,7 @@ private:
|
||||
return var;
|
||||
}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
backup_.get_inputs(inputs);
|
||||
}
|
||||
@ -277,7 +277,7 @@ private:
|
||||
return variant();
|
||||
}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
if(fallback_) {
|
||||
fallback_->get_inputs(inputs);
|
||||
|
@ -39,7 +39,7 @@ variant location_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void location_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void location_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "x");
|
||||
add_input(inputs, "y");
|
||||
@ -103,7 +103,7 @@ variant attack_type_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void attack_type_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void attack_type_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "name");
|
||||
add_input(inputs, "type");
|
||||
@ -265,7 +265,7 @@ variant unit_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void unit_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void unit_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "x");
|
||||
add_input(inputs, "y");
|
||||
@ -369,7 +369,7 @@ variant unit_type_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void unit_type_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void unit_type_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "id");
|
||||
add_input(inputs, "type");
|
||||
@ -457,7 +457,7 @@ variant config_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void config_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void config_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "__all_children");
|
||||
add_input(inputs, "__children");
|
||||
@ -517,7 +517,7 @@ variant terrain_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void terrain_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void terrain_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "x");
|
||||
add_input(inputs, "y");
|
||||
@ -545,7 +545,7 @@ int terrain_callable::do_compare(const formula_callable* callable) const
|
||||
return loc_.do_compare(other_loc);
|
||||
}
|
||||
|
||||
void gamemap_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void gamemap_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "gamemap");
|
||||
add_input(inputs, "terrain");
|
||||
@ -577,7 +577,7 @@ variant gamemap_callable::get_value(const std::string& key) const
|
||||
}
|
||||
}
|
||||
|
||||
void team_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void team_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "side");
|
||||
add_input(inputs, "id");
|
||||
@ -684,7 +684,7 @@ variant set_var_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void set_var_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void set_var_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "key");
|
||||
add_input(inputs, "value");
|
||||
@ -716,7 +716,7 @@ variant safe_call_callable::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void safe_call_callable::get_inputs(formula_input_vector* inputs) const
|
||||
void safe_call_callable::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "main");
|
||||
add_input(inputs, "backup");
|
||||
@ -764,7 +764,7 @@ variant safe_call_result::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void safe_call_result::get_inputs(formula_input_vector* inputs) const
|
||||
void safe_call_result::get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "status");
|
||||
add_input(inputs, "object");
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
explicit gamemap_callable(const gamemap& g) : gamemap_(g)
|
||||
{}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
variant get_value(const std::string& key) const override;
|
||||
|
||||
const gamemap& get_gamemap() const { return gamemap_; }
|
||||
@ -76,7 +76,7 @@ private:
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
};
|
||||
|
||||
@ -89,7 +89,7 @@ public:
|
||||
}
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
|
||||
@ -113,7 +113,7 @@ public:
|
||||
}
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
|
||||
@ -134,7 +134,7 @@ public:
|
||||
}
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
|
||||
@ -150,7 +150,7 @@ public:
|
||||
explicit config_callable(const config& c) : cfg_(c) {}
|
||||
|
||||
variant get_value(const std::string& key) const override;
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
int do_compare(const formula_callable* callable) const override;
|
||||
|
||||
const config& get_config() const { return cfg_; }
|
||||
@ -164,7 +164,7 @@ class team_callable : public formula_callable
|
||||
public:
|
||||
explicit team_callable(const team& t) : team_(t) {}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const override;
|
||||
void get_inputs(formula_input_vector& inputs) const override;
|
||||
variant get_value(const std::string& key) const override;
|
||||
|
||||
const team& get_team() const { return team_; }
|
||||
@ -189,7 +189,7 @@ private:
|
||||
variant value_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
};
|
||||
|
||||
class safe_call_callable : public action_callable
|
||||
@ -218,7 +218,7 @@ private:
|
||||
expression_ptr backup_formula_;
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
};
|
||||
|
||||
class safe_call_result : public formula_callable
|
||||
@ -237,7 +237,7 @@ private:
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
};
|
||||
|
||||
} // namespace wfl
|
||||
|
@ -431,7 +431,7 @@ class string_callable : public formula_callable
|
||||
public:
|
||||
explicit string_callable(const variant& string) : string_(string) {}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "size");
|
||||
add_input(inputs, "empty");
|
||||
@ -488,7 +488,7 @@ class list_callable : public formula_callable
|
||||
public:
|
||||
explicit list_callable(const variant& list) : list_(list) {}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "size", FORMULA_READ_WRITE);
|
||||
add_input(inputs, "empty", FORMULA_READ_WRITE);
|
||||
@ -528,7 +528,7 @@ class map_callable : public formula_callable
|
||||
public:
|
||||
explicit map_callable(const variant& map) : map_(map) {}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
add_input(inputs, "size", FORMULA_READ_WRITE);
|
||||
add_input(inputs, "empty", FORMULA_READ_WRITE);
|
||||
@ -584,7 +584,7 @@ public:
|
||||
private:
|
||||
const formula_callable& global_, &local_;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
return local_.get_inputs(inputs);
|
||||
}
|
||||
@ -812,7 +812,7 @@ private:
|
||||
mutable expr_table_evaluated evaluated_table_;
|
||||
formula_debugger* debugger_;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const
|
||||
void get_inputs(formula_input_vector& inputs) const
|
||||
{
|
||||
for(expr_table::const_iterator i = table_->begin(); i != table_->end(); ++i) {
|
||||
add_input(inputs, i->first);
|
||||
|
@ -839,7 +839,7 @@ class variant_comparator : public formula_callable {
|
||||
}
|
||||
}
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const {
|
||||
void get_inputs(formula_input_vector& inputs) const {
|
||||
fallback_->get_inputs(inputs);
|
||||
}
|
||||
public:
|
||||
@ -1498,7 +1498,7 @@ variant key_value_pair::get_value(const std::string& key) const
|
||||
return variant();
|
||||
}
|
||||
|
||||
void key_value_pair::get_inputs(formula_input_vector* inputs) const {
|
||||
void key_value_pair::get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "key");
|
||||
add_input(inputs, "value");
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ class key_value_pair : public formula_callable {
|
||||
|
||||
variant get_value(const std::string& key) const;
|
||||
|
||||
void get_inputs(formula_input_vector* inputs) const;
|
||||
void get_inputs(formula_input_vector& inputs) const;
|
||||
public:
|
||||
explicit key_value_pair(const variant& key, const variant& value) : key_(key), value_(value) {}
|
||||
|
||||
|
@ -228,7 +228,7 @@ public:
|
||||
: p(p), clr(clr), w(w), h(h)
|
||||
{}
|
||||
|
||||
void get_inputs(wfl::formula_input_vector* inputs) const override
|
||||
void get_inputs(wfl::formula_input_vector& inputs) const override
|
||||
{
|
||||
add_input(inputs, "x");
|
||||
add_input(inputs, "y");
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
lua_pop(mState, 1);
|
||||
return result;
|
||||
}
|
||||
void get_inputs(formula_input_vector* inputs) const {
|
||||
void get_inputs(formula_input_vector& inputs) const {
|
||||
add_input(inputs, "__list");
|
||||
add_input(inputs, "__map");
|
||||
for(lua_pushnil(mState); lua_next(mState, table_i); lua_pop(mState,1)) {
|
||||
@ -154,7 +154,7 @@ void luaW_pushfaivariant(lua_State* L, variant val) {
|
||||
// If those fail, convert generically to a map
|
||||
const formula_callable* obj = val.as_callable();
|
||||
formula_input_vector inputs;
|
||||
obj->get_inputs(&inputs);
|
||||
obj->get_inputs(inputs);
|
||||
lua_newtable(L);
|
||||
for(const formula_input& attr : inputs) {
|
||||
if(attr.access == FORMULA_WRITE_ONLY) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user