mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Fix DEBUG build (#3861)
* Fix asserts which would not compile. * Fix DEBUG build. Fully enable checking gcode placeholders in debug builds.
This commit is contained in:
parent
3b7b10f72f
commit
ab161d5a2b
2 changed files with 6 additions and 1 deletions
|
@ -2956,7 +2956,7 @@ std::string GCode::placeholder_parser_process(const std::string &name, const std
|
||||||
// Orca: Added CMake config option since debug is rarely used in current workflow.
|
// Orca: Added CMake config option since debug is rarely used in current workflow.
|
||||||
// Also changed from throwing error immediately to storing messages till slicing is completed
|
// Also changed from throwing error immediately to storing messages till slicing is completed
|
||||||
// to raise all errors at the same time.
|
// to raise all errors at the same time.
|
||||||
#if !defined(NDEBUG) || ORCA_CHECK_GCODE_PLACEHOLDERS // CHECK_CUSTOM_GCODE_PLACEHOLDERS
|
#if ORCA_CHECK_GCODE_PLACEHOLDERS
|
||||||
if (config_override) {
|
if (config_override) {
|
||||||
const auto& custom_gcode_placeholders = custom_gcode_specific_placeholders();
|
const auto& custom_gcode_placeholders = custom_gcode_specific_placeholders();
|
||||||
|
|
||||||
|
|
|
@ -523,6 +523,11 @@ private:
|
||||||
double m_last_mm3_per_mm;
|
double m_last_mm3_per_mm;
|
||||||
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
|
|
||||||
|
// Always check gcode placeholders when building in debug mode.
|
||||||
|
#if !defined(NDEBUG)
|
||||||
|
#define ORCA_CHECK_GCODE_PLACEHOLDERS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ORCA_CHECK_GCODE_PLACEHOLDERS
|
#if ORCA_CHECK_GCODE_PLACEHOLDERS
|
||||||
std::map<std::string, std::vector<std::string>> m_placeholder_error_messages;
|
std::map<std::string, std::vector<std::string>> m_placeholder_error_messages;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue