Do not use __FILE__ macro (#7293)

This commit is contained in:
Lukas Matena 2021-11-16 16:09:05 +01:00
parent a2c3a6ac2f
commit 2c31755bc9

View File

@ -563,11 +563,8 @@ SendSystemInfoDialog::SendSystemInfoDialog(wxWindow* parent)
+ (is_alpha ? "Alpha" : is_beta ? "Beta" : ""); + (is_alpha ? "Alpha" : is_beta ? "Beta" : "");
} }
// Get current source file name. const char* filename = "SendSystemInfoDialog.cpp";
std::string filename(__FILE__); assert(strstr(__FILE__, filename));
size_t last_slash_idx = filename.find_last_of("/\\");
if (last_slash_idx != std::string::npos)
filename = filename.substr(last_slash_idx+1);
// Set dialog background color, fonts, etc. // Set dialog background color, fonts, etc.
SetFont(wxGetApp().normal_font()); SetFont(wxGetApp().normal_font());