diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 02:33:41 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 02:33:41 +0500 |
| commit | 43e0a37906afabb0b3b091b8d3eac9a910cae50c (patch) | |
| tree | d2a037c2bf0dc395fddb08e32ebfcf2795503b7c /fluid/nodes/Function_Node.cxx | |
| parent | 4ce4967c33d56e4b56d85d11fe0e0be91e159f5d (diff) | |
wip
Diffstat (limited to 'fluid/nodes/Function_Node.cxx')
| -rw-r--r-- | fluid/nodes/Function_Node.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fluid/nodes/Function_Node.cxx b/fluid/nodes/Function_Node.cxx index 02f4d75ca..27e8c83de 100644 --- a/fluid/nodes/Function_Node.cxx +++ b/fluid/nodes/Function_Node.cxx @@ -42,14 +42,14 @@ using namespace fld::io; using namespace fld::proj; /// Set a current class, so that the code of the children is generated correctly. -Class_Node *current_class = nullptr; +Class_Node *current_class = 0; /** \brief Return 1 if the list contains a function with the given signature at the top level. Widget_Node uses this to check if a callback by a certain signature is already defined by the user within this file. If not, Widget_Node will generate an `extern $sig$;` statement. - \param[in] rtype return type, can be nullptr to avoid checking (not used by Widget_Node) + \param[in] rtype return type, can be 0 to avoid checking (not used by Widget_Node) \param[in] sig function signature \return 1 if found. */ @@ -76,7 +76,7 @@ static char buffer[128]; // for error messages This is used to find a matching " or ' in a string. \param[inout] c start searching here, return where we found \c type \param[in] type find this character - \return nullptr if the character was found, else a pointer to a static string + \return 0 if the character was found, else a pointer to a static string with an error message */ const char *_q_check(const char * & c, int type) { @@ -88,7 +88,7 @@ const char *_q_check(const char * & c, int type) { if (*c) c++; break; default: - if (*(c-1) == type) return nullptr; + if (*(c-1) == type) return 0; } } @@ -98,14 +98,14 @@ const char *_q_check(const char * & c, int type) { {, [, ", ', and ( are matched. \param[inout] c start searching here, return the end of the search \param[in] type find this character match - \return nullptr if the character was found, else a pointer to a static string + \return 0 if the character was found, else a pointer to a static string with an error message */ const char *_c_check(const char * & c, int type) { const char *d; for (;;) switch (*c++) { case 0: - if (!type) return nullptr; + if (!type) return 0; sprintf(buffer, "missing '%c'", type); return buffer; case '/': @@ -153,7 +153,7 @@ const char *_c_check(const char * & c, int type) { case ')': case ']': // UNEXPECTED: - if (type == *(c-1)) return nullptr; + if (type == *(c-1)) return 0; sprintf(buffer, "unexpected '%c'", *(c-1)); return buffer; } @@ -164,7 +164,7 @@ const char *_c_check(const char * & c, int type) { Make sure that {, ", ', and ( are matched. \param[in] c start searching here \param[in] type find this character match (default is 0) - \return nullptr if the character was found, else a pointer to a static string + \return 0 if the character was found, else a pointer to a static string with an error message \note This function checks every conceivable line of code, which is not always wanted. It can't differentiate characters in comments, and the @@ -436,7 +436,7 @@ void Function_Node::write_code1(fld::io::Code_Writer& f) { } if (havewidgets && child && !child->name()) - f.write_c("%s%s* w;\n", f.indent(1), subclassname(child).c_str()); + f.write_c("%s%s* w;\n", f.indent(1), subclassname(child)); f.indentation++; } @@ -478,7 +478,7 @@ int Function_Node::has_signature(const char *rtype, const char *sig) const { return 0; if (!name()) return 0; - if ( (rtype==nullptr || (return_type() == rtype)) && fl_filename_match(name(), sig)) { + if ( (rtype==0 || (return_type() == rtype)) && fl_filename_match(name(), sig)) { return 1; } return 0; @@ -515,7 +515,7 @@ Node *Code_Node::make(Strategy strategy) { } if (!p) { fl_message("Please select a function"); - return nullptr; + return 0; } Code_Node *o = new Code_Node(); o->name("printf(\"Hello, World!\\n\");"); @@ -591,7 +591,7 @@ int Code_Node::reap_editor() { current contents of editor file.. */ int Code_Node::handle_editor_changes() { - const char *newcode = nullptr; + const char *newcode = 0; switch ( editor_.handle_changes(&newcode) ) { case 1: { // (1)=changed name(newcode); // update value in ram @@ -636,7 +636,7 @@ Node *CodeBlock_Node::make(Strategy strategy) { } if (!p) { fl_message("Please select a function"); - return nullptr; + return 0; } CodeBlock_Node *o = new CodeBlock_Node(); o->name("if (test())"); @@ -950,11 +950,11 @@ void Data_Node::open() { Write the content of the external file inline into the source code. */ void Data_Node::write_code1(fld::io::Code_Writer& f) { - const char *message = nullptr; + const char *message = 0; const char *c = name(); if (!c) return; std::string fn = filename(); - char *data = nullptr; + char *data = 0; int nData = -1; int uncompressedDataSize = 0; // path should be set correctly already |
