Rework of Add random function for gcode macros. #5219 after merge:

The thread local storage variables for the random number generator
were replaced by an external context variable.
Thread local storage is a scarce resource.
This commit is contained in:
Vojtech Bubnik 2020-12-09 09:19:46 +01:00
parent 1e190affcf
commit 7353d8c6e9
4 changed files with 48 additions and 23 deletions

View file

@ -300,6 +300,8 @@ private:
FullPrintConfig m_config;
GCodeWriter m_writer;
PlaceholderParser m_placeholder_parser;
// For random number generator etc.
PlaceholderParser::ContextData m_placeholder_parser_context;
// Collection of templates, on which the placeholder substitution failed.
std::map<std::string, std::string> m_placeholder_parser_failed_templates;
OozePrevention m_ooze_prevention;