Use const for constant local variables in wxWidgets headers
This avoids warnings from MSVS 2017 static analyzer when C++ core rule set is activated. Closes https://github.com/wxWidgets/wxWidgets/pull/819
This commit is contained in:
committed by
Vadim Zeitlin
parent
2fc20abbdd
commit
8dfd799fd5
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
// assign an existing file descriptor and get it back from wxFile object
|
||||
void Attach(int lfd) { Close(); m_fd = lfd; m_lasterror = 0; }
|
||||
int Detach() { int fdOld = m_fd; m_fd = fd_invalid; return fdOld; }
|
||||
int Detach() { const int fdOld = m_fd; m_fd = fd_invalid; return fdOld; }
|
||||
int fd() const { return m_fd; }
|
||||
|
||||
// read/write (unbuffered)
|
||||
|
Reference in New Issue
Block a user