Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

enable debug build (#421)

shun-iwasawa99b9e225b0ce
diff --git a/toonz/sources/common/tsystem/tbigmemorymanager.cpp b/toonz/sources/common/tsystem/tbigmemorymanager.cpp
index 3feef28e2..a8d077b21 100644
--- a/toonz/sources/common/tsystem/tbigmemorymanager.cpp
+++ b/toonz/sources/common/tsystem/tbigmemorymanager.cpp
@@ -424,17 +424,17 @@ TRaster *TBigMemoryManager::findRaster(TRaster *ras)
void TBigMemoryManager::printMap()
{
std::map<UCHAR *, Chunkinfo>::iterator it = m_chunks.begin();
- TSystem::outputDebug("BIGMEMORY chunks totali: " + toString((int)m_chunks.size()) + "\n");
+ TSystem::outputDebug("BIGMEMORY chunks totali: " + std::to_string((int)m_chunks.size()) + "\n");
int count = 0;
while (it != m_chunks.end()) {
TSystem::outputDebug("chunk #" +
- toString((int)count++) +
+ std::to_string((int)count++) +
"dimensione(kb):" +
- toString((int)(it->second.m_size >> 10)) +
+ std::to_string((int)(it->second.m_size >> 10)) +
"num raster:" +
- toString((int)(it->second.m_rasters.size())) +
+ std::to_string((int)(it->second.m_rasters.size())) +
"\n");
it++;
diff --git a/toonz/sources/common/tvectorimage/tcomputeregions.cpp b/toonz/sources/common/tvectorimage/tcomputeregions.cpp
index 4befbe222..d56935242 100644
--- a/toonz/sources/common/tvectorimage/tcomputeregions.cpp
+++ b/toonz/sources/common/tvectorimage/tcomputeregions.cpp
@@ -2741,19 +2741,6 @@ void printStrokes1(vector<VIStroke *> &v, int size)
}
}
-//-----------------------------------------------------------------------------
-#ifdef _DEBUG
-static void printTime(TStopWatch &sw, string name)
-{
- ostrstream ss;
- ss << name << " : ";
- sw.print(ss);
- ss << '\n' << '\0';
- string s = ss.str();
- ss.freeze(false);
- //TSystem::outputDebug(s);
-}
-#endif
//-----------------------------------------------------------------------------
void printStrokes1(vector<VIStroke *> &v, int size);
diff --git a/toonz/sources/toonzlib/stage.cpp b/toonz/sources/toonzlib/stage.cpp
index cd8425fc9..4e0c2e766 100644
--- a/toonz/sources/toonzlib/stage.cpp
+++ b/toonz/sources/toonzlib/stage.cpp
@@ -715,28 +715,6 @@ void StageBuilder::visit(PlayerSet &players, Visitor &visitor, bool isPlaying)
//=============================================================================
-#ifdef _DEBUG
-// debug
-class DummyVisitor : public Visitor
-{
- std::ostrstream m_ss;
-
-public:
- void onImage(const Stage::Player &data) { m_ss << "img "; }
- void beginMask() { m_ss << "beginMask "; }
- void endMask() { m_ss << "endMask "; }
- void enableMask() { m_ss << "enableMask "; }
- void disableMask() { m_ss << "disableMask "; }
- std::string getLog()
- {
- m_ss << '\0';
- std::string log = m_ss.str();
- m_ss.freeze(0);
- return log;
- }
-};
-#endif
-
//=============================================================================
/*! Declare a \b StageBuilder object and recall \b StageBuilder::addFrame() and
\b StageBuilder::visit().
diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cpp
index fc7a18b0b..29186bf5d 100644
--- a/toonz/sources/toonzlib/texturemanager.cpp
+++ b/toonz/sources/toonzlib/texturemanager.cpp
@@ -4,6 +4,8 @@
#include "tsystem.h"
#include "toonz/preferences.h"
+#include <sstream>
+
//==============================================================================
//
//TextureManager
@@ -55,10 +57,9 @@ TDimensionI TextureManager::getMaxSize(bool isRGBM)
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_COMPONENTS, &cmpt);
if (outX && outY) {
- std::ostrstream os;
+ std::stringstream os;
os << "texture size = " << outX << "x" << outY << " fmt " << intFmt << " cmpt# " << cmpt << " " << rSize << "," << gSize << "," << bSize << "," << aSize << '\n' << '\0';
TSystem::outputDebug(os.str());
- os.freeze(false);
}
#endif
} while ((outX == texLx) && (outY == texLy));