From: <man...@us...> - 2015-05-03 20:10:27
|
Revision: 5038 http://sourceforge.net/p/modplug/code/5038 Author: manxorist Date: 2015-05-03 20:10:21 +0000 (Sun, 03 May 2015) Log Message: ----------- [Ref] Kill dead code in ComponentManager. Modified Paths: -------------- trunk/OpenMPT/common/ComponentManager.cpp trunk/OpenMPT/common/ComponentManager.h trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp trunk/OpenMPT/mptrack/StreamEncoderOpus.cpp trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp Modified: trunk/OpenMPT/common/ComponentManager.cpp =================================================================== --- trunk/OpenMPT/common/ComponentManager.cpp 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/common/ComponentManager.cpp 2015-05-03 20:10:21 UTC (rev 5038) @@ -19,10 +19,9 @@ #if defined(MPT_WITH_DYNBIND) -ComponentBase::ComponentBase(ComponentType type, bool delayLoaded) -//---------------------------------------------------------------- +ComponentBase::ComponentBase(ComponentType type) +//---------------------------------------------- : m_Type(type) - , m_DelayLoaded(delayLoaded) , m_Initialized(false) , m_Available(false) , m_BindFailed(false) @@ -119,13 +118,6 @@ } -bool ComponentBase::IsDelayLoaded() const -//--------------------------------------- -{ - return m_DelayLoaded; -} - - bool ComponentBase::IsInitialized() const //--------------------------------------- { Modified: trunk/OpenMPT/common/ComponentManager.h =================================================================== --- trunk/OpenMPT/common/ComponentManager.h 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/common/ComponentManager.h 2015-05-03 20:10:21 UTC (rev 5038) @@ -63,7 +63,6 @@ virtual std::string GetName() const = 0; virtual std::string GetSettingsKey() const = 0; virtual ComponentType GetType() const = 0; - virtual bool IsDelayLoaded() const = 0; // openmpt is linked against the component dlls which get delay loaded virtual bool IsInitialized() const = 0; // Initialize() has been called virtual bool IsAvailable() const = 0; // Initialize() has been successfull @@ -83,7 +82,6 @@ private: std::string m_Name; ComponentType m_Type; - bool m_DelayLoaded; bool m_Initialized; bool m_Available; @@ -91,10 +89,10 @@ TLibraryMap m_Libraries; bool m_BindFailed; - + protected: - ComponentBase(ComponentType type, bool delayLoaded = false); + ComponentBase(ComponentType type); public: @@ -115,7 +113,6 @@ virtual std::string GetName() const; virtual ComponentType GetType() const; - virtual bool IsDelayLoaded() const; virtual bool IsInitialized() const; virtual bool IsAvailable() const; @@ -163,8 +160,8 @@ private: mpt::PathString m_BaseName; public: - ComponentSystemDLL(const mpt::PathString &baseName, bool delayLoaded = false) - : ComponentBase(ComponentTypeSystem, delayLoaded) + ComponentSystemDLL(const mpt::PathString &baseName) + : ComponentBase(ComponentTypeSystem) , m_BaseName(baseName) { return; @@ -177,13 +174,13 @@ }; -class ComponentDelayLoadedBundledDLL : public ComponentBase +class ComponentBundledDLL : public ComponentBase { private: mpt::PathString m_FullName; public: - ComponentDelayLoadedBundledDLL(const mpt::PathString &fullName) - : ComponentBase(ComponentTypeBundled, true) + ComponentBundledDLL(const mpt::PathString &fullName) + : ComponentBase(ComponentTypeBundled) , m_FullName(fullName) { return; Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2015-05-03 20:10:21 UTC (rev 5038) @@ -1813,12 +1813,12 @@ //======================= class ComponentSoundTouch //======================= - : public ComponentDelayLoadedBundledDLL + : public ComponentBundledDLL { MPT_DECLARE_COMPONENT_MEMBERS public: ComponentSoundTouch() - : ComponentDelayLoadedBundledDLL(MPT_PATHSTRING("OpenMPT_SoundTouch_f32")) + : ComponentBundledDLL(MPT_PATHSTRING("OpenMPT_SoundTouch_f32")) { return; } Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/mptrack/Mptrack.h 2015-05-03 20:10:21 UTC (rev 5038) @@ -151,7 +151,7 @@ { MPT_DECLARE_COMPONENT_MEMBERS public: - ComponentUXTheme() : ComponentSystemDLL(MPT_PATHSTRING("uxtheme"), true) { } + ComponentUXTheme() : ComponentSystemDLL(MPT_PATHSTRING("uxtheme")) { } std::string GetSettingsKey() const { return "UXTheme"; } }; Modified: trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2015-05-03 20:10:21 UTC (rev 5038) @@ -329,7 +329,7 @@ public: ComponentLame() - : ComponentBase(ComponentTypeForeign, false) + : ComponentBase(ComponentTypeForeign) { return; } @@ -673,7 +673,7 @@ public: ComponentBlade() - : ComponentBase(ComponentTypeForeign, false) + : ComponentBase(ComponentTypeForeign) , isLame(false) { return; @@ -946,7 +946,7 @@ public: ComponentAcmMP3() - : ComponentBase(ComponentTypeSystemInstallable, false) + : ComponentBase(ComponentTypeSystemInstallable) { return; } Modified: trunk/OpenMPT/mptrack/StreamEncoderOpus.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderOpus.cpp 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/mptrack/StreamEncoderOpus.cpp 2015-05-03 20:10:21 UTC (rev 5038) @@ -65,7 +65,7 @@ public: ComponentOpus() - : ComponentBase(ComponentTypeForeign, false) + : ComponentBase(ComponentTypeForeign) { return; } Modified: trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2015-05-03 19:26:44 UTC (rev 5037) +++ trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2015-05-03 20:10:21 UTC (rev 5038) @@ -69,7 +69,7 @@ public: ComponentVorbis() - : ComponentBase(ComponentTypeForeign, false) + : ComponentBase(ComponentTypeForeign) { return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |