mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
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:
@@ -1340,7 +1340,7 @@ void GCode::_do_export(Print& print, FILE* file, ThumbnailsGeneratorCallback thu
|
||||
std::string GCode::placeholder_parser_process(const std::string &name, const std::string &templ, unsigned int current_extruder_id, const DynamicConfig *config_override)
|
||||
{
|
||||
try {
|
||||
return m_placeholder_parser.process(templ, current_extruder_id, config_override);
|
||||
return m_placeholder_parser.process(templ, current_extruder_id, config_override, &m_placeholder_parser_context);
|
||||
} catch (std::runtime_error &err) {
|
||||
// Collect the names of failed template substitutions for error reporting.
|
||||
auto it = m_placeholder_parser_failed_templates.find(name);
|
||||
|
||||
Reference in New Issue
Block a user