FLTK logo

[fltk/fltk] Rename Fl_X* Fl_Window::i private class member (#223)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Rename Fl_X* Fl_Window::i private class member (#223) Albrecht Schlosser Apr 26, 2021  
 

See discussion in thread Fl_Window's "Fl_X *i" causes warning "C4458: declaration of 'i' hides class member" in Visual Studio in fltk.general.

The gist of this thread: FLTK uses a member name i for an internal (private) member which is generally a bad choice and doesn't comply with our CMP.

Although the warning in VS is (only?) visible at warning level /W4 (as reported) it can be "fixed" (IMHO: easily) in the user code that introduces the variable i that shadows the (private!!!) FLTK member variable. (Is VS here at fault warning about a private class member?)

But since there is an almost complete patch FLTK should be changed anyway to honor the CMP (by renaming the internal variable as discussed).


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.