From 17f44c0dc18993f39adea649b64ddb2bbd666fed Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop <dudesuchamazing@gmail.com> Date: Wed, 17 Jul 2024 23:20:28 +0300 Subject: [PATCH] Fix some warnings and improve memory layout. --- include/embedded_files.h | 13 ++++++------- pcbnew/tools/footprint_editor_control.cpp | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/embedded_files.h b/include/embedded_files.h index 3f9d06e884..4df886f67a 100644 --- a/include/embedded_files.h +++ b/include/embedded_files.h @@ -65,10 +65,10 @@ public: wxString name; FILE_TYPE type; + bool is_valid; std::string compressedEncodedData; std::vector<char> decompressedData; std::string data_sha; - bool is_valid; }; enum class RETURN_CODE : int @@ -216,15 +216,14 @@ public: return m_embedFonts; } -protected: - bool m_embedFonts; // If set, fonts will be embedded in the element on save - // Otherwise, font files embedded in the element will be - // removed on save - - private: std::map<wxString, EMBEDDED_FILE*> m_files; std::vector<wxString> m_fontFiles; + +protected: + bool m_embedFonts = false; // If set, fonts will be embedded in the element on save + // Otherwise, font files embedded in the element will be + // removed on save }; diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 300d08d4a4..45e335824b 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -578,7 +578,7 @@ int FOOTPRINT_EDITOR_CONTROL::OpenDirectory( const TOOL_EVENT& aEvent ) { path = table->FindRow( libName, true )->GetFullURI( true ); } - catch( IO_ERROR& err ) + catch( IO_ERROR& ) { // Do nothing: libName can be not found in globalTable if libName is in projectTable } @@ -656,7 +656,7 @@ int FOOTPRINT_EDITOR_CONTROL::OpenWithTextEditor( const TOOL_EVENT& aEvent ) { libItemName = table->FindRow( libName, true )->GetFullURI( true ); } - catch( IO_ERROR& err ) + catch( IO_ERROR& ) { // Do nothing: libName can be not found in globalTable if libName is in projectTable }