fixes warnings with -Wundef

re #470
This commit is contained in:
Joao Paulo Magalhaes
2025-02-13 00:47:44 +00:00
parent ad4ff9d3a8
commit 5db61e2299
4 changed files with 8 additions and 3 deletions

View File

@@ -29,6 +29,7 @@
- [PR#485](https://github.com/biojppm/rapidyaml/pull/485): improve the CI workflows (thanks to @ingydotnet):
- amazing code reuse and organization, thanks to the use of YamlScript to generate the final workflows
- all optimization levels are now covered for gcc, clang and Visual Studio.
- [PR#499](https://github.com/biojppm/rapidyaml/pull/499): fix warnings with `-Wundef`.
## Thanks

View File

@@ -47,7 +47,7 @@ public:
size_t m_num_directives;
bool m_yaml_directive;
#if RYML_DBG
#ifdef RYML_DBG
#define _enable_(bits) _enable__<bits>(); _c4dbgpf("node[{}]: enable {}", m_curr->node_id, #bits)
#define _disable_(bits) _disable__<bits>(); _c4dbgpf("node[{}]: disable {}", m_curr->node_id, #bits)
#else

View File

@@ -16,7 +16,11 @@
#include "test_lib/test_case.hpp"
#include <gtest/gtest.h>
#define RYML_NFO (0 || RYML_DBG)
#if (0 || defined(RYML_DBG))
#define RYML_NFO (1)
#else
#define RYML_NFO (0)
#endif
#if RYML_NFO
#define _nfo_print_tree(title, tree) do { c4::log("{}:{}: " title ":", __FILE__, __LINE__); print_tree(tree); c4::yml::emit_yaml(tree, stdout); fflush(stdout); } while(0)