From 2c31755bc9e9a1d0215a80c2b9ca0eea0b9c4c0e Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 16 Nov 2021 16:09:05 +0100 Subject: [PATCH] Do not use __FILE__ macro (#7293) --- src/slic3r/GUI/SendSystemInfoDialog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/SendSystemInfoDialog.cpp b/src/slic3r/GUI/SendSystemInfoDialog.cpp index fb3205af3..9db272d35 100644 --- a/src/slic3r/GUI/SendSystemInfoDialog.cpp +++ b/src/slic3r/GUI/SendSystemInfoDialog.cpp @@ -563,11 +563,8 @@ SendSystemInfoDialog::SendSystemInfoDialog(wxWindow* parent) + (is_alpha ? "Alpha" : is_beta ? "Beta" : ""); } - // Get current source file name. - std::string filename(__FILE__); - size_t last_slash_idx = filename.find_last_of("/\\"); - if (last_slash_idx != std::string::npos) - filename = filename.substr(last_slash_idx+1); + const char* filename = "SendSystemInfoDialog.cpp"; + assert(strstr(__FILE__, filename)); // Set dialog background color, fonts, etc. SetFont(wxGetApp().normal_font());