OpenToonz - An open-source full-featured 2D animation creation software
C
remove `using namespace std;` from headers
Shinya Kitaoka2148c874ddca
diff --git a/toonz/sources/colorfx/colorfxutils.h b/toonz/sources/colorfx/colorfxutils.hindex eeff9b0c5..14790d555 100644--- a/toonz/sources/colorfx/colorfxutils.h+++ b/toonz/sources/colorfx/colorfxutils.h@@ -8,15 +8,14 @@#include "trandom.h"#include "tregionoutline.h"#include "tcurves.h"-using namespace std;class TRegion;class TFlash;class RubberDeform{- vector<T3DPointD> *m_pPolyOri;- vector<T3DPointD> m_polyLoc;+ std::vector<T3DPointD> *m_pPolyOri;+ std::vector<T3DPointD> m_polyLoc;void deformStep();double avgLength();@@ -25,7 +24,7 @@ class RubberDeformpublic:RubberDeform();- RubberDeform(vector<T3DPointD> *pPolyOri, const double rf = -1.0);+ RubberDeform(std::vector<T3DPointD> *pPolyOri, const double rf = -1.0);void copyLoc2Ori() { *m_pPolyOri = m_polyLoc; };void copyOri2Loc() { m_polyLoc = *m_pPolyOri; };@@ -36,12 +35,12 @@ public:class SFlashUtils{void computeOutline(const TRegion *region, TRegionOutline::PointVector &polyline) const;- void PointVector2QuadsArray(const vector<T3DPointD> &pv,- vector<TQuadratic *> &quadArray,- vector<TQuadratic *> &toBeDeleted,+ void PointVector2QuadsArray(const std::vector<T3DPointD> &pv,+ std::vector<TQuadratic *> &quadArray,+ std::vector<TQuadratic *> &toBeDeleted,const bool isRounded) const;- int nbDiffVerts(const vector<TPointD> &pv) const;- void Triangle2Quad(vector<TPointD> &p) const;+ int nbDiffVerts(const std::vector<TPointD> &pv) const;+ void Triangle2Quad(std::vector<TPointD> &p) const;public:const TRegion *m_r;@@ -54,11 +53,11 @@ public:void computeRegionOutline();void drawRegionOutline(TFlash &flash, const bool isRounded = true) const;void drawGradedPolyline(TFlash &flash,- vector<TPointD> &pv,+ std::vector<TPointD> &pv,const TPixel32 &c1,const TPixel32 &c2) const;void drawGradedRegion(TFlash &flash,- vector<TPointD> &pv,+ std::vector<TPointD> &pv,const TPixel32 &c1,const TPixel32 &c2,const TRegion &r) const;diff --git a/toonz/sources/common/psdlib/psd.h b/toonz/sources/common/psdlib/psd.hindex e243116a2..1538cbe53 100644--- a/toonz/sources/common/psdlib/psd.h+++ b/toonz/sources/common/psdlib/psd.h@@ -7,7 +7,6 @@#include "timage_io.h"#define REF_LAYER_BY_NAME-using namespace std;class TRasterImageP;diff --git a/toonz/sources/common/tvectorimage/tvectorimage.cpp b/toonz/sources/common/tvectorimage/tvectorimage.cppindex f9289aa3c..07fdbf28a 100644--- a/toonz/sources/common/tvectorimage/tvectorimage.cpp+++ b/toonz/sources/common/tvectorimage/tvectorimage.cpp@@ -1662,7 +1662,7 @@ bool TVectorImage::isStrokeStyleEnabled(int index)//------------------------------------------------------------------------------void TVectorImage::getUsedStyles(set<int> &styles) const+void TVectorImage::getUsedStyles(std::set<int> &styles) const{UINT strokeCount = getStrokeCount();UINT i = 0;@@ -2856,7 +2856,7 @@ bool TVectorImage::Imp::canMoveStrokes(int strokeIndex, int count, int moveBeforint i, j = 0;- vector<TGroupId> groupsAfterMoving(m_strokes.size());+ std::vector<TGroupId> groupsAfterMoving(m_strokes.size());if (strokeIndex < moveBefore) {for (i = 0; i < strokeIndex; i++)groupsAfterMoving[j++] = m_strokes[i]->m_groupId;@@ -2887,7 +2887,7 @@ bool TVectorImage::Imp::canMoveStrokes(int strokeIndex, int count, int moveBefori = 0;TGroupId currGroupId;- set<TGroupId> groupSet;+ std::set<TGroupId> groupSet;while (i < (int)groupsAfterMoving.size()) {currGroupId = groupsAfterMoving[i];@@ -2907,11 +2907,11 @@ bool TVectorImage::Imp::canMoveStrokes(int strokeIndex, int count, int moveBefor//------------------------------------------------------------------void TVectorImage::Imp::regroupGhosts(vector<int> &changedStrokes)+void TVectorImage::Imp::regroupGhosts(std::vector<int> &changedStrokes){TGroupId currGroupId;- set<TGroupId> groupMap;- set<TGroupId>::iterator it;+ std::set<TGroupId> groupMap;+ std::set<TGroupId>::iterator it;UINT i = 0;while (i < m_strokes.size()) {diff --git a/toonz/sources/common/tvectorimage/tvectorimageP.h b/toonz/sources/common/tvectorimage/tvectorimageP.hindex 3d206544a..a1b2a9a30 100644--- a/toonz/sources/common/tvectorimage/tvectorimageP.h+++ b/toonz/sources/common/tvectorimage/tvectorimageP.h@@ -7,7 +7,6 @@#include "tvectorimage.h"#include "tregion.h"#include "tcurves.h"-using namespace std;//-----------------------------------------------------------------------------diff --git a/toonz/sources/image/psd/tiio_psd.cpp b/toonz/sources/image/psd/tiio_psd.cppindex a3b962b0a..e0916041b 100644--- a/toonz/sources/image/psd/tiio_psd.cpp+++ b/toonz/sources/image/psd/tiio_psd.cpp@@ -78,7 +78,7 @@ TLevelP TLevelReaderPsd::loadInfo()m_frameTable.clear();for (int i = 0; i < framesCount; i++) {TFrameId frame(i + 1);- m_frameTable.insert(make_pair(frame, psdparser->getFrameId(m_layerId, i)));+ m_frameTable.insert(std::make_pair(frame, psdparser->getFrameId(m_layerId, i)));level->setFrame(frame, TImageP());}return level;diff --git a/toonz/sources/include/tcommon.h b/toonz/sources/include/tcommon.hindex 134430fb2..b55efa012 100644--- a/toonz/sources/include/tcommon.h+++ b/toonz/sources/include/tcommon.h@@ -277,7 +277,7 @@ inline TINT32 swapTINT32(TINT32 val)}inline USHORT swapUshort(USHORT val) { return val >> 8 | val << 8; }-inline ostream &operator<<(ostream &out, const string &s)+inline std::ostream &operator<<(std::ostream &out, const std::string &s){return out << s.c_str();}diff --git a/toonz/sources/include/tcontenthistory.h b/toonz/sources/include/tcontenthistory.hindex a5632796f..ce882e261 100644--- a/toonz/sources/include/tcontenthistory.h+++ b/toonz/sources/include/tcontenthistory.h@@ -10,7 +10,6 @@#include <map>#include <set>-using namespace std;#undef DVAPI#undef DVVAR#ifdef TNZCORE_EXPORTSdiff --git a/toonz/sources/include/tconvert.h b/toonz/sources/include/tconvert.hindex c496867c1..dc9344adc 100644--- a/toonz/sources/include/tconvert.h+++ b/toonz/sources/include/tconvert.h@@ -18,31 +18,31 @@ class TFilePath;#define DVAPI DV_IMPORT_API#endif-DVAPI bool isInt(string s);-DVAPI bool isDouble(string s);+DVAPI bool isInt(std::string s);+DVAPI bool isDouble(std::string s);-DVAPI string toString(int v);-DVAPI string toString(unsigned long v);-DVAPI string toString(unsigned long long v);-DVAPI string toString(double v, int prec = -1);-DVAPI string toString(wstring s);-DVAPI string toString(const TFilePath &fp);-DVAPI string toString(void *p);+DVAPI std::string toString(int v);+DVAPI std::string toString(unsigned long v);+DVAPI std::string toString(unsigned long long v);+DVAPI std::string toString(double v, int prec = -1);+DVAPI std::string toString(wstring s);+DVAPI std::string toString(const TFilePath &fp);+DVAPI std::string toString(void *p);-DVAPI int toInt(string s);-DVAPI double toDouble(string s);+DVAPI int toInt(std::string s);+DVAPI double toDouble(std::string s);-DVAPI bool isInt(wstring s);-DVAPI bool isDouble(wstring s);+DVAPI bool isInt(std::wstring s);+DVAPI bool isDouble(std::wstring s);-DVAPI wstring toWideString(string s);-DVAPI wstring toWideString(int v);-DVAPI wstring toWideString(double v, int prec = -1);+DVAPI std::wstring toWideString(std::string s);+DVAPI std::wstring toWideString(int v);+DVAPI std::wstring toWideString(double v, int prec = -1);-DVAPI int toInt(wstring s);-DVAPI double toDouble(wstring s);+DVAPI int toInt(std::wstring s);+DVAPI double toDouble(std::wstring s);-inline bool fromStr(int &v, string s)+inline bool fromStr(int &v, std::string s){if (isInt(s)) {v = toInt(s);@@ -51,7 +51,7 @@ inline bool fromStr(int &v, string s)return false;}-inline bool fromStr(double &v, string s)+inline bool fromStr(double &v, std::string s){if (isDouble(s)) {v = toDouble(s);@@ -60,17 +60,17 @@ inline bool fromStr(double &v, string s)return false;}-inline bool fromStr(string &out, string s)+inline bool fromStr(std::string &out, std::string s){out = s;return true;}-DVAPI string toUpper(string a);-DVAPI string toLower(string a);+DVAPI std::string toUpper(std::string a);+DVAPI std::string toLower(std::string a);-DVAPI wstring toUpper(wstring a);-DVAPI wstring toLower(wstring a);+DVAPI std::wstring toUpper(std::wstring a);+DVAPI std::wstring toLower(std::wstring a);#ifndef TNZCORE_LIGHT#include <QString>diff --git a/toonz/sources/include/tools/toolutils.h b/toonz/sources/include/tools/toolutils.hindex 7a30272ad..cab1634d3 100644--- a/toonz/sources/include/tools/toolutils.h+++ b/toonz/sources/include/tools/toolutils.h@@ -37,8 +37,6 @@#define DVVAR DV_IMPORT_VAR#endif-using namespace std;-//===================================================================// Forward declarationsdiff --git a/toonz/sources/tnztools/cuttertool.cpp b/toonz/sources/tnztools/cuttertool.cppindex 336ed44a5..7402d2923 100644--- a/toonz/sources/tnztools/cuttertool.cpp+++ b/toonz/sources/tnztools/cuttertool.cpp@@ -253,21 +253,21 @@ public:w = strokeRef->getParameterAtLength(len);}- vector<DoublePair> *sortedWRanges = new vector<DoublePair>;+ std::vector<DoublePair> *sortedWRanges = new std::vector<DoublePair>;if (strokeRef->isSelfLoop()) {- sortedWRanges->push_back(make_pair(0, w));- sortedWRanges->push_back(make_pair(w, 1));+ sortedWRanges->push_back(std::make_pair(0, w));+ sortedWRanges->push_back(std::make_pair(w, 1));} else {if (w == 0 || w == 1)- sortedWRanges->push_back(make_pair(0, 1));+ sortedWRanges->push_back(std::make_pair(0, 1));else {- sortedWRanges->push_back(make_pair(0, w));- sortedWRanges->push_back(make_pair(w, 1));+ sortedWRanges->push_back(std::make_pair(0, w));+ sortedWRanges->push_back(std::make_pair(w, 1));}}- vector<TFilledRegionInf> *fillInformation = new vector<TFilledRegionInf>;+ std::vector<TFilledRegionInf> *fillInformation = new std::vector<TFilledRegionInf>;ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, strokeRef->getBBox());VIStroke *oldStroke = cloneVIStroke(vi->getVIStroke(strokeIndex));diff --git a/toonz/sources/tnztools/vectorerasertool.cpp b/toonz/sources/tnztools/vectorerasertool.cppindex 3d790e3b0..03025e212 100644--- a/toonz/sources/tnztools/vectorerasertool.cpp+++ b/toonz/sources/tnztools/vectorerasertool.cpp@@ -709,7 +709,7 @@ void EraserTool::erase(TVectorImageP vi, const TPointD &pos)sortedWRanges.reserve(intersections.size() / 2);for (UINT j = 0; j < intersections.size() - 1; j += 2)- sortedWRanges.push_back(make_pair(intersections[j], intersections[j + 1]));+ sortedWRanges.push_back(std::make_pair(intersections[j], intersections[j + 1]));#ifdef _DEBUGdiff --git a/toonz/sources/tnztools/vectorselectiontool.cpp b/toonz/sources/tnztools/vectorselectiontool.cppindex fdecbd719..140d23353 100644--- a/toonz/sources/tnztools/vectorselectiontool.cpp+++ b/toonz/sources/tnztools/vectorselectiontool.cpp@@ -128,12 +128,12 @@ inline void notifySelectionChanged()// VectorFreeDeformer implementation//********************************************************************************-VectorFreeDeformer::VectorFreeDeformer(TVectorImageP vi, set<int> strokeIndexes)+VectorFreeDeformer::VectorFreeDeformer(TVectorImageP vi, std::set<int> strokeIndexes): FreeDeformer(), m_vi(vi), m_strokeIndexes(strokeIndexes), m_preserveThickness(false), m_computeRegion(false), m_flip(false){TRectD r;- set<int>::iterator it, iEnd = m_strokeIndexes.end();+ std::set<int>::iterator it, iEnd = m_strokeIndexes.end();for (it = m_strokeIndexes.begin(); it != iEnd; ++it) {TStroke *stroke = m_vi->getStroke(*it);r += stroke->getBBox();diff --git a/toonz/sources/tnztools/vectorselectiontool.h b/toonz/sources/tnztools/vectorselectiontool.hindex 32a93eacb..7f40c24d1 100644--- a/toonz/sources/tnztools/vectorselectiontool.h+++ b/toonz/sources/tnztools/vectorselectiontool.h@@ -68,15 +68,15 @@ enum SelectionTarget //! Possible selection targets in a SelectionTool.class VectorFreeDeformer : public FreeDeformer{TVectorImageP m_vi;- set<int> m_strokeIndexes;- vector<TStroke *> m_originalStrokes;+ std::set<int> m_strokeIndexes;+ std::vector<TStroke *> m_originalStrokes;bool m_preserveThickness, m_computeRegion, m_flip;TThickPoint deform(TThickPoint point);public:- VectorFreeDeformer(TVectorImageP vi, set<int> strokeIndexes);+ VectorFreeDeformer(TVectorImageP vi, std::set<int> strokeIndexes);~VectorFreeDeformer();void setPreserveThickness(bool preserveThickness);diff --git a/toonz/sources/toonz/insertfxpopup.h b/toonz/sources/toonz/insertfxpopup.hindex fe79d6905..70f4718ec 100644--- a/toonz/sources/toonz/insertfxpopup.h+++ b/toonz/sources/toonz/insertfxpopup.h@@ -15,7 +15,6 @@ class TFx;#include <QIcon>using namespace DVGui;-using namespace std;//=============================================================================// InsertFxPopupdiff --git a/toonz/sources/toonz/linesfadepopup.h b/toonz/sources/toonz/linesfadepopup.hindex be2cc557c..a4ad44a8f 100644--- a/toonz/sources/toonz/linesfadepopup.h+++ b/toonz/sources/toonz/linesfadepopup.h@@ -7,8 +7,6 @@#include "toonz/txshsimplelevel.h"#include "traster.h"-using namespace std;-class QSlider;class ImageViewer;class TSelection;diff --git a/toonz/sources/toonz/matchline.cpp b/toonz/sources/toonz/matchline.cppindex 796d188bd..ae67dc747 100644--- a/toonz/sources/toonz/matchline.cpp+++ b/toonz/sources/toonz/matchline.cpp@@ -875,19 +875,19 @@ bool contains(const vector<TFrameId> &v, const TFrameId &val)//------------------------------------------------------------------------------QString indexes2string(const set<TFrameId> fids)+QString indexes2string(const std::set<TFrameId> fids){if (fids.empty())return "";QString str;- set<TFrameId>::const_iterator it = fids.begin();+ std::set<TFrameId>::const_iterator it = fids.begin();str = QString::number(it->getNumber());while (it != fids.end()) {- set<TFrameId>::const_iterator it1 = it;+ std::set<TFrameId>::const_iterator it1 = it;it1++;int lastVal = it->getNumber();@@ -1012,12 +1012,12 @@ void DeleteInkDialog::setRange(const QString &str)DeleteLinesコマンドから呼ばれる場合:chooseInkがtrue--*/-void doDeleteMatchlines(TXshSimpleLevel *sl, const set<TFrameId> &fids, bool chooseInk)+void doDeleteMatchlines(TXshSimpleLevel *sl, const std::set<TFrameId> &fids, bool chooseInk){- vector<int> indexes;+ std::vector<int> indexes;//vector<TToonzImageP> images;- vector<TFrameId> frames;- vector<TFrameId> fidsToProcess;+ std::vector<TFrameId> frames;+ std::vector<TFrameId> fidsToProcess;int i;if (chooseInk) {TPaletteHandle *ph = TApp::instance()->getPaletteController()->getCurrentLevelPalette();@@ -1088,12 +1088,12 @@ void doDeleteMatchlines(TXshSimpleLevel *sl, const set<TFrameId> &fids, bool cho//------------------------------------------------------------------------------void deleteMatchlines(TXshSimpleLevel *sl, const set<TFrameId> &fids)+void deleteMatchlines(TXshSimpleLevel *sl, const std::set<TFrameId> &fids){doDeleteMatchlines(sl, fids, false);}-void deleteInk(TXshSimpleLevel *sl, const set<TFrameId> &fids)+void deleteInk(TXshSimpleLevel *sl, const std::set<TFrameId> &fids){doDeleteMatchlines(sl, fids, true);}diff --git a/toonz/sources/toonz/mergecmapped.cpp b/toonz/sources/toonz/mergecmapped.cppindex 7e0017248..6149dd8cb 100644--- a/toonz/sources/toonz/mergecmapped.cpp+++ b/toonz/sources/toonz/mergecmapped.cpp@@ -629,19 +629,19 @@ bool contains(const vector<TFrameId> &v, const TFrameId &val)//------------------------------------------------------------------------------QString indexes2string(const set<TFrameId> fids)+QString indexes2string(const std::set<TFrameId> fids){if (fids.empty())return "";QString str;- set<TFrameId>::const_iterator it = fids.begin();+ std::set<TFrameId>::const_iterator it = fids.begin();str = QString::number(it->getNumber());while (it != fids.end()) {- set<TFrameId>::const_iterator it1 = it;+ std::set<TFrameId>::const_iterator it1 = it;it1++;int lastVal = it->getNumber();diff --git a/toonz/sources/toonz/mergecolumns.cpp b/toonz/sources/toonz/mergecolumns.cppindex a6ac14376..95f932144 100644--- a/toonz/sources/toonz/mergecolumns.cpp+++ b/toonz/sources/toonz/mergecolumns.cpp@@ -260,11 +260,11 @@ public://------------------------------------------------------------------------------void mergeColumns(const set<int> &columns)+void mergeColumns(const std::set<int> &columns){QApplication::setOverrideCursor(Qt::WaitCursor);- set<int>::const_iterator it = columns.begin();+ std::set<int>::const_iterator it = columns.begin();int dstColumn = *it;++it;@@ -435,19 +435,19 @@ bool contains(const vector<TFrameId> &v, const TFrameId &val)//------------------------------------------------------------------------------QString indexes2string(const set<TFrameId> fids)+QString indexes2string(const std::set<TFrameId> fids){if (fids.empty())return "";QString str;- set<TFrameId>::const_iterator it = fids.begin();+ std::set<TFrameId>::const_iterator it = fids.begin();str = QString::number(it->getNumber());while (it != fids.end()) {- set<TFrameId>::const_iterator it1 = it;+ std::set<TFrameId>::const_iterator it1 = it;it1++;int lastVal = it->getNumber();diff --git a/toonz/sources/toonzfarm/include/service.h b/toonz/sources/toonzfarm/include/service.hindex 9390df2c8..575183605 100644--- a/toonz/sources/toonzfarm/include/service.h+++ b/toonz/sources/toonzfarm/include/service.h@@ -7,7 +7,6 @@ class TFilePath;#include <string>#include <QString>-using namespace std;//------------------------------------------------------------------------------@@ -35,14 +34,14 @@ void AddToMessageLog(char *msg);//-------------------------------------------------------------------------------TFARMAPI string getLastErrorText();+TFARMAPI std::string getLastErrorText();//------------------------------------------------------------------------------class TFARMAPI TService{public:- TService(const string &name, const string &displayName);+ TService(const std::string &name, const std::string &displayName);virtual ~TService();static TService *instance();@@ -59,8 +58,8 @@ public:void setStatus(Status status, long exitCode, long waitHint);- string getName() const;- string getDisplayName() const;+ std::string getName() const;+ std::string getDisplayName() const;void run(int argc, char *argv[], bool console = false);@@ -69,17 +68,17 @@ public:bool isRunningAsConsoleApp() const;- static void start(const string &name);- static void stop(const string &name);+ static void start(const std::string &name);+ static void stop(const std::string &name);static void install(- const string &name,- const string &displayName,+ const std::string &name,+ const std::string &displayName,const TFilePath &appPath);- static void remove(const string &name);+ static void remove(const std::string &name);- static void addToMessageLog(const string &msg);+ static void addToMessageLog(const std::string &msg);static void addToMessageLog(const QString &msg);private:diff --git a/toonz/sources/toonzfarm/tfarm/service.cpp b/toonz/sources/toonzfarm/tfarm/service.cppindex 141c55155..e03e27d10 100644--- a/toonz/sources/toonzfarm/tfarm/service.cpp+++ b/toonz/sources/toonzfarm/tfarm/service.cpp@@ -56,9 +56,9 @@ LPTSTR GetLastErrorText(LPTSTR lpszBuf, DWORD dwSize)//-------------------------------------------------------------------------------string getLastErrorText()+std::string getLastErrorText(){- string errText;+ std::string errText;#ifdef _WIN32char errBuff[256];errText = GetLastErrorText(errBuff, sizeof(errBuff));@@ -89,8 +89,8 @@ public:#endif- string m_name;- string m_displayName;+ std::string m_name;+ std::string m_displayName;static bool m_console;#ifdef _WIN32@@ -111,7 +111,7 @@ bool TService::Imp::m_console = false;//-------------------------------------------------------------------------------TService::TService(const string &name, const string &displayName)+TService::TService(const std::string &name, const std::string &displayName): m_imp(new Imp){m_imp->m_name = name;@@ -155,14 +155,14 @@ void TService::setStatus(Status status, long exitCode, long waitHint)//-------------------------------------------------------------------------------string TService::getName() const+std::string TService::getName() const{return m_imp->m_name;}//-------------------------------------------------------------------------------string TService::getDisplayName() const+std::string TService::getDisplayName() const{return m_imp->m_displayName;}@@ -388,7 +388,7 @@ void TService::run(int argc, char *argv[], bool console)} else {SERVICE_TABLE_ENTRY dispatchTable[2];- string name = TService::instance()->getName().c_str();+ std::string name = TService::instance()->getName().c_str();dispatchTable[0].lpServiceName = (char *)name.c_str();dispatchTable[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)TService::Imp::serviceMain;@@ -406,13 +406,13 @@ void TService::run(int argc, char *argv[], bool console)//-------------------------------------------------------------------------------void TService::start(const string &name)+void TService::start(const std::string &name){}//-------------------------------------------------------------------------------void TService::stop(const string &name)+void TService::stop(const std::string &name){}@@ -425,7 +425,7 @@ bool TService::isRunningAsConsoleApp() const//-------------------------------------------------------------------------------void TService::install(const string &name, const string &displayName, const TFilePath &appPath)+void TService::install(const std::string &name, const std::string &displayName, const TFilePath &appPath){#ifdef _WIN32SC_HANDLE schService;@@ -467,10 +467,10 @@ void TService::install(const string &name, const string &displayName, const TFil//-------------------------------------------------------------------------------void TService::remove(const string &name)+void TService::remove(const std::string &name){#ifdef _WIN32- string displayName = name;+ std::string displayName = name;SC_HANDLE schService;SC_HANDLE schSCManager;@@ -529,7 +529,7 @@ void TService::addToMessageLog(const QString &msg)addToMessageLog(msg.toStdString());}-void TService::addToMessageLog(const string &msg)+void TService::addToMessageLog(const std::string &msg){#ifdef _WIN32TCHAR szMsg[256];@@ -561,7 +561,7 @@ void TService::addToMessageLog(const string &msg)(VOID) DeregisterEventSource(hEventSource);}} else {- cout << msg.c_str();+ std::cout << msg.c_str();}#elseif (!TService::Imp::m_console) {diff --git a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.h b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.hindex 922a64615..00a430655 100644--- a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.h+++ b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.h@@ -16,17 +16,15 @@#include "SError.h"#include "SDef.h"-using namespace std;-#define NBRS 10 // Number of Random Samples-typedef vector<SXYD> BLURSECTION;+typedef std::vector<SXYD> BLURSECTION;class CBlurMatrix{public:bool m_isSAC; // Stop At Contourbool m_isRS; // Random Sampling- vector<BLURSECTION> m_m[NBRS];+ std::vector<BLURSECTION> m_m[NBRS];CBlurMatrix() : m_isSAC(false), m_isRS(false){};CBlurMatrix(const CBlurMatrix &m); //throw(SBlurMatrixError);@@ -36,10 +34,10 @@ public:void createRandom(const double d, const int nb); // throw(SBlurMatrixError);void createEqual(const double d, const int nb); // throw(SBlurMatrixError);- void addPath(vector<BLURSECTION>::iterator pBS); // throw(exception);+ void addPath(std::vector<BLURSECTION>::iterator pBS); // throw(exception);void addPath(); // throw(SBlurMatrixError);void print() const;- bool isIn(const vector<BLURSECTION> &m, const SXYD &xyd) const;+ bool isIn(const std::vector<BLURSECTION> &m, const SXYD &xyd) const;};#endif // !defined(AFX_BLURMATRIX_H__8298C171_0035_11D6_B94F_0040F674BE6A__INCLUDED_)diff --git a/toonz/sources/toonzlib/sandor_fxs/InputParam.h b/toonz/sources/toonzlib/sandor_fxs/InputParam.hindex f7d2366aa..3e09c1528 100644--- a/toonz/sources/toonzlib/sandor_fxs/InputParam.h+++ b/toonz/sources/toonzlib/sandor_fxs/InputParam.h@@ -17,14 +17,12 @@#include <algorithm>#include <string>-using namespace std;-class CInputParam{public:double m_scale;bool m_isEconf;- basic_string<char> m_econfFN;+ std::basic_string<char> m_econfFN;CInputParam() : m_scale(0), m_isEconf(false), m_econfFN(""){};CInputParam(const CInputParam &p) : m_scale(p.m_scale), m_isEconf(p.m_isEconf),diff --git a/toonz/sources/toonzlib/sandor_fxs/Params.h b/toonz/sources/toonzlib/sandor_fxs/Params.hindex 9a487407b..f29680ef2 100644--- a/toonz/sources/toonzlib/sandor_fxs/Params.h+++ b/toonz/sources/toonzlib/sandor_fxs/Params.h@@ -21,13 +21,11 @@#define P(d) tmsg_info(" - %d -\n", d)-using namespace std;-template <class EParam>class CParams{public:- vector<EParam> m_params;+ std::vector<EParam> m_params;double m_scale;CParams() : m_params(0), m_scale(1.0){};diff --git a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.hindex 3e75b903d..e0ee50705 100644--- a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h+++ b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h@@ -18,8 +18,6 @@#include "SError.h"#include "SDef.h"-using namespace std;-class CPatternPosition{bool isInSet(const int nbSet, const int *set, const int val);diff --git a/toonz/sources/toonzlib/sandor_fxs/SDirection.h b/toonz/sources/toonzlib/sandor_fxs/SDirection.hindex 3da23b261..f8b1de5df 100644--- a/toonz/sources/toonzlib/sandor_fxs/SDirection.h+++ b/toonz/sources/toonzlib/sandor_fxs/SDirection.h@@ -17,8 +17,6 @@#include <array>#include <vector>-using namespace std;-//#define MSIZE 3typedef struct {diff --git a/toonz/sources/toonzlib/sandor_fxs/SError.h b/toonz/sources/toonzlib/sandor_fxs/SError.hindex d3294b2cf..cdc9394e1 100644--- a/toonz/sources/toonzlib/sandor_fxs/SError.h+++ b/toonz/sources/toonzlib/sandor_fxs/SError.h@@ -16,12 +16,10 @@#include "SDef.h"-using namespace std;-class SError{protected:- string m_msg;+ std::string m_msg;public:SError() : m_msg(""){};diff --git a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.hindex 124322a13..815205535 100644--- a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h+++ b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h@@ -30,8 +30,6 @@#include "CIL.h"#include "SError.h"-using namespace std;-template <class P>class CSTColSelPic : public CSTPic<P>{diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.hindex 1c92e8ef1..a4cd93e51 100644--- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h+++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h@@ -22,8 +22,6 @@#define P(d) tmsg_info(" - %d -\n", d)-using namespace std;-class CYOMBParam{public:@@ -81,7 +79,7 @@ public:void null();void read(const CInputParam &ip);#ifdef _WIN32- bool read(basic_ifstream<char> &in);+ bool read(std::basic_ifstream<char> &in);#endifvoid makeColorsUS();void makeItUS();diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cppindex 567097ccf..b03109833 100644--- a/toonz/sources/toonzlib/txshsimplelevel.cpp+++ b/toonz/sources/toonzlib/txshsimplelevel.cpp@@ -1489,7 +1489,7 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp, bool ovesl->setPath(getScene()->codeFilePath(app));sl->setType(getType());- set<TFrameId>::iterator eft, efEnd;+ std::set<TFrameId>::iterator eft, efEnd;for (eft = m_editableRange.begin(); eft != efEnd; ++eft) {const TFrameId &fid = *eft;sl->setFrame(fid, getFrame(fid, false));