diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-07-19 20:41:58 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-07-19 20:42:08 +0200 |
| commit | e8eccde8db246d262d7a9e1c6088cc24e82c84e8 (patch) | |
| tree | 1ce212048c5b6f96e51463cbd9bb3e9ef1813998 /fluid/code.cxx | |
| parent | 35728ac9ecab78cc60ca89f9b5a6ad8f864bb8c4 (diff) | |
FLUID: RTTI improvements, 'is_a90' now const, apply RTTI
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index fe4a55dbd..452aa8b67 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -656,14 +656,14 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) { } // write all code that come before the children code // (but don't write the last comment until the very end) - if (!(p==Fl_Type::last && p->is_comment())) + if (!(p==Fl_Type::last && p->is_a(Fl_Type::ID_Comment))) p->write_code1(*this); // recursively write the code of all children Fl_Type* q; if (p->is_widget() && p->is_class()) { // Handle widget classes specially for (q = p->next; q && q->level > p->level;) { - if (q->id() != Fl_Type::ID_Function) q = write_code(q); + if (!q->is_a(Fl_Type::ID_Function)) q = write_code(q); else { int level = q->level; do { @@ -676,7 +676,7 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) { p->write_code2(*this); for (q = p->next; q && q->level > p->level;) { - if (q->id() == Fl_Type::ID_Function) q = write_code(q); + if (q->is_a(Fl_Type::ID_Function)) q = write_code(q); else { int level = q->level; do { @@ -733,7 +733,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview) // if the first entry in the Type tree is a comment, then it is probably // a copyright notice. We print that before anything else in the file! Fl_Type* first_type = Fl_Type::first; - if (first_type && first_type->is_comment()) { + if (first_type && first_type->is_a(Fl_Type::ID_Comment)) { if (write_sourceview) { first_type->code_position = (int)ftell(code_file); first_type->header_position = (int)ftell(header_file); @@ -850,7 +850,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview) fprintf(header_file, "#endif\n"); Fl_Type* last_type = Fl_Type::last; - if (last_type && last_type->is_comment()) { + if (last_type && last_type->is_a(Fl_Type::ID_Comment)) { if (write_sourceview) { last_type->code_position = (int)ftell(code_file); last_type->header_position = (int)ftell(header_file); |
