After change 7620d8f8dd9a19222e5c07d622b7a0682f61cb65 PHD2 no more compile on Linux :
/home/pch/source/phd2/phd2/star_profile.cpp: In member function ‘void ProfileWindow::OnPaint(wxPaintEvent&)’:
/home/pch/source/phd2/phd2/star_profile.cpp:323:29: error: cannot bind non-const lvalue reference of type ‘wxBitmap&’ to an rvalue of type ‘wxBitmap’
323 | tmpMdc.SelectObject(wxBitmap(subDImg.Rescale(width, width, resizeQuality)));
| ^~~~~~~~~~~~~~
In file included from /usr/include/wx-3.2/wx/wx.h:53,
from /home/pch/source/phd2/phd2/phd.h:47,
from /home/pch/source/phd2/phd2/star_profile.cpp:36:
/usr/include/wx-3.2/wx/dcmemory.h:29:33: note: initializing argument 1 of ‘void wxMemoryDC::SelectObject(wxBitmap&)’
29 | void SelectObject(wxBitmap& bmp);
| ~~^~~
It compile and work after replacing star_profile.cpp line 323 by:
After change 7620d8f8dd9a19222e5c07d622b7a0682f61cb65 PHD2 no more compile on Linux :
/home/pch/source/phd2/phd2/star_profile.cpp: In member function ‘void ProfileWindow::OnPaint(wxPaintEvent&)’: /home/pch/source/phd2/phd2/star_profile.cpp:323:29: error: cannot bind non-const lvalue reference of type ‘wxBitmap&’ to an rvalue of type ‘wxBitmap’ 323 | tmpMdc.SelectObject(wxBitmap(subDImg.Rescale(width, width, resizeQuality))); | ^
~~~~~~~~~~~~~ In file included from /usr/include/wx-3.2/wx/wx.h:53, from /home/pch/source/phd2/phd2/phd.h:47, from /home/pch/source/phd2/phd2/star_profile.cpp:36: /usr/include/wx-3.2/wx/dcmemory.h:29:33: note: initializing argument 1 of ‘void wxMemoryDC::SelectObject(wxBitmap&)’ 29 | void SelectObject(wxBitmap& bmp); |~~^~~It compile and work after replacing star_profile.cpp line 323 by:
I am not sure this is the best fix, so not make a PR.
Patrick