Fluid: modernize Function Node class
Some checks failed
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

This commit is contained in:
Matthias Melcher
2025-12-06 02:50:28 +01:00
parent 5e7ed2f653
commit b1d3ee13bd
6 changed files with 47 additions and 32 deletions

View File

@@ -455,6 +455,19 @@ int storestring(const char *n, const char * & p, int nostrip) {
return 1;
}
// C++11 version, still using the original to copy all the side effects.
int storestring(const std::string& n, std::string& p, int nostrip) {
const char *buffer { nullptr };
int ret = storestring(n.c_str(), buffer);
if (buffer) {
p = buffer;
free((void*)buffer);
} else {
p.clear();
}
return ret;
}
/** Update the `visible` flag for `p` and all its descendants.
\param[in] p start here and update all descendants
*/