|
From: <man...@us...> - 2013-04-16 23:28:12
|
Revision: 1897
http://sourceforge.net/p/modplug/code/1897
Author: manxorist
Date: 2013-04-16 23:28:01 +0000 (Tue, 16 Apr 2013)
Log Message:
-----------
[Ref] Remove CTuning::MessageHandler and call Reporting::Error directly at the only call site.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/tuning.cpp
trunk/OpenMPT/soundlib/tuningbase.cpp
trunk/OpenMPT/soundlib/tuningbase.h
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-04-16 22:11:50 UTC (rev 1896)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-04-16 23:28:01 UTC (rev 1897)
@@ -1490,13 +1490,6 @@
#endif
-void SimpleMessageBox(const char* message, const char* title)
-//-----------------------------------------------------------
-{
- Reporting::Information(message, title);
-}
-
-
#ifdef MODPLUG_TRACKER
bool CSoundFile::LoadStaticTunings()
//----------------------------------
@@ -1505,8 +1498,6 @@
//For now not allowing to reload tunings(one should be careful when reloading them
//since various parts may use addresses of the tuningobjects).
- CTuning::MessageHandler = &SimpleMessageBox;
-
s_pTuningsSharedBuiltIn = new CTuningCollection;
s_pTuningsSharedLocal = new CTuningCollection("Local tunings");
Modified: trunk/OpenMPT/soundlib/tuning.cpp
===================================================================
--- trunk/OpenMPT/soundlib/tuning.cpp 2013-04-16 22:11:50 UTC (rev 1896)
+++ trunk/OpenMPT/soundlib/tuning.cpp 2013-04-16 23:28:01 UTC (rev 1897)
@@ -12,6 +12,7 @@
#include "tuning.h"
#include "../common/serialization_utils.h"
+#include "../common/Reporting.h"
#include <string>
typedef CTuningRTI::RATIOTYPE RATIOTYPE;
@@ -398,7 +399,7 @@
pTuning->m_EditMask = EM_ALLOWALL; //Allowing all while processing data.
if (pTuning->ProProcessUnserializationdata())
{
- MessageHandler(("Processing loaded data for tuning \"" + pTuning->GetName() + "\" failed.").c_str(), "Tuning load failure");
+ Reporting::Error(("Processing loaded data for tuning \"" + pTuning->GetName() + "\" failed.").c_str(), "Tuning load failure");
delete pTuning; pTuning = nullptr;
}
else
Modified: trunk/OpenMPT/soundlib/tuningbase.cpp
===================================================================
--- trunk/OpenMPT/soundlib/tuningbase.cpp 2013-04-16 22:11:50 UTC (rev 1896)
+++ trunk/OpenMPT/soundlib/tuningbase.cpp 2013-04-16 23:28:01 UTC (rev 1897)
@@ -45,9 +45,6 @@
TEMPLATEDEC
-TYPENAME CTUNINGBASE::MESSAGEHANDLER CTUNINGBASE::MessageHandler = &(CTUNINGBASE::DefaultMessageHandler);
-
-TEMPLATEDEC
const TYPENAME CTUNINGBASE::SERIALIZATION_RETURN_TYPE CTUNINGBASE::SERIALIZATION_SUCCESS = false;
TEMPLATEDEC
Modified: trunk/OpenMPT/soundlib/tuningbase.h
===================================================================
--- trunk/OpenMPT/soundlib/tuningbase.h 2013-04-16 22:11:50 UTC (rev 1896)
+++ trunk/OpenMPT/soundlib/tuningbase.h 2013-04-16 23:28:01 UTC (rev 1897)
@@ -311,8 +311,6 @@
static const char* s_TuningTypeStrGroupGeometric;
static const char* s_TuningTypeStrGeometric;
- static MESSAGEHANDLER MessageHandler;
-
private:
static void DefaultMessageHandler(const char*, const char*) {}
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|