diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2018-12-30 11:04:10 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2018-12-30 11:04:10 +0100 |
| commit | 362f9350868286b066070df7da1f496df08ecd73 (patch) | |
| tree | d4bf7e564018d835092fff0f311ebcec6740d02d /fluid/Fl_Menu_Type.cxx | |
| parent | 26bb0e5a831be64f21eec41efef73571aebadab5 (diff) | |
| parent | de199c327e9b55bd615f7262724da8ecba1999cf (diff) | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'fluid/Fl_Menu_Type.cxx')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index 5e51a6ee2..e4c09be01 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -360,27 +360,27 @@ void Fl_Menu_Item_Type::write_code1() { } } - int init = 0; + int menuItemInitialized = 0; // if the name is an array variable, assign the value here if (name() && strchr(name(), '[')) { write_c("%s%s = &%s[%d];\n", indent(), name(), mname, i); } if (image) { - if (!init) { - init = 1; - write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", indent(), mname, i); - } + menuItemInitialized = 1; + write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", indent(), mname, i); image->write_code("o"); } - for (int n=0; n < NUM_EXTRA_CODE; n++) + for (int n=0; n < NUM_EXTRA_CODE; n++) { if (extra_code(n) && !isdeclare(extra_code(n))) { - if (!init) { - init = 1; - write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", indent(), mname, i); + if (!menuItemInitialized) { + menuItemInitialized = 1; + write_c("%s{ Fl_Menu_Item* o = &%s[%d];\n", indent(), mname, i); } write_c("%s %s\n", indent(), extra_code(n)); } - if (init) write_c("%s}\n",indent()); + } + if (menuItemInitialized) + write_c("%s}\n",indent()); } void Fl_Menu_Item_Type::write_code2() {} |
