[Commits] [wesnoth/wesnoth] 1556fa: Implement a destructor subscription system for for...
GitHub
noreply at github.com
Fri Apr 7 04:53:35 UTC 2017
Branch: refs/heads/wfl_memleak_fix_attempt
Home: https://github.com/wesnoth/wesnoth
Commit: 1556fac6a4b8454257eb0b3de23cdee2f526b00e
https://github.com/wesnoth/wesnoth/commit/1556fac6a4b8454257eb0b3de23cdee2f526b00e
Author: Celtic Minstrel <celtic.minstrel.ca at some.place>
Date: 2017-04-07 (Fri, 07 Apr 2017)
Changed paths:
M src/ai/composite/value_translator.hpp
M src/ai/default/attack.cpp
M src/ai/formula/ai.cpp
M src/ai/formula/ai.hpp
M src/ai/formula/callable_objects.cpp
M src/ai/formula/callable_objects.hpp
M src/ai/formula/candidates.cpp
M src/ai/formula/function_table.cpp
M src/ai/formula/stage_side_formulas.cpp
M src/ai/formula/stage_unit_formulas.cpp
M src/formula/callable.hpp
M src/formula/callable_fwd.hpp
M src/formula/callable_objects.cpp
M src/formula/callable_objects.hpp
M src/formula/function.cpp
M src/formula/variant.cpp
M src/formula/variant.hpp
M src/formula/variant_value.cpp
M src/formula/variant_value.hpp
M src/scripting/lua_formula_bridge.cpp
M src/tests/test_formula_core.cpp
M src/units/filter.cpp
Log Message:
-----------
Implement a destructor subscription system for formula_callable
This allows the variant_callable to store a shared_ptr to its callable while ensuring that
callables that were allocated on the stack or as part of a larger structure are not
double-freed.
Commit: 7e594e7c54c82ae24db88bef1cf4ea355221be60
https://github.com/wesnoth/wesnoth/commit/7e594e7c54c82ae24db88bef1cf4ea355221be60
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2017-04-07 (Fri, 07 Apr 2017)
Changed paths:
M src/formula/variant.cpp
M src/formula/variant.hpp
Log Message:
-----------
Make variant constructor from std::shared_ptr a template
For some reason, when the variant constructor only accepts
std::shared_ptr<const variant_callable>, MSVC2013 gets confused about which
constructor it should call when it has, say,
std::shared_ptr<ai::attack_analysis>. Making the constructor a template
fixes it.
Compare: https://github.com/wesnoth/wesnoth/compare/32b45d07727f...7e594e7c54c8
More information about the Commits
mailing list