From df394d69390d88289f94857efcf8685351d0784c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 3 Apr 2016 02:07:41 +0200 Subject: [PATCH] Move to stringstream std::strstream is deprecated, stringstream is the suggested replacement. --- toonz/sources/common/tapptools/tenv.cpp | 8 +++----- toonz/sources/common/tcore/tstopwatch.cpp | 4 ++-- toonz/sources/common/tcore/tstring.cpp | 17 ++++++----------- .../common/trasterimage/tcachedlevel.cpp | 2 +- toonz/sources/common/tstream/tstream.cpp | 12 +++++------- toonz/sources/common/tsystem/tfilepath.cpp | 6 +++--- toonz/sources/common/ttest/ttest.cpp | 2 +- .../common/tvectorimage/tcomputeregions.cpp | 2 +- .../sources/common/tvectorimage/tregionutil.cpp | 2 +- toonz/sources/common/tvectorimage/tstroke.cpp | 4 ++-- toonz/sources/include/tcommon.h | 6 +++--- toonz/sources/stdfx/iwa_particlesengine.cpp | 2 +- toonz/sources/stdfx/particlesengine.cpp | 2 +- .../tscanner/TScannerIO/TUSBScannerIO_M.cpp | 6 +++--- .../tscanner/TScannerIO/TUSBScannerIO_W.cpp | 6 +++--- .../sources/tnzbase/tscanner/tscannerepson.cpp | 10 +++++----- .../toonzfarm/tfarm/tfarmcontroller_c.cpp | 2 +- .../tfarmcontroller/tfarmcontroller.cpp | 2 +- .../toonzfarm/tfarmserver/tfarmserver.cpp | 7 +++---- .../toonzfarm/tnzcore_stuff/tfilepath.cpp | 2 +- .../sources/toonzfarm/tnzcore_stuff/tsystem.cpp | 6 +++--- toonz/sources/toonzlib/autopos.cpp | 13 +++++-------- toonz/sources/toonzlib/stage.cpp | 2 +- .../toonzlib/tcenterlinevectorizerOld.cpp | 2 +- toonz/sources/toonzlib/texturemanager.cpp | 2 +- 25 files changed, 58 insertions(+), 71 deletions(-) diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp index 6441e237..b7e9777f 100644 --- a/toonz/sources/common/tapptools/tenv.cpp +++ b/toonz/sources/common/tapptools/tenv.cpp @@ -624,20 +624,18 @@ istream &operator>>(istream &is, TRect &rect) template string toString2(T value) { - ostrstream ss; + ostringstream ss; ss << value << '\0'; string s(ss.str()); - ss.freeze(false); return s; } template <> string toString2(TRect value) { - ostrstream ss; + ostringstream ss; ss << value.x0 << " " << value.y0 << " " << value.x1 << " " << value.y1 << '\0'; string s = ss.str(); - ss.freeze(false); return s; } @@ -646,7 +644,7 @@ void fromString(string s, T &value) { if (s.empty()) return; - istrstream is(s.c_str(), s.size()); + istringstream is(s.c_str()); is >> value; } diff --git a/toonz/sources/common/tcore/tstopwatch.cpp b/toonz/sources/common/tcore/tstopwatch.cpp index dd0cb166..5075a770 100644 --- a/toonz/sources/common/tcore/tstopwatch.cpp +++ b/toonz/sources/common/tcore/tstopwatch.cpp @@ -352,9 +352,9 @@ TUINT32 TStopWatch::getSystemTime() TStopWatch::operator string() { char buffer[256]; - ostrstream out(buffer, sizeof(buffer)); + ostringstream out(buffer); out << m_name.c_str() << ": " << (int)getTotalTime() << " u" << (int)getUserTime() << " s" << (TINT32)getSystemTime(); - return string(buffer, out.pcount()); + return string(buffer); } //------------------------------------------------------------ diff --git a/toonz/sources/common/tcore/tstring.cpp b/toonz/sources/common/tcore/tstring.cpp index 05a8d14e..62b335e0 100644 --- a/toonz/sources/common/tcore/tstring.cpp +++ b/toonz/sources/common/tcore/tstring.cpp @@ -75,28 +75,25 @@ wstring toWideString(int x) string toString(int value) { - ostrstream ss; + ostringstream ss; ss << value << '\0'; string s = ss.str(); - ss.freeze(false); return s; } string toString(unsigned long value) { - ostrstream ss; + ostringstream ss; ss << value << '\0'; string s = ss.str(); - ss.freeze(false); return s; } string toString(unsigned long long value) { - ostrstream ss; + ostringstream ss; ss << value << '\0'; string s = ss.str(); - ss.freeze(false); return s; } @@ -108,22 +105,20 @@ string toString(unsigned long long value) string toString(double value, int prec) { - ostrstream ss; + ostringstream ss; ss.setf(std::ios_base::fixed, std::ios_base::floatfield); if (prec >= 0) ss.precision(prec); ss << value << '\0'; string s = ss.str(); - ss.freeze(0); return s; } string toString(void *p) { - ostrstream ss; + ostringstream ss; ss << p << '\0'; string s = ss.str(); - ss.freeze(false); return s; } @@ -189,7 +184,7 @@ bool isDouble(wstring s) { return isDouble(toString(s)); } double toDouble(string str) { double value; - istrstream ss(str.c_str(), (std::streamsize)str.length()); + istringstream ss(str.c_str()); ss >> value; return value; } diff --git a/toonz/sources/common/trasterimage/tcachedlevel.cpp b/toonz/sources/common/trasterimage/tcachedlevel.cpp index 8edcccd2..3b638497 100644 --- a/toonz/sources/common/trasterimage/tcachedlevel.cpp +++ b/toonz/sources/common/trasterimage/tcachedlevel.cpp @@ -169,7 +169,7 @@ private: default: char *sysErr = strerror(errorCode); - ostrstream os; + ostringstream os; os << errorCode << '\0'; os.freeze(false); return string(sysErr) + "(" + os.str() + ")"; diff --git a/toonz/sources/common/tstream/tstream.cpp b/toonz/sources/common/tstream/tstream.cpp index 8e48833c..ff1f2d30 100644 --- a/toonz/sources/common/tstream/tstream.cpp +++ b/toonz/sources/common/tstream/tstream.cpp @@ -221,7 +221,7 @@ public: ostream *m_os; bool m_chanOwner; bool m_compressed; - ostrstream m_ostrstream; + ostringstream m_ostringstream; vector m_tagStack; int m_tab; @@ -242,7 +242,7 @@ TOStream::TOStream(const TFilePath &fp, bool compressed) m_imp->m_filepath = fp; if (compressed) { - m_imp->m_os = &m_imp->m_ostrstream; + m_imp->m_os = &m_imp->m_ostringstream; m_imp->m_compressed = true; m_imp->m_chanOwner = false; } else { @@ -287,7 +287,7 @@ TOStream::~TOStream() m_imp->m_justStarted = true; } else { if (m_imp->m_compressed) { - const void *in = (const void *)m_imp->m_ostrstream.str(); + const void *in = (const void *)m_imp->m_ostringstream.str().c_str(); size_t in_len = strlen((char *)in); size_t out_len = LZ4F_compressFrameBound(in_len, NULL); @@ -306,8 +306,6 @@ TOStream::~TOStream() v = out_len; os.write((char *)&v, sizeof v); os.write((char *)out, out_len); - - m_imp->m_ostrstream.freeze(0); } free(out); @@ -959,7 +957,7 @@ TIStream::TIStream(const TFilePath &fp) if (check_len != out_len) throw TException("corrupted file"); - m_imp->m_is = new istrstream((char *)out, out_len); + m_imp->m_is = new istringstream((char *)out); } m_imp->m_chanOwner = true; @@ -1330,7 +1328,7 @@ bool TIStream::getTagParam(string paramName, int &value) string svalue; if (!getTagParam(paramName, svalue)) return false; - istrstream is(svalue.c_str(), svalue.length()); + istringstream is(svalue.c_str()); value = 0; is >> value; return true; diff --git a/toonz/sources/common/tsystem/tfilepath.cpp b/toonz/sources/common/tsystem/tfilepath.cpp index ff579d02..8326676c 100644 --- a/toonz/sources/common/tsystem/tfilepath.cpp +++ b/toonz/sources/common/tsystem/tfilepath.cpp @@ -51,7 +51,7 @@ string TFrameId::expand(FrameFormat format) const else if (m_frame == NO_FRAME) return "-"; char buffer[80]; - ostrstream o_buff(buffer, sizeof(buffer)); + ostringstream o_buff(buffer); if (format == FOUR_ZEROS || format == UNDERSCORE_FOUR_ZEROS) { o_buff.fill('0'); o_buff.width(4); @@ -62,7 +62,7 @@ string TFrameId::expand(FrameFormat format) const } if (m_letter != '\0') o_buff << m_letter; - int len = o_buff.pcount(); + int len = o_buff.tellp(); return string(buffer, len); } @@ -184,7 +184,7 @@ void append(string &out, wchar_t c) else if(c=='&') out.append("&"); else { - ostrstream ss; + ostringstream ss; ss << "&#" << c << ";" << '\0'; out += ss.str(); ss.freeze(0); diff --git a/toonz/sources/common/ttest/ttest.cpp b/toonz/sources/common/ttest/ttest.cpp index 303fa41d..1514fe4e 100644 --- a/toonz/sources/common/ttest/ttest.cpp +++ b/toonz/sources/common/ttest/ttest.cpp @@ -168,7 +168,7 @@ void TTest::runTests(string name) cout << "Test file : '" << testFile << "'" << endl; char buffer[1024]; while (is.getline(buffer, sizeof(buffer))) { - istrstream ss(buffer); + istringstream ss(buffer); while (ss) { string s; ss >> s; diff --git a/toonz/sources/common/tvectorimage/tcomputeregions.cpp b/toonz/sources/common/tvectorimage/tcomputeregions.cpp index 68b6567e..255590b5 100644 --- a/toonz/sources/common/tvectorimage/tcomputeregions.cpp +++ b/toonz/sources/common/tvectorimage/tcomputeregions.cpp @@ -2735,7 +2735,7 @@ void printStrokes1(vector &v, int size) #ifdef _DEBUG static void printTime(TStopWatch &sw, string name) { - ostrstream ss; + ostringstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; diff --git a/toonz/sources/common/tvectorimage/tregionutil.cpp b/toonz/sources/common/tvectorimage/tregionutil.cpp index d0b33f10..65aa1a45 100644 --- a/toonz/sources/common/tvectorimage/tregionutil.cpp +++ b/toonz/sources/common/tvectorimage/tregionutil.cpp @@ -2022,7 +2022,7 @@ void printStrokes1(vector &v, int size) #ifdef _DEBUG static void printTime(TStopWatch &sw, string name) { - ostrstream ss; + ostringstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; diff --git a/toonz/sources/common/tvectorimage/tstroke.cpp b/toonz/sources/common/tvectorimage/tstroke.cpp index 51fbbfb9..7ca45b94 100644 --- a/toonz/sources/common/tvectorimage/tstroke.cpp +++ b/toonz/sources/common/tvectorimage/tstroke.cpp @@ -415,7 +415,7 @@ void printContainer(const T &c, int maxRow = MAX_ROW) typename T::const_iterator cit; cit = c.begin(); - ostrstream oss1; + ostringstream oss1; oss1<<'['< -#include +#include #include #include #include @@ -68,8 +68,8 @@ using std::wstring; using std::ostream; using std::istream; using std::iostream; -using std::ostrstream; -using std::istrstream; +using std::ostringstream; +using std::istringstream; using std::fstream; #if 0 && defined(__GNUC__) diff --git a/toonz/sources/stdfx/iwa_particlesengine.cpp b/toonz/sources/stdfx/iwa_particlesengine.cpp index 1ebbf3d9..8881b561 100644 --- a/toonz/sources/stdfx/iwa_particlesengine.cpp +++ b/toonz/sources/stdfx/iwa_particlesengine.cpp @@ -35,7 +35,7 @@ QMutex mutex; void printTime(TStopWatch &sw, string name) { - ostrstream ss; + ostringstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; diff --git a/toonz/sources/stdfx/particlesengine.cpp b/toonz/sources/stdfx/particlesengine.cpp index 57069f15..b4e2e5d1 100644 --- a/toonz/sources/stdfx/particlesengine.cpp +++ b/toonz/sources/stdfx/particlesengine.cpp @@ -35,7 +35,7 @@ Particles_Engine::Particles_Engine(ParticlesFx *parent, double frame) void printTime(TStopWatch &sw, string name) { - ostrstream ss; + ostringstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; diff --git a/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_M.cpp b/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_M.cpp index 3cc292ce..e0c89d2e 100644 --- a/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_M.cpp +++ b/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_M.cpp @@ -48,7 +48,7 @@ TUSBScannerIOPD::TUSBScannerIOPD() namespace { -void buf2printable(const unsigned char *buffer, const int size, ostrstream &os) +void buf2printable(const unsigned char *buffer, const int size, ostringstream &os) { int i = 0; if ((size == 2) && (buffer[0] == 0x1b)) { @@ -166,7 +166,7 @@ int TUSBScannerIO::receive(unsigned char *buffer, int size) count = usb_bulk_read(m_data->m_handle, m_data->m_epR, (char *)buffer, size, 30 * 1000); if (m_data->m_trace) { - ostrstream os; + ostringstream os; os.freeze(false); os << "receive: size=" << size << " got = " << count << " buf="; buf2printable(buffer, count, os); @@ -195,7 +195,7 @@ int TUSBScannerIO::send(unsigned char *buffer, int size) count = usb_bulk_write(m_data->m_handle, m_data->m_epW, (char *)buffer, size, 30 * 1000); if (m_data->m_trace) { - ostrstream os; + ostringstream os; os.freeze(false); os << "send: size=" << size << " wrote = " << count << " buf="; buf2printable(buffer, size, os); diff --git a/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp b/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp index e252bee4..fd353da5 100644 --- a/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp +++ b/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp @@ -19,7 +19,7 @@ public: //----------------------------------------------------------------------------- namespace { -void buf2printable(const unsigned char *buffer, const int size, ostrstream &os) +void buf2printable(const unsigned char *buffer, const int size, ostringstream &os) { int i = 0; if ((size == 2) && (buffer[0] == 0x1b)) { @@ -95,7 +95,7 @@ int TUSBScannerIO::receive(unsigned char *buffer, int size) ReadFile(m_data->m_handle, ptr, bytesToRead, &count, &overlapped); DWORD waitRC = WaitForSingleObject(overlapped.hEvent, INFINITE); if (m_data->m_trace) { - ostrstream os; + ostringstream os; os.freeze(false); os << "receive: size=" << size << " got = " << count << " buf="; buf2printable(ptr, count, os); @@ -127,7 +127,7 @@ int TUSBScannerIO::send(unsigned char *buffer, int size) WriteFile(m_data->m_handle, buffer, bytesToWrite, &count, 0); if (m_data->m_trace) { - ostrstream os; + ostringstream os; os.freeze(false); os << "send: size=" << size << " wrote = " << count << " buf="; buf2printable(buffer, size, os); diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp index e566d338..064e8d19 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp @@ -322,7 +322,7 @@ void TScannerEpson::acquire(const TScannerParameters ¶ms, int paperCount) bytes_to_read = lines * counter; if (stx != 0x02) { - ostrstream os; + ostringstream os; os << "header corrupted (" << std::hex << stx << ")" << '\0'; throw TException(os.str()); } @@ -651,7 +651,7 @@ if (!resetScanner()) #ifdef _DEBUG memcpy(&status, &(buffer2[1]), 1); - ostrstream os; + ostringstream os; os.freeze(false); os << "stx = " << stx << " status = " << status << " counter=" << counter << '\n' << '\0'; #endif @@ -777,7 +777,7 @@ bool TScannerEpson::expectACK() #ifdef _DEBUG if (ack != ACK) { - ostrstream os; + ostringstream os; os.freeze(false); os << "ack fails ret = 0x" << std::hex << (int)ack << '\n' << '\0'; TSystem::outputDebug(os.str()); @@ -963,7 +963,7 @@ void TScannerEpson::ESCI_readLineData(unsigned char &stx, unsigned char &status, status = buffer[1]; #ifdef _DEBUG - ostrstream os; + ostringstream os; os.freeze(false); os << "fatal=" << fatalError; @@ -999,7 +999,7 @@ void TScannerEpson::ESCI_readLineData2(unsigned char &stx, unsigned char &status status = buffer[1]; #ifdef _DEBUG - ostrstream os; + ostringstream os; os.freeze(false); os << "fatal=" << fatalError; diff --git a/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp b/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp index 899fab8e..e6eba91a 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp @@ -526,7 +526,7 @@ void loadControllerData(const TFilePath &fp, ControllerData &data) is.getline(line, 1024); if (line[0] != '#' && QString(line) != "") { - istrstream iss(line); + istringstream iss(line); char hostName[512]; char ipAddr[80]; diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp index 5a9f70ff..3ca4d43c 100644 --- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp +++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp @@ -751,7 +751,7 @@ void FarmController::loadServersData(const TFilePath &globalRoot) is.getline(line, 80); if (line[0] != '#' && QString(line) != "") { - istrstream iss(line); + istringstream iss(line); char hostName[512]; char ipAddr[80]; diff --git a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp index abbaedac..d2f910d6 100644 --- a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp +++ b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp @@ -515,10 +515,9 @@ FarmServer::~FarmServer() inline string toString(unsigned long value) { - ostrstream ss; + ostringstream ss; ss << value << '\0'; string s = ss.str(); - ss.freeze(false); return s; } @@ -796,7 +795,7 @@ bool loadServerData(const QString &hostname, QString &addr, int &port) is.getline(line, 256); */ string line = getLine(is); - istrstream iss(line.c_str()); + istringstream iss(line.c_str()); char name[80]; char ipAddress[80]; @@ -967,7 +966,7 @@ void FarmServerService::onStart(int argc, char *argv[]) while (!isAppCfgFile.eof()) { string line = getLine(isAppCfgFile); - istrstream iss(line.c_str()); + istringstream iss(line.c_str()); TFilePath appPath = TFilePath(line); appPaths.push_back(appPath); } diff --git a/toonz/sources/toonzfarm/tnzcore_stuff/tfilepath.cpp b/toonz/sources/toonzfarm/tnzcore_stuff/tfilepath.cpp index 36cb086f..c1de7758 100644 --- a/toonz/sources/toonzfarm/tnzcore_stuff/tfilepath.cpp +++ b/toonz/sources/toonzfarm/tnzcore_stuff/tfilepath.cpp @@ -22,7 +22,7 @@ string TFrameId::expand(FrameFormat format) const else if (m_frame == NO_FRAME) return "-"; char buffer[80]; - ostrstream o_buff(buffer, sizeof(buffer)); + ostringstream o_buff(buffer, sizeof(buffer)); if (format == FOUR_ZEROS) { o_buff.fill('0'); o_buff.width(4); diff --git a/toonz/sources/toonzfarm/tnzcore_stuff/tsystem.cpp b/toonz/sources/toonzfarm/tnzcore_stuff/tsystem.cpp index 0372e3ee..d3082213 100644 --- a/toonz/sources/toonzfarm/tnzcore_stuff/tsystem.cpp +++ b/toonz/sources/toonzfarm/tnzcore_stuff/tsystem.cpp @@ -406,7 +406,7 @@ string TTime::getDate() const string TTime::getTime() const { // hh:mm:ss char buffer[10]; - ostrstream buff_s(buffer, sizeof(buffer)); + ostringstream buff_s(buffer, sizeof(buffer)); buff_s << "." << m_msec << '\0'; return getFormattedString("%X") + buffer; } @@ -451,7 +451,7 @@ string TFileStatus::getGroup() const return string(grp->gr_name); #endif char buffer[1024]; - ostrstream buff(buffer, sizeof(buffer)); + ostringstream buff(buffer, sizeof(buffer)); buff << m_fStatus.st_gid; return string(buffer, buff.pcount()); } @@ -466,7 +466,7 @@ string TFileStatus::getUser() const return string(pw->pw_name); #endif char buffer[1024]; - ostrstream buff(buffer, sizeof(buffer)); + ostringstream buff(buffer, sizeof(buffer)); buff << m_fStatus.st_uid; return string(buffer, buff.pcount()); } diff --git a/toonz/sources/toonzlib/autopos.cpp b/toonz/sources/toonzlib/autopos.cpp index 18f8c34d..a5fa27c6 100644 --- a/toonz/sources/toonzlib/autopos.cpp +++ b/toonz/sources/toonzlib/autopos.cpp @@ -775,9 +775,8 @@ static int find_dots_bw(const TRasterP &img, int strip_width, PEGS_SIDE pegs_sid vertical = TRUE; DEFAULT : { - ostrstream os; + ostringstream os; os << "find dots internal error: pegs_side = " << std::hex << pegs_side << '\0'; - os.freeze(false); throw TCleanupException(os.str()); x0 = y0 = xsize = ysize = vertical = 0; } @@ -904,10 +903,9 @@ static int find_dots_gr8(const TRasterGR8P &img, int strip_width, PEGS_SIDE pegs vertical = TRUE; DEFAULT : { - ostrstream os; + ostringstream os; os << "find dots internal error: pegs_side = " << std::hex << pegs_side << '\0'; - os.freeze(false); - throw TCleanupException(os.str()); + throw TCleanupException(os.str().c_str()); x0 = y0 = xsize = ysize = vertical = 0; } } @@ -1029,10 +1027,9 @@ static int find_dots_rgb(const TRaster32P &img, int strip_width, PEGS_SIDE pegs_ vertical = TRUE; DEFAULT : { - ostrstream os; + ostringstream os; os << "find dots internal error: pegs_side = " << std::hex << pegs_side << '\0'; - os.freeze(false); - throw TCleanupException(os.str()); + throw TCleanupException(os.str().c_str()); x0 = y0 = xsize = ysize = vertical = 0; } } diff --git a/toonz/sources/toonzlib/stage.cpp b/toonz/sources/toonzlib/stage.cpp index 27f38538..ec28bfa8 100644 --- a/toonz/sources/toonzlib/stage.cpp +++ b/toonz/sources/toonzlib/stage.cpp @@ -719,7 +719,7 @@ void StageBuilder::visit(PlayerSet &players, Visitor &visitor, bool isPlaying) // debug class DummyVisitor : public Visitor { - ostrstream m_ss; + ostringstream m_ss; public: void onImage(const Stage::Player &data) { m_ss << "img "; } diff --git a/toonz/sources/toonzlib/tcenterlinevectorizerOld.cpp b/toonz/sources/toonzlib/tcenterlinevectorizerOld.cpp index 30e234ae..cbae7738 100644 --- a/toonz/sources/toonzlib/tcenterlinevectorizerOld.cpp +++ b/toonz/sources/toonzlib/tcenterlinevectorizerOld.cpp @@ -2547,7 +2547,7 @@ void CenterLineVectorizer::vectorize() #ifdef DEBUG void printTime(TStopWatch &sw, string name) { - ostrstream ss; + ostringstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cpp index fb9f9e32..cb55c2c4 100644 --- a/toonz/sources/toonzlib/texturemanager.cpp +++ b/toonz/sources/toonzlib/texturemanager.cpp @@ -55,7 +55,7 @@ TDimensionI TextureManager::getMaxSize(bool isRGBM) glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_COMPONENTS, &cmpt); if (outX && outY) { - ostrstream os; + ostringstream os; os << "texture size = " << outX << "x" << outY << " fmt " << intFmt << " cmpt# " << cmpt << " " << rSize << "," << gSize << "," << bSize << "," << aSize << '\n' << '\0'; TSystem::outputDebug(os.str()); os.freeze(false);