From 3bfa549e8bd242facba6762cc01e5183ff9505ef Mon Sep 17 00:00:00 2001 From: Shinya Kitaoka Date: Apr 21 2016 07:23:15 +0000 Subject: remove "using" - using std::string; - using std::wstring; - using std::ostream; - using std::istream; - using std::iostream; - using std::ostrstream; - using std::istrstream; - using std::fstream; --- diff --git a/toonz/sources/colorfx/colorfxutils.cpp b/toonz/sources/colorfx/colorfxutils.cpp index 5ed81c4..df75527 100644 --- a/toonz/sources/colorfx/colorfxutils.cpp +++ b/toonz/sources/colorfx/colorfxutils.cpp @@ -11,7 +11,7 @@ RubberDeform::RubberDeform() : m_pPolyOri(0), m_polyLoc() { } -RubberDeform::RubberDeform(vector *pPolyOri, const double rf) : m_pPolyOri(pPolyOri), +RubberDeform::RubberDeform(std::vector *pPolyOri, const double rf) : m_pPolyOri(pPolyOri), m_polyLoc() { copyOri2Loc(); @@ -28,11 +28,11 @@ RubberDeform::~RubberDeform() void RubberDeform::deformStep() { - vector tmpv; - vector::iterator itb = m_polyLoc.begin(); - vector::iterator ite = m_polyLoc.end(); - for (vector::iterator it = itb; it != ite; ++it) { - vector::iterator it1 = it == (ite - 1) ? itb : it + 1; + std::vector tmpv; + std::vector::iterator itb = m_polyLoc.begin(); + std::vector::iterator ite = m_polyLoc.end(); + for (std::vector::iterator it = itb; it != ite; ++it) { + std::vector::iterator it1 = it == (ite - 1) ? itb : it + 1; double q = 0.5; double qq = 1.0 - q; tmpv.push_back(T3DPointD(qq * it->x + q * it1->x, qq * it->y + q * it1->y, qq * it->z + q * it1->z)); @@ -63,10 +63,10 @@ double RubberDeform::avgLength() return 0.0; double avgD = 0.0; - vector::iterator itb = m_polyLoc.begin(); - vector::iterator ite = m_polyLoc.end(); - for (vector::iterator it = itb; it != ite; ++it) { - vector::iterator it1 = it == (ite - 1) ? itb : it + 1; + std::vector::iterator itb = m_polyLoc.begin(); + std::vector::iterator ite = m_polyLoc.end(); + for (std::vector::iterator it = itb; it != ite; ++it) { + std::vector::iterator it1 = it == (ite - 1) ? itb : it + 1; avgD += tdistance(*it, *it1); } return avgD / (double)m_polyLoc.size(); @@ -93,7 +93,7 @@ void RubberDeform::refinePoly(const double rf) { double refineL = rf <= 0.0 ? avgLength() : rf; - vector tmpv; + std::vector tmpv; int nb = m_polyLoc.size(); for (int j = 0; j < nb; j++) { T3DPointD a(m_polyLoc[j]); @@ -125,7 +125,7 @@ void SFlashUtils::computeOutline(const TRegion *region, const double pixelSize = 1.0; polyline.clear(); - vector polyline2d; + std::vector polyline2d; int edgeSize = region->getEdgeCount(); @@ -163,13 +163,13 @@ void SFlashUtils::computeRegionOutline() m_ro.m_bbox = m_r->getBBox(); } -void SFlashUtils::PointVector2QuadsArray(const vector &pv, - vector &quadArray, - vector &toBeDeleted, +void SFlashUtils::PointVector2QuadsArray(const std::vector &pv, + std::vector &quadArray, + std::vector &toBeDeleted, const bool isRounded) const { - vector::const_iterator ipv = pv.begin(); - vector::const_iterator ipve = pv.end(); + std::vector::const_iterator ipv = pv.begin(); + std::vector::const_iterator ipve = pv.end(); int nbPv = pv.size(); quadArray.clear(); @@ -231,9 +231,9 @@ void SFlashUtils::drawRegionOutline(TFlash &flash, const bool isRounded) const if (!m_r) return; - vector> quads; - vector toBeDeleted; - vector quadArray; + std::vector> quads; + std::vector toBeDeleted; + std::vector quadArray; PointVector2QuadsArray(*(m_ro.m_exterior.begin()), quadArray, toBeDeleted, isRounded); quads.push_back(quadArray); @@ -248,9 +248,9 @@ void SFlashUtils::drawRegionOutline(TFlash &flash, const bool isRounded) const clearPointerContainer(toBeDeleted); } -int SFlashUtils::nbDiffVerts(const vector &pv) const +int SFlashUtils::nbDiffVerts(const std::vector &pv) const { - vector lpv; + std::vector lpv; bool isMissing[4] = {true, true, true, true}; if (pv.size() == 0) return 0; @@ -323,7 +323,7 @@ int SFlashUtils::nbDiffVerts(const vector &pv) const double d1=tdistance(up1,p[2]); double d2=tdistance(up2,p[2]); - vector lpv; + std::vector lpv; if ( d1>d2 ) { lpv=pv; } else { @@ -355,7 +355,7 @@ int SFlashUtils::nbDiffVerts(const vector &pv) const TScale sM(m/flashGrad,2*tmax(x,a-x)/flashGrad); flash.setFillStyleMatrix(tM*rM*sM); - vector pp; + std::vector pp; pp.push_back(p[0]); pp.push_back(p[1]); pp.push_back(p[2]); @@ -365,7 +365,7 @@ int SFlashUtils::nbDiffVerts(const vector &pv) const */ -void SFlashUtils::Triangle2Quad(vector &p) const +void SFlashUtils::Triangle2Quad(std::vector &p) const { TPointD e; int i, j; @@ -395,11 +395,11 @@ void SFlashUtils::Triangle2Quad(vector &p) const } void SFlashUtils::drawGradedPolyline(TFlash &flash, - vector &pvv, + std::vector &pvv, const TPixel32 &c1, const TPixel32 &c2) const { - vector pv; + std::vector pv; pv = pvv; int nbDV = nbDiffVerts(pv); if (nbDV < 3 || nbDV > 4) @@ -417,7 +417,7 @@ void SFlashUtils::drawGradedPolyline(TFlash &flash, double d1 = (tdistance(up1, pv[2]) + tdistance(up1, pv[3])) * 0.5; double d2 = (tdistance(up2, pv[2]) + tdistance(up2, pv[3])) * 0.5; - vector lpv; + std::vector lpv; if (d1 > d2) { lpv = pv; } else { @@ -451,11 +451,11 @@ void SFlashUtils::drawGradedPolyline(TFlash &flash, //------------------------------------------------------------ void SFlashUtils::drawGradedRegion(TFlash &flash, - vector &pvv, + std::vector &pvv, const TPixel32 &c1, const TPixel32 &c2, const TRegion &r) const { - vector pv; + std::vector pv; pv = pvv; int nbDV = nbDiffVerts(pv); if (nbDV < 3 || nbDV > 4) @@ -473,7 +473,7 @@ void SFlashUtils::drawGradedRegion(TFlash &flash, double d1 = (tdistance(up1, pv[2]) + tdistance(up1, pv[3])) * 0.5; double d2 = (tdistance(up2, pv[2]) + tdistance(up2, pv[3])) * 0.5; - vector lpv; + std::vector lpv; if (d1 > d2) { lpv = pv; } else { diff --git a/toonz/sources/colorfx/regionstyles.cpp b/toonz/sources/colorfx/regionstyles.cpp index 57fa739..2ba1944 100644 --- a/toonz/sources/colorfx/regionstyles.cpp +++ b/toonz/sources/colorfx/regionstyles.cpp @@ -353,7 +353,7 @@ void ShadowStyle::setParamValue(int index, double value) //------------------------------------------------------------ -void ShadowStyle::drawPolyline(const TColorFunction *cf, vector &polyline, TPointD shadowDirection) const +void ShadowStyle::drawPolyline(const TColorFunction *cf, std::vector &polyline, TPointD shadowDirection) const { int i; int stepNumber; @@ -476,7 +476,7 @@ void ShadowStyle::drawRegion(const TColorFunction *cf, const bool antiAliasing, //------------------------------------------------------------ /* -int ShadowStyle::drawPolyline(TFlash& flash, vector &polyline, +int ShadowStyle::drawPolyline(TFlash& flash, std::vector &polyline, TPointD shadowDirection, const bool isDraw) const { int i; @@ -492,7 +492,7 @@ int ShadowStyle::drawPolyline(TFlash& flash, vector &polyline, TRegionOutline::PointVector::iterator it_e = polyline.end(); - vector segmentArray; + std::vector segmentArray; v1.x = polyline.back().x; v1.y = polyline.back().y; @@ -518,7 +518,7 @@ int ShadowStyle::drawPolyline(TFlash& flash, vector &polyline, for(i=0; i sa; + std::vector sa; TPointD p0=midPoint; TPointD p1=midPoint+(shadowDirection*len*m_len*0.5); @@ -713,9 +713,9 @@ double ShadowStyle2::getParamValue(TColorStyle::double_tag, int index) const //----------------------------------------------------------------------------- -int nbDiffVerts(const vector &pv) +int nbDiffVerts(const std::vector &pv) { - vector lpv; + std::vector lpv; bool isMissing[4] = {true, true, true, true}; if (pv.size() == 0) return 0; @@ -818,7 +818,7 @@ int drawShadowLine(TFlash &flash, TPixel32 shadowColor, TPixel32 color, vv1 = (v1 + t * diff1); vv2 = (v2 + t * diff2); - vector pv; + std::vector pv; pv.push_back(ovv1); pv.push_back(ovv2); pv.push_back(vv2); @@ -842,7 +842,7 @@ int drawShadowLine(TFlash &flash, TPixel32 shadowColor, TPixel32 color, //------------------------------------------------------------ -void ShadowStyle2::drawPolyline(const TColorFunction *cf, const vector &polyline, TPointD shadowDirection) const +void ShadowStyle2::drawPolyline(const TColorFunction *cf, const std::vector &polyline, TPointD shadowDirection) const { if (polyline.empty()) return; @@ -871,7 +871,7 @@ void ShadowStyle2::drawPolyline(const TColorFunction *cf, const vector lens(size); + std::vector lens(size); v0.x = polyline.back().x; v0.y = polyline.back().y; int count = 0; @@ -973,7 +973,7 @@ void ShadowStyle2::drawRegion(const TColorFunction *cf, const bool antiAliasing, //------------------------------------------------------------ -int ShadowStyle2::drawPolyline(TFlash &flash, vector &polyline, +int ShadowStyle2::drawPolyline(TFlash &flash, std::vector &polyline, TPointD shadowDirection, const bool isDraw) const { int nbDraw = 0; @@ -989,7 +989,7 @@ int ShadowStyle2::drawPolyline(TFlash &flash, vector &polyline, TRegionOutline::PointVector::iterator it_e = polyline.end(); int size = polyline.size(); - vector lens(size); + std::vector lens(size); v0.x = polyline.back().x; v0.y = polyline.back().y; int count = 0; @@ -1504,7 +1504,7 @@ int TPointShadowFillStyle::shadowOnEdge_parallel(TFlash &flash, //------------------------------------------------------------ void TPointShadowFillStyle::deleteSameVerts(TRegionOutline::Boundary::iterator &rit, - vector &pv) const + std::vector &pv) const { pv.clear(); if (rit->size() <= 0) @@ -1570,14 +1570,14 @@ void TPointShadowFillStyle::drawRegion(const TColorFunction *cf, const bool anti TRandom rnd; for (regions_it = regions_it_b; regions_it != regions_it_e; ++regions_it) { - vector pv; + std::vector pv; deleteSameVerts(regions_it, pv); if (pv.size() < 3) continue; - vector::iterator it_beg = pv.begin(); - vector::iterator it_end = pv.end(); - vector::iterator it_last = it_end - 1; - vector::iterator it0, it1, it2; + std::vector::iterator it_beg = pv.begin(); + std::vector::iterator it_end = pv.end(); + std::vector::iterator it_last = it_end - 1; + std::vector::iterator it0, it1, it2; glBegin(GL_POINTS); for (it1 = it_beg; it1 != it_end; it1++) { it0 = it1 == it_beg ? it_last : it1 - 1; @@ -1613,14 +1613,14 @@ void TPointShadowFillStyle::drawRegion(TFlash &flash, const TRegion *r) const int nbDraw = 0; for (regions_it = regions_it_b; regions_it != regions_it_e; ++regions_it) { - vector pv; + std::vector pv; deleteSameVerts(regions_it, pv); if (pv.size() < 3) continue; - vector::iterator it_beg = pv.begin(); - vector::iterator it_end = pv.end(); - vector::iterator it_last = it_end - 1; - vector::iterator it0, it1, it2; + std::vector::iterator it_beg = pv.begin(); + std::vector::iterator it_end = pv.end(); + std::vector::iterator it_last = it_end - 1; + std::vector::iterator it0, it1, it2; for (it1 = it_beg; it1 != it_end; it1++) { it0 = it1 == it_beg ? it_last : it1 - 1; it2 = it1 == it_last ? it_beg : it1 + 1; @@ -1636,14 +1636,14 @@ void TPointShadowFillStyle::drawRegion(TFlash &flash, const TRegion *r) const flash.setThickness(0.0); for (regions_it = regions_it_b; regions_it != regions_it_e; ++regions_it) { - vector pv; + std::vector pv; deleteSameVerts(regions_it, pv); if (pv.size() < 3) continue; - vector::iterator it_beg = pv.begin(); - vector::iterator it_end = pv.end(); - vector::iterator it_last = it_end - 1; - vector::iterator it0, it1, it2; + std::vector::iterator it_beg = pv.begin(); + std::vector::iterator it_end = pv.end(); + std::vector::iterator it_last = it_end - 1; + std::vector::iterator it0, it1, it2; for (it1 = it_beg; it1 != it_end; it1++) { it0 = it1 == it_beg ? it_last : it1 - 1; it2 = it1 == it_last ? it_beg : it1 + 1; @@ -2227,7 +2227,7 @@ void TCheckedFillStyle::drawRegion(TFlash &flash, const TRegion *r) const for (double y = beg; y <= end; y += dist) { TPointD p0, p1, p2, p3; getHThickline(TPointD(bbox.x0, y), lx, p0, p1, p2, p3); - vector v; + std::vector v; v.push_back(p0); v.push_back(p1); v.push_back(p2); @@ -2244,7 +2244,7 @@ void TCheckedFillStyle::drawRegion(TFlash &flash, const TRegion *r) const for (double x = beg; x <= end; x += dist) { TPointD p0, p1, p2, p3; getVThickline(TPointD(x, bbox.y0), ly, p0, p1, p2, p3); - vector v; + std::vector v; v.push_back(p0); v.push_back(p1); v.push_back(p2); @@ -2927,7 +2927,7 @@ void TChessFillStyle::setColorParamValue(int index, const TPixel32 &color) //------------------------------------------------------------ -void TChessFillStyle::makeGrid(TRectD &bbox, TRotation &rotM, vector &grid, +void TChessFillStyle::makeGrid(TRectD &bbox, TRotation &rotM, std::vector &grid, int &nbClip) const { double lx = bbox.x1 - bbox.x0; @@ -3005,11 +3005,11 @@ void TChessFillStyle::drawRegion(const TColorFunction *cf, const bool antiAliasi glEndList(); int nbClip = 1; - vector grid; + std::vector grid; makeGrid(boundary.m_bbox, rotM, grid, nbClip); - vector::const_iterator it = grid.begin(); - vector::const_iterator ite = grid.end(); + std::vector::const_iterator it = grid.begin(); + std::vector::const_iterator ite = grid.end(); for (; it != ite; it++) { glPushMatrix(); glTranslated(it->x, it->y, 0.0); @@ -3043,7 +3043,7 @@ void TChessFillStyle::drawRegion(TFlash &flash, const TRegion *r) const vert[i] = rotM * scaleM * vert[i]; int nbClip = 1; // just for the getMainColor() rectangle - vector grid; + std::vector grid; makeGrid(bbox, rotM, grid, nbClip); // flash.drawRegion(*r,true); @@ -3054,11 +3054,11 @@ void TChessFillStyle::drawRegion(TFlash &flash, const TRegion *r) const flash.setFillColor(m_pointColor); - vector::const_iterator it = grid.begin(); - vector::const_iterator ite = grid.end(); + std::vector::const_iterator it = grid.begin(); + std::vector::const_iterator ite = grid.end(); for (; it != ite; it++) { TTranslation trM(it->x, it->y); - vector lvert; + std::vector lvert; lvert.push_back(trM * vert[0]); lvert.push_back(trM * vert[1]); lvert.push_back(trM * vert[2]); @@ -3439,7 +3439,7 @@ void TStripeFillStyle::drawRegion(TFlash &flash, const TRegion *r) const for (double y = beg; y <= end; y += dist) { TPointD p0, p1, p2, p3; getThickline(TPointD(bbox.x0, y), lx, p0, p1, p2, p3); - vector v; + std::vector v; v.push_back(p0); v.push_back(p1); v.push_back(p2); @@ -3456,7 +3456,7 @@ void TStripeFillStyle::drawRegion(TFlash &flash, const TRegion *r) const TPointD p1(x + m_Thickness, y0); TPointD p2(x, y1); TPointD p3(x + m_Thickness, y1); - vector v; + std::vector v; v.push_back(p0); v.push_back(p1); v.push_back(p3); @@ -3662,9 +3662,9 @@ void TLinGradFillStyle::setColorParamValue(int index, const TPixel32 &color) //------------------------------------------------------------ void TLinGradFillStyle::getRects(const TRectD &bbox, - vector &r0, - vector &r1, - vector &r2) const + std::vector &r0, + std::vector &r1, + std::vector &r2) const { r0.clear(); r1.clear(); @@ -3726,7 +3726,7 @@ void TLinGradFillStyle::drawRegion(const TColorFunction *cf, const bool antiAlia //compute points TRectD bbox(boundary.m_bbox); - vector r0, r1, r2; + std::vector r0, r1, r2; getRects(bbox, r0, r1, r2); assert(r0.size() == 4); assert(r1.size() == 4); @@ -3764,7 +3764,7 @@ void TLinGradFillStyle::drawRegion(const TColorFunction *cf, const bool antiAlia void TLinGradFillStyle::drawRegion(TFlash &flash, const TRegion *r) const { TRectD bbox(r->getBBox()); - vector rect; + std::vector rect; TPointD center((bbox.x1 + bbox.x0) / 2.0, (bbox.y1 + bbox.y0) / 2.0); center = center + TPointD(m_XPos * 0.01 * (bbox.x1 - bbox.x0) * 0.5, m_YPos * 0.01 * (bbox.y1 - bbox.y0) * 0.5); @@ -3794,7 +3794,7 @@ void TLinGradFillStyle::drawRegion(TFlash& flash, const TRegion* r) const p1=TPointD(bbox.x0,bbox.y1); p2=TPointD(bbox.x1,bbox.y0); p3=TPointD(bbox.x1,bbox.y1); - vector pv; + std::vector pv; if ( fabs(m_Angle)!=90 ) { double tga=tan(degree2rad(fabs(m_Angle))); double lx=bbox.x1-bbox.x0; @@ -4044,7 +4044,7 @@ void TRadGradFillStyle::drawRegion(const TColorFunction *cf, const bool antiAlia center = center + TPointD(m_XPos * 0.01 * lx * 0.5, m_YPos * 0.01 * ly * 0.5); const double dAngle = 5.0; - vector sincos; + std::vector sincos; for (double angle = 0.0; angle <= 360.0; angle += dAngle) sincos.push_back(TPointD(sin(degree2rad(angle)), cos(degree2rad(angle)))); @@ -4281,7 +4281,7 @@ void TCircleStripeFillStyle::setColorParamValue(int index, const TPixel32 &color void TCircleStripeFillStyle::getCircleStripeQuads(const TPointD ¢er, const double r1, const double r2, - vector &pv) const + std::vector &pv) const { pv.clear(); const double dAng = 10.0; @@ -4297,7 +4297,7 @@ void TCircleStripeFillStyle::drawCircleStripe(const TPointD ¢er, const double r1, const double r2, const TPixel32 &col) const { - vector pv; + std::vector pv; getCircleStripeQuads(center, r1, r2, pv); TStencilControl *stencil = TStencilControl::instance(); @@ -4621,7 +4621,7 @@ void TMosaicFillStyle::setColorParamValue(int index, const TPixel32 &color) //------------------------------------------------------------ -void TMosaicFillStyle::preaprePos(const TRectD &box, vector &v, +void TMosaicFillStyle::preaprePos(const TRectD &box, std::vector &v, int &lX, int &lY, TRandom &rand) const { double dist = 5.0 + (60.0 - 5.0) * tcrop(m_size, 0.0, 100.0) * 0.01; @@ -4642,7 +4642,7 @@ void TMosaicFillStyle::preaprePos(const TRectD &box, vector &v, bool TMosaicFillStyle::getQuad(const int ix, const int iy, const int lX, const int lY, - vector &v, + std::vector &v, TPointD *pquad, TRandom &rand) const { if (ix < 0 || iy < 0 || ix >= (lX - 1) || iy >= (lY - 1)) @@ -4703,7 +4703,7 @@ void TMosaicFillStyle::drawRegion(const TColorFunction *cf, const bool antiAlias } TPixel32 currentColor; - vector pos; + std::vector pos; int posLX, posLY; TRandom rand; TPointD quad[4]; @@ -4746,7 +4746,7 @@ void TMosaicFillStyle::drawRegion(TFlash &flash, const TRegion *r) const TRectD bbox(r->getBBox()); - vector pos; + std::vector pos; int posLX, posLY; TRandom rand; TPointD quad[4]; @@ -4765,7 +4765,7 @@ void TMosaicFillStyle::drawRegion(TFlash &flash, const TRegion *r) const for (int y = 0; y < (posLY - 1); y++) for (int x = 0; x < (posLX - 1); x++) if (getQuad(x, y, posLX, posLY, pos, quad, rand)) { - vector lvert; + std::vector lvert; lvert.push_back(quad[0]); lvert.push_back(quad[1]); lvert.push_back(quad[2]); @@ -4946,7 +4946,7 @@ void TPatchFillStyle::setColorParamValue(int index, const TPixel32 &color) //------------------------------------------------------------ -void TPatchFillStyle::preaprePos(const TRectD &box, vector &v, +void TPatchFillStyle::preaprePos(const TRectD &box, std::vector &v, int &lX, int &lY, TRandom &rand) const { double q = tcrop(m_size, 0.0, 100.0) * 0.01; @@ -5040,7 +5040,7 @@ void TPatchFillStyle::drawRegion(const TColorFunction *cf, const bool antiAliasi TPixel32 currentColor; - vector pos; + std::vector pos; int posLX, posLY; TRandom rand; TPointD quad[4]; @@ -5114,7 +5114,7 @@ void TPatchFillStyle::drawRegion(const TColorFunction *cf, const bool antiAliasi //------------------------------------------------------------ -int TPatchFillStyle::nbClip(const int lX, const int lY, const vector &v) const +int TPatchFillStyle::nbClip(const int lX, const int lY, const std::vector &v) const { TPointD quad[4]; double thickn = tcrop(m_thickness, 0.0, 100.0) * 0.01 * 5.0; @@ -5144,7 +5144,7 @@ int TPatchFillStyle::nbClip(const int lX, const int lY, const vector &v void TPatchFillStyle::drawFlashQuad(TFlash &flash, const TPointD *quad) const { - vector lvert; + std::vector lvert; lvert.push_back(quad[0]); lvert.push_back(quad[1]); lvert.push_back(quad[2]); @@ -5163,7 +5163,7 @@ void TPatchFillStyle::drawFlashTriangle(TFlash &flash, const TPointD &p2, const TPointD &p3) const { - vector lvert; + std::vector lvert; lvert.push_back(p1); lvert.push_back(p2); lvert.push_back(p3); @@ -5177,7 +5177,7 @@ void TPatchFillStyle::drawRegion(TFlash &flash, const TRegion *r) const TRectD bbox(r->getBBox()); - vector pos; + std::vector pos; int posLX, posLY; TRandom rand; TPointD quad[4]; @@ -5191,7 +5191,7 @@ void TPatchFillStyle::drawRegion(TFlash &flash, const TRegion *r) const int x; for (x = 2; x < (posLX - 2); x += 2) for (int y = 1; y < posLY; y++) { - vector lvert; + std::vector lvert; if ((x % 4) == 2) { lvert.push_back(pos[(x - 1) * posLY + y]); lvert.push_back(pos[(x)*posLY + y]); diff --git a/toonz/sources/colorfx/regionstyles.h b/toonz/sources/colorfx/regionstyles.h index d9fb359..0215837 100644 --- a/toonz/sources/colorfx/regionstyles.h +++ b/toonz/sources/colorfx/regionstyles.h @@ -138,7 +138,7 @@ protected: void saveData(TOutputStreamInterface &os) const; private: - void drawPolyline(const TColorFunction *cf, vector &polyline, TPointD shadowDirection) const; + void drawPolyline(const TColorFunction *cf, std::vector &polyline, TPointD shadowDirection) const; }; //============================================================ @@ -187,8 +187,8 @@ protected: void saveData(TOutputStreamInterface &os) const; private: - void drawPolyline(const TColorFunction *cf, const vector &polyline, TPointD shadowDirection) const; - int drawPolyline(TFlash &flash, vector &polyline, + void drawPolyline(const TColorFunction *cf, const std::vector &polyline, TPointD shadowDirection) const; + int drawPolyline(TFlash &flash, std::vector &polyline, TPointD shadowDirection, const bool isDraw = true) const; }; @@ -223,8 +223,8 @@ public: class DVAPI TRubberFillStyle : public TSolidColorStyle { - typedef vector QuadraticVector; - typedef vector QuadraticPVector; + typedef std::vector QuadraticVector; + typedef std::vector QuadraticPVector; public: TRubberFillStyle(const TPixel32 &color, double deform); @@ -319,7 +319,7 @@ private: const bool isDraw) const; void deleteSameVerts(TRegionOutline::Boundary::iterator &rit, - vector &pv) const; + std::vector &pv) const; }; //============================================================ @@ -532,7 +532,7 @@ public: QString getDescription() const { return QCoreApplication::translate("TChalkFillStyle", "Chalk"); } void loadData(int oldId, TInputStreamInterface &); - void getObsoleteTagIds(vector &ids) const { ids.push_back(1133); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(1133); } int getTagId() const { return 1143; }; protected: @@ -586,7 +586,7 @@ protected: private: void makeGrid(TRectD &bbox, TRotation &rotM, - vector &grid, int &nbClip) const; + std::vector &grid, int &nbClip) const; }; //============================================================ @@ -689,10 +689,10 @@ protected: void saveData(TOutputStreamInterface &os) const; private: - void getRects(const TRectD &bbox, vector &r0, - vector &r1, vector &r2) const; + void getRects(const TRectD &bbox, std::vector &r0, + std::vector &r1, std::vector &r2) const; - void getRect(const TRectD &bbox, vector &r) const; + void getRect(const TRectD &bbox, std::vector &r) const; }; //============================================================ @@ -790,7 +790,7 @@ protected: private: void getCircleStripeQuads(const TPointD ¢er, const double r1, const double r2, - vector &pv) const; + std::vector &pv) const; void drawCircleStripe(const TPointD ¢er, const double r1, const double r2, const TPixel32 &col) const; @@ -848,11 +848,11 @@ protected: void saveData(TOutputStreamInterface &os) const; private: - void preaprePos(const TRectD &box, vector &v, + void preaprePos(const TRectD &box, std::vector &v, int &lX, int &lY, TRandom &rand) const; bool getQuad(const int ix, const int iy, const int lX, const int lY, - vector &v, TPointD *pquad, TRandom &rand) const; + std::vector &v, TPointD *pquad, TRandom &rand) const; }; //============================================================ @@ -896,12 +896,12 @@ public: QString getDescription() const { return QCoreApplication::translate("TPatchFillStyle", "Beehive"); } private: - void preaprePos(const TRectD &box, vector &v, + void preaprePos(const TRectD &box, std::vector &v, int &lX, int &lY, TRandom &rand) const; bool getQuadLine(const TPointD &a, const TPointD &b, const double thickn, TPointD *quad) const; void drawGLQuad(const TPointD *quad) const; - int nbClip(const int lX, const int lY, const vector &v) const; + int nbClip(const int lX, const int lY, const std::vector &v) const; void drawFlashQuad(TFlash &flash, const TPointD *quad) const; void drawFlashTriangle(TFlash &flash, const TPointD &p1, const TPointD &p2, const TPointD &p3) const; diff --git a/toonz/sources/colorfx/strokestyles.h b/toonz/sources/colorfx/strokestyles.h index b79dba1..9d490d6 100644 --- a/toonz/sources/colorfx/strokestyles.h +++ b/toonz/sources/colorfx/strokestyles.h @@ -31,21 +31,21 @@ typedef struct { double dbl2; } PointAnd2Double; -typedef vector Points; +typedef std::vector Points; typedef struct { float blend; Points points; } BlendAndPoint; -typedef vector> PointsAndColors; -typedef vector PointMatrix; -typedef vector> PointsAndDoubles; -typedef vector> DrawmodePointsMatrix; -typedef vector RectVector; -typedef vector PointsAnd2Doubles; -typedef vector Doubles; -typedef vector BlendAndPoints; +typedef std::vector> PointsAndColors; +typedef std::vector PointMatrix; +typedef std::vector> PointsAndDoubles; +typedef std::vector> DrawmodePointsMatrix; +typedef std::vector RectVector; +typedef std::vector PointsAnd2Doubles; +typedef std::vector Doubles; +typedef std::vector BlendAndPoints; //============================================================================= template @@ -376,7 +376,7 @@ public: bool isSaveSupported() { return true; } int getTagId() const { return 136; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(112); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(112); } }; //------------------------------------------------------------------- @@ -455,7 +455,7 @@ public: bool isSaveSupported() { return true; } int getTagId() const { return 114; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(137); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(137); } }; //------------------------------------------------------------------- @@ -539,7 +539,7 @@ public: } int getTagId() const { return 135; }; - void getObsoleteTagIds(vector &ids) const + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(115); ids.push_back(119); @@ -587,7 +587,7 @@ public: << m_shininess << m_metal << m_bend; } int getTagId() const { return 120; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(121); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(121); } }; //------------------------------------------------------------------- @@ -626,7 +626,7 @@ public: void saveData(TOutputStreamInterface &os) const { os << m_color << m_blend << m_intensity << m_in << m_out << m_noise; } int getTagId() const { return 123; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(105); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(105); } }; //------------------------------------------------------------------- @@ -667,7 +667,7 @@ public: bool isSaveSupported() { return true; } int getTagId() const { return 125; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(110); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(110); } }; //------------------------------------------------------------------- @@ -804,7 +804,7 @@ public: bool isSaveSupported() { return true; } int getTagId() const { return 138; }; - void getObsoleteTagIds(vector &ids) const + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(118); ids.push_back(128); @@ -927,8 +927,8 @@ public: double getParamValue(TColorStyle::double_tag, int index) const; void setParamValue(int index, double value); - void computeData(vector &positions, const TStroke *stroke, const TColorFunction *cf) const; - void drawStroke(const TColorFunction *cf, vector &positions, const TStroke *stroke) const; + void computeData(std::vector &positions, const TStroke *stroke, const TColorFunction *cf) const; + void drawStroke(const TColorFunction *cf, std::vector &positions, const TStroke *stroke) const; //void drawStroke(const TColorFunction *cf, const TStroke *stroke) const; void drawStroke(TFlash &flash, const TStroke *stroke) const; @@ -936,7 +936,7 @@ public: void loadData(int oldId, TInputStreamInterface &); void saveData(TOutputStreamInterface &os) const { os << m_color << m_parameter << m_thick; } int getTagId() const { return 133; }; - void getObsoleteTagIds(vector &ids) const { ids.push_back(102); } + void getObsoleteTagIds(std::vector &ids) const { ids.push_back(102); } }; //------------------------------------------------------------------- @@ -1122,9 +1122,9 @@ protected: double m_outlinePixelSize; TMatrioskaStrokeStyle *m_colorStyle; - vector m_outline; + std::vector m_outline; - vector m_appStrokes; + std::vector m_appStrokes; public: TMatrioskaStrokeProp(const TStroke *stroke, TMatrioskaStrokeStyle *style); diff --git a/toonz/sources/common/expressions/texpression.cpp b/toonz/sources/common/expressions/texpression.cpp index f8d395d..8c6ffc5 100644 --- a/toonz/sources/common/expressions/texpression.cpp +++ b/toonz/sources/common/expressions/texpression.cpp @@ -88,7 +88,7 @@ const TSyntax::Grammar *TExpression::getGrammar() const //-------------------------------------------------------------------------- -void TExpression::setText(string text) +void TExpression::setText(std::string text) { if (m_imp->m_text != text) { m_imp->m_text = text; @@ -103,7 +103,7 @@ void TExpression::setText(string text) //-------------------------------------------------------------------------- -string TExpression::getText() const +std::string TExpression::getText() const { return m_imp->m_text; } @@ -132,7 +132,7 @@ bool TExpression::isValid() //-------------------------------------------------------------------------- -string TExpression::getError() const +std::string TExpression::getError() const { return m_imp->m_error; } @@ -208,5 +208,5 @@ TDoubleParam *TExpression::getOwnerParameter() const bool TExpression::isCycling() const { // TODO: this is a quick&dirty implementation to be replaced with a more "semantic" one - return getText().find("cycle") != string::npos; + return getText().find("cycle") != std::string::npos; } diff --git a/toonz/sources/common/expressions/tgrammar.cpp b/toonz/sources/common/expressions/tgrammar.cpp index 7eb762a..7bfec1e 100644 --- a/toonz/sources/common/expressions/tgrammar.cpp +++ b/toonz/sources/common/expressions/tgrammar.cpp @@ -390,17 +390,17 @@ public: class ConstantPattern : public Pattern { - string m_constantName; + std::string m_constantName; double m_value; public: - ConstantPattern(string constantName, double value, string description = "") + ConstantPattern(std::string constantName, double value, std::string description = "") : m_constantName(constantName), m_value(value) { setDescription(description); } - string getFirstKeyword() const { return m_constantName; } + std::string getFirstKeyword() const { return m_constantName; } bool matchToken(const std::vector &previousTokens, const Token &token) const { return previousTokens.empty() && token.getText() == m_constantName; @@ -428,17 +428,17 @@ public: class VariablePattern : public Pattern { - string m_variableName; + std::string m_variableName; int m_varIdx; public: - VariablePattern(string variableName, int varIdx, string description = "") + VariablePattern(std::string variableName, int varIdx, std::string description = "") : m_variableName(variableName), m_varIdx(varIdx) { setDescription(description); } - string getFirstKeyword() const { return m_variableName; } + std::string getFirstKeyword() const { return m_variableName; } bool matchToken(const std::vector &previousTokens, const Token &token) const { return previousTokens.empty() && token.getText() == m_variableName; @@ -468,14 +468,14 @@ public: template class Op2Pattern : public Pattern { - string m_opName; + std::string m_opName; int m_priority; public: - Op2Pattern(string opName, int priority) + Op2Pattern(std::string opName, int priority) : m_opName(opName), m_priority(priority) {} int getPriority() const { return m_priority; } - string getFirstKeyword() const { return m_opName; } + std::string getFirstKeyword() const { return m_opName; } bool expressionExpected(const std::vector &previousTokens) const { return previousTokens.empty() || previousTokens.size() == 2; @@ -512,7 +512,7 @@ class UnaryMinusPattern : public Pattern public: UnaryMinusPattern() {} int getPriority() const { return 50; } - string getFirstKeyword() const { return "-"; } + std::string getFirstKeyword() const { return "-"; } bool expressionExpected(const std::vector &previousTokens) const { @@ -546,15 +546,15 @@ public: class NotPattern : public Pattern { - string m_prefix; + std::string m_prefix; public: - NotPattern(string prefix, string description) : m_prefix(prefix) + NotPattern(std::string prefix, std::string description) : m_prefix(prefix) { setDescription(description); } int getPriority() const { return 5; } - string getFirstKeyword() const { return m_prefix; } + std::string getFirstKeyword() const { return m_prefix; } bool expressionExpected(const std::vector &previousTokens) const { @@ -590,7 +590,7 @@ class QuestionTernaryPattern : public Pattern public: QuestionTernaryPattern() {} int getPriority() const { return 5; } - string getFirstKeyword() const { return "?"; } + std::string getFirstKeyword() const { return "?"; } bool expressionExpected(const std::vector &previousTokens) const { @@ -629,7 +629,7 @@ class BraketPattern : public Pattern public: BraketPattern() {} int getPriority() const { return 5; } - string getFirstKeyword() const { return "("; } + std::string getFirstKeyword() const { return "("; } bool expressionExpected(const std::vector &previousTokens) const { @@ -664,7 +664,7 @@ public: class FunctionPattern : public Pattern { protected: - string m_functionName; + std::string m_functionName; bool m_implicitArgAllowed; // if m_implicitArgAllowed == true then the first argument is the frame number // e.g. f(5) means f(frame,5) @@ -674,7 +674,7 @@ protected: std::vector m_optionalArgDefaults; public: - FunctionPattern(string functionName, int minArgCount) + FunctionPattern(std::string functionName, int minArgCount) : m_functionName(functionName), m_implicitArgAllowed(false), m_minArgCount(minArgCount) { } @@ -682,7 +682,7 @@ public: void allowImplicitArg(bool allowed) { m_implicitArgAllowed = allowed; } void addOptionalArg(double value) { m_optionalArgDefaults.push_back(value); } - string getFirstKeyword() const { return m_functionName; } + std::string getFirstKeyword() const { return m_functionName; } bool expressionExpected(const std::vector &previousTokens) const { int n = (int)previousTokens.size(); @@ -692,7 +692,7 @@ public: bool matchToken(const std::vector &previousTokens, const Token &token) const { int i = (int)previousTokens.size(); - string s = toLower(token.getText()); + std::string s = toLower(token.getText()); if (i == 0) return s == toLower(m_functionName); else if (i == 1) @@ -781,7 +781,7 @@ template class F0Pattern : public FunctionPattern { public: - F0Pattern(string functionName) : FunctionPattern(functionName, 0) {} + F0Pattern(std::string functionName) : FunctionPattern(functionName, 0) {} void createNode(Calculator *calc, std::vector &stack, const std::vector &tokens) const { @@ -795,7 +795,7 @@ template class F1Pattern : public FunctionPattern { public: - F1Pattern(string functionName, string descr = "") : FunctionPattern(functionName, 1) { setDescription(descr); } + F1Pattern(std::string functionName, std::string descr = "") : FunctionPattern(functionName, 1) { setDescription(descr); } void createNode(Calculator *calc, std::vector &stack, const std::vector &tokens) const { @@ -809,7 +809,7 @@ template class F2Pattern : public FunctionPattern { public: - F2Pattern(string functionName, string descr = "") : FunctionPattern(functionName, 2) { setDescription(descr); } + F2Pattern(std::string functionName, std::string descr = "") : FunctionPattern(functionName, 2) { setDescription(descr); } void createNode(Calculator *calc, std::vector &stack, const std::vector &tokens) const { @@ -825,7 +825,7 @@ template class F3Pattern : public FunctionPattern { public: - F3Pattern(string functionName, string descr = "") : FunctionPattern(functionName, 3) { setDescription(descr); } + F3Pattern(std::string functionName, std::string descr = "") : FunctionPattern(functionName, 3) { setDescription(descr); } void createNode(Calculator *calc, std::vector &stack, const std::vector &tokens) const { @@ -842,7 +842,7 @@ template class Fs2Pattern : public FunctionPattern { public: - Fs2Pattern(string functionName, string description) + Fs2Pattern(std::string functionName, std::string description) : FunctionPattern(functionName, 1) { allowImplicitArg(true); @@ -864,7 +864,7 @@ template class Fs3Pattern : public FunctionPattern { public: - Fs3Pattern(string functionName, double defVal, string descr) + Fs3Pattern(std::string functionName, double defVal, std::string descr) : FunctionPattern(functionName, 1) { allowImplicitArg(true); @@ -886,7 +886,7 @@ public: class CyclePattern : public FunctionPattern { public: - CyclePattern(string functionName) : FunctionPattern(functionName, 1) + CyclePattern(std::string functionName) : FunctionPattern(functionName, 1) { setDescription("cycle(period)\nCycles the transitions of the period previous frames to the selected range"); } @@ -905,7 +905,7 @@ class RandomPattern : public FunctionPattern bool m_seed; public: - RandomPattern(string functionName, bool seed, string description) + RandomPattern(std::string functionName, bool seed, std::string description) : FunctionPattern(functionName, seed ? 1 : 0), m_seed(seed) { allowImplicitArg(true); @@ -935,7 +935,7 @@ public: class PatternTable { - std::map m_kTable; + std::map m_kTable; std::vector m_uTable; Grammar::Position m_position; @@ -944,7 +944,7 @@ public: ~PatternTable() { - for (std::map::iterator + for (std::map::iterator it = m_kTable.begin(); it != m_kTable.end(); ++it) delete it->second; @@ -956,7 +956,7 @@ public: void addPattern(Pattern *pattern) { - string keyword = pattern->getFirstKeyword(); + std::string keyword = pattern->getFirstKeyword(); if (keyword != "") { // first keyword should be unique assert(m_kTable.count(keyword) == 0); @@ -971,8 +971,8 @@ public: if (m_position == Grammar::ExpressionEnd) tokens.push_back(Token()); if (token.getType() == Token::Punct || token.getType() == Token::Ident) { - string keyword = token.getText(); - std::map::const_iterator it = m_kTable.find(keyword); + std::string keyword = token.getText(); + std::map::const_iterator it = m_kTable.find(keyword); if (it != m_kTable.end()) { Pattern *pattern = it->second; if (pattern->matchToken(tokens, token)) { @@ -991,7 +991,7 @@ public: void getSuggestions(Grammar::Suggestions &suggestions) const { - std::map::const_iterator it; + std::map::const_iterator it; for (it = m_kTable.begin(); it != m_kTable.end(); ++it) { suggestions.push_back(std::make_pair(it->first, it->second->getDescription())); } @@ -1248,10 +1248,10 @@ Grammar::Grammar() addPattern(new NumberPattern()); addPattern(new ConstantPattern("pi", PI, "3.14159265...")); addPattern(new VariablePattern("t", CalculatorNode::T, "ranges from 0.0 to 1.0 along the transition")); - const string f_desc = "the current frame number"; + const std::string f_desc = "the current frame number"; addPattern(new VariablePattern("f", CalculatorNode::FRAME, f_desc)); addPattern(new VariablePattern("frame", CalculatorNode::FRAME, f_desc)); - const string r_desc = "the current frame number, relative to the transition"; + const std::string r_desc = "the current frame number, relative to the transition"; addPattern(new VariablePattern("r", CalculatorNode::RFRAME, r_desc)); addPattern(new VariablePattern("rframe", CalculatorNode::RFRAME, r_desc)); addPattern(new Op2Pattern>("+", 10)); @@ -1286,13 +1286,13 @@ Grammar::Grammar() addPattern(new F1Pattern("log", "log(x)\nThe natural logarithm of x (base e)")); addPattern(new F1Pattern("exp", "exp(x)\nThe base-e exponential of x")); addPattern(new F1Pattern("floor", "floor(x)\nThe greatest integer <= x")); - const string ceil_desc = "The smallest integer >= x"; + const std::string ceil_desc = "The smallest integer >= x"; addPattern(new F1Pattern("ceil", "ceil(x)\n" + ceil_desc)); addPattern(new F1Pattern("ceiling", "ceiling(x)\n" + ceil_desc)); addPattern(new F1Pattern("round", "round(x)\nThe integer nearest to x")); addPattern(new F1Pattern("abs", "abs(x)\nThe absolute value of x")); addPattern(new F1Pattern("sign", "sign(x)\n-1 if x<0, 1 if x>0 and 0 if x=0")); - const string sqrt_desc = "Square root of x"; + const std::string sqrt_desc = "Square root of x"; addPattern(new F1Pattern("sqrt", "sqrt(x)\n" + sqrt_desc)); addPattern(new F1Pattern("sqr", "sqr(x)\n" + sqrt_desc)); addPattern(new F3Pattern("crop", "crop(x,a,b)\na if xb, x if x in [a,b]")); @@ -1301,17 +1301,17 @@ Grammar::Grammar() addPattern(new F2Pattern("max", "max(a,b)")); addPattern(new F2Pattern("step", "min(x,x0)\n0 if x=x0")); addPattern(new F3Pattern("smoothstep", "smoothstep(x,x0)\n0 if x=x0\nas step, but with smooth transition")); - const string pulse_desc = "Generates a bump ranging from 0.0 to 1.0 set at position pos"; + const std::string pulse_desc = "Generates a bump ranging from 0.0 to 1.0 set at position pos"; addPattern(new Fs3Pattern("pulse", 0.5, "pulse(pos)\npulse(pos,length)\npulse(arg; pos)\npulse(arg;pos,length)\n" + pulse_desc)); addPattern(new Fs3Pattern("bump", 0.5, "bump(pos)\nbump(pos,length)\nbump(arg; pos)\nbump(arg;pos,length)\n" + pulse_desc)); - const string saw_desc = "Generates a periodic sawtooth shaped curve"; + const std::string saw_desc = "Generates a periodic sawtooth shaped curve"; addPattern(new Fs3Pattern("sawtooth", 0.0, "sawtooth(length)\nsawtooth(length, height)\nsawtooth(arg; length)\nsawtooth(arg; length, height)\n" + saw_desc)); addPattern(new Fs3Pattern("saw", 0.0, "saw(length)\nsaw(length, height)\nsaw(arg; length)\nsaw(arg; length, height)\n" + saw_desc)); addPattern(new Fs2Pattern("wave", "wave(_length)\nwave(_arg;_length)\nsame as sin(f*180/length)")); - const string rnd_desc = "Generates random number between min and max"; + const std::string rnd_desc = "Generates random number between min and max"; addPattern(new RandomPattern("random", false, "random = random(0,1)\nrandom(max) = random(0,max)\nrandom(min,max)\n" + rnd_desc)); addPattern(new RandomPattern("rnd", false, "rnd = rnd(0,1)\nrnd(max) = rnd(0,max)\nrnd(min,max)\n" + rnd_desc)); - const string rnd_s_desc = rnd_desc + "; seed select different random sequences"; + const std::string rnd_s_desc = rnd_desc + "; seed select different random sequences"; addPattern(new RandomPattern("random_s", true, "random_s(seed) = random_s(seed, 0,1)\nrandom_s(seed,max) = random_s(seed, 0,max)\nrandom_s(seed,min,max)\n" + rnd_s_desc)); addPattern(new RandomPattern("rnd_s", true, "rnd_s(seed) = rnd_s(seed, 0,1)\nrnd_s(seed,max) = rnd_s(seed, 0,max)\nrnd_s(seed,min,max)\n" + rnd_s_desc)); diff --git a/toonz/sources/common/expressions/tparser.cpp b/toonz/sources/common/expressions/tparser.cpp index 17140e4..2b586e3 100644 --- a/toonz/sources/common/expressions/tparser.cpp +++ b/toonz/sources/common/expressions/tparser.cpp @@ -54,7 +54,7 @@ class Parser::Imp public: const Grammar *m_grammar; Tokenizer m_tokenizer; - string m_errorString; + std::string m_errorString; bool m_isValid; Calculator *m_calculator; std::vector m_patternStack; @@ -240,7 +240,7 @@ bool Parser::Imp::parseExpression(bool checkOnly) //------------------------------------------------------------------- -Calculator *Parser::parse(string text) +Calculator *Parser::parse(std::string text) { m_imp->m_tokenizer.setBuffer(text); clearPointerContainer(m_imp->m_nodeStack); @@ -264,7 +264,7 @@ Calculator *Parser::parse(string text) //------------------------------------------------------------------- -Parser::SyntaxStatus Parser::checkSyntax(std::vector &tokens, string text) +Parser::SyntaxStatus Parser::checkSyntax(std::vector &tokens, std::string text) { m_imp->m_tokenizer.setBuffer(text); if (m_imp->m_tokenizer.eos()) @@ -298,7 +298,7 @@ Parser::SyntaxStatus Parser::checkSyntax(std::vector &tokens, strin //------------------------------------------------------------------- -void Parser::getSuggestions(Grammar::Suggestions &suggestions, string text) +void Parser::getSuggestions(Grammar::Suggestions &suggestions, std::string text) { std::vector tokens; Parser::SyntaxStatus status = checkSyntax(tokens, text); @@ -309,7 +309,7 @@ void Parser::getSuggestions(Grammar::Suggestions &suggestions, string text) //------------------------------------------------------------------- -string Parser::getCurrentPatternString(string text) +std::string Parser::getCurrentPatternString(std::string text) { return "ohime"; } @@ -323,14 +323,14 @@ bool Parser::isValid() const //------------------------------------------------------------------- -string Parser::getText() const +std::string Parser::getText() const { return m_imp->m_tokenizer.getBuffer(); } //------------------------------------------------------------------- -string Parser::getError() const +std::string Parser::getError() const { return m_imp->m_errorString; } diff --git a/toonz/sources/common/expressions/ttokenizer.cpp b/toonz/sources/common/expressions/ttokenizer.cpp index ae21312..a8bac29 100644 --- a/toonz/sources/common/expressions/ttokenizer.cpp +++ b/toonz/sources/common/expressions/ttokenizer.cpp @@ -25,7 +25,7 @@ Tokenizer::Tokenizer() //------------------------------------------------------------------- -Tokenizer::Tokenizer(string buffer) +Tokenizer::Tokenizer(std::string buffer) : m_buffer(), m_index(0) { setBuffer(buffer); @@ -39,7 +39,7 @@ Tokenizer::~Tokenizer() //------------------------------------------------------------------- -void Tokenizer::setBuffer(string buffer) +void Tokenizer::setBuffer(std::string buffer) { m_buffer = buffer + '\0'; m_index = 0; @@ -68,11 +68,11 @@ void Tokenizer::setBuffer(string buffer) continue; } - string token; + std::string token; if (stringBlock) { // string block - read mercilessly until either another '"' or EOS - token = string(1, s[i++]); + token = std::string(1, s[i++]); while (s[i] != '"' && s[i] != '\0') token.append(1, s[i++]); @@ -80,7 +80,7 @@ void Tokenizer::setBuffer(string buffer) m_tokens.push_back(Token(token, Token::Ident, j)); } else if (isascii(s[i]) && isalpha(s[i]) || s[i] == '_') { // ident - token = string(1, s[i++]); + token = std::string(1, s[i++]); while (isascii(s[i]) && (isalpha(s[i]) || s[i] == '_' || isdigit(s[i]))) token.append(1, s[i++]); @@ -114,18 +114,18 @@ void Tokenizer::setBuffer(string buffer) } else { // punct. if (s[i + 1] != '\0') { - token = string(s + i, 2); + token = std::string(s + i, 2); - const string ss[] = { + const std::string ss[] = { "==", "!=", ">=", "<=", "||", "&&"}; const int m = tArrayCount(ss); if (std::find(ss, ss + m, token) != ss + m) i += 2; else - token = string(1, s[i++]); + token = std::string(1, s[i++]); } else - token = string(1, s[i++]); + token = std::string(1, s[i++]); m_tokens.push_back(Token(token, Token::Punct, j)); } diff --git a/toonz/sources/common/psdlib/psd.cpp b/toonz/sources/common/psdlib/psd.cpp index 765ce54..0407bc9 100644 --- a/toonz/sources/common/psdlib/psd.cpp +++ b/toonz/sources/common/psdlib/psd.cpp @@ -1235,11 +1235,11 @@ int TPSDParser::getLevelIndexById(int layerId) throw TImageException(m_path, "Layer ID not exists"); return layerIndex; } -int TPSDParser::getLevelIdByName(string levelName) +int TPSDParser::getLevelIdByName(std::string levelName) { int pos = levelName.find_last_of(LEVEL_NAME_INDEX_SEP); int counter = 0; - if (pos != string::npos) { + if (pos != std::string::npos) { counter = atoi(levelName.substr(pos + 1).c_str()); levelName = levelName.substr(0, pos); } @@ -1265,15 +1265,15 @@ int TPSDParser::getFramesCount(int levelId) assert(levelIndex >= 0 && levelIndex < (int)m_levels.size()); return m_levels[levelIndex].getFrameCount(); } -string TPSDParser::getLevelName(int levelId) +std::string TPSDParser::getLevelName(int levelId) { int levelIndex = getLevelIndexById(levelId); assert(levelIndex >= 0 && levelIndex < (int)m_levels.size()); return m_levels[levelIndex].getName(); } -string TPSDParser::getLevelNameWithCounter(int levelId) +std::string TPSDParser::getLevelNameWithCounter(int levelId) { - string levelName = getLevelName(levelId); + std::string levelName = getLevelName(levelId); int count = 0; for (int i = 0; i < (int)m_levels.size(); i++) { if (m_levels[i].getName() == levelName) { @@ -1285,7 +1285,7 @@ string TPSDParser::getLevelNameWithCounter(int levelId) } if (count > 0) { levelName.append(LEVEL_NAME_INDEX_SEP); - string c = QString::number(count).toStdString(); + std::string c = QString::number(count).toStdString(); levelName.append(c); } return levelName; diff --git a/toonz/sources/common/psdlib/psd.h b/toonz/sources/common/psdlib/psd.h index 1538cbe..13ab5a3 100644 --- a/toonz/sources/common/psdlib/psd.h +++ b/toonz/sources/common/psdlib/psd.h @@ -180,7 +180,7 @@ public: TRect getRegion() { return m_region; } private: - map m_layersSavebox; + std::map m_layersSavebox; bool doInfo(); bool doHeaderInfo(); @@ -211,16 +211,16 @@ class DVAPI TPSDParser class Level { public: - Level(string nm = "Unknown", int lid = 0, bool is_folder = false) : name(nm), + Level(std::string nm = "Unknown", int lid = 0, bool is_folder = false) : name(nm), layerId(lid), folder(is_folder) { } void addFrame(int layerId, bool isFolder = false) { framesId.push_back(Frame(layerId, isFolder)); } int getFrameCount() { return (int)framesId.size(); } - string getName() { return name; } + std::string getName() { return name; } int getLayerId() { return layerId; } - void setName(string nname) { name = nname; } + void setName(std::string nname) { name = nname; } void setLayerId(int nlayerId) { layerId = nlayerId; } int getFrameId(int index) { @@ -244,7 +244,7 @@ class DVAPI TPSDParser } }; - string name; // psd name + std::string name; // psd name int layerId; // psd layer id std::vector framesId; // array of layer ID as frame bool folder; @@ -283,7 +283,7 @@ public: } int getLevelIndexById(int levelId); // Returns layerID by name. Note that the layer name is not unique, so it return the first layer id found. - int getLevelIdByName(string levelName); + int getLevelIdByName(std::string levelName); int getFrameId(int layerId, int frameIndex) { return m_levels[getLevelIndexById(layerId)].getFrameId(frameIndex); } int getFramesCount(int levelId); bool isSubFolder(int levelIndex, int frameIndex) @@ -291,11 +291,11 @@ public: assert(levelIndex >= 0 && levelIndex < (int)m_levels.size()); return m_levels[levelIndex].isSubFolder(frameIndex); } - string getLevelName(int levelId); + std::string getLevelName(int levelId); // Returns level name. // If there are 2 or more level with the same name then // returns levelname, levelname__2, etc - string getLevelNameWithCounter(int levelId); + std::string getLevelNameWithCounter(int levelId); private: void doLevels(); // do m_levels diff --git a/toonz/sources/common/tapptools/tcli.cpp b/toonz/sources/common/tapptools/tcli.cpp index a632e9e..73d7569 100644 --- a/toonz/sources/common/tapptools/tcli.cpp +++ b/toonz/sources/common/tapptools/tcli.cpp @@ -47,7 +47,7 @@ void printLibRelease(ostream &out) class SpecialUsageElement : public UsageElement { public: - SpecialUsageElement(string name) : UsageElement(name, " "){}; + SpecialUsageElement(std::string name) : UsageElement(name, " "){}; void dumpValue(ostream &) const {}; void resetValue(){}; }; @@ -322,11 +322,11 @@ class TCli::UsageImp { string m_progName; vector m_usageLines; - std::map m_qtable; + std::map m_qtable; vector m_qlist; vector m_args; - typedef std::map::iterator qiterator; - typedef std::map::const_iterator const_qiterator; + typedef std::map::iterator qiterator; + typedef std::map::const_iterator const_qiterator; UsageLine *m_selectedUsageLine; @@ -439,7 +439,7 @@ void UsageImp::registerQualifier(Qualifier *q) if (s == s0 + 1) { assert(!"Empty qualifier name"); } - string name(s0, s - s0); + std::string name(s0, s - s0); registerQualifier(name, q); while (*s == ' ') s++; @@ -492,7 +492,7 @@ void UsageImp::printUsageLine(ostream &out, const UsageLine &ul) const //--------------------------------------------------------- -void UsageImp::printUsageLines(ostream &out) const +void UsageImp::printUsageLines(std::ostream &out) const { bool first = true; for (unsigned int i = 0; i < m_usageLines.size(); i++) { @@ -512,7 +512,7 @@ void UsageImp::printUsageLines(ostream &out) const //--------------------------------------------------------- -void UsageImp::print(ostream &out) const +void UsageImp::print(std::ostream &out) const { printUsageLines(out); out << endl; @@ -748,7 +748,7 @@ void UsageImp::getArgCountRange(const UsageLine &ul, int a, int b, //--------------------------------------------------------- -void UsageImp::dumpValues(ostream &out) const +void UsageImp::dumpValues(std::ostream &out) const { if (m_selectedUsageLine == 0) return; @@ -794,12 +794,12 @@ void Usage::add(const UsageLine &ul) m_imp->add(ul); } -void Usage::print(ostream &out) const +void Usage::print(std::ostream &out) const { m_imp->print(out); } -void Usage::dumpValues(ostream &out) const +void Usage::dumpValues(std::ostream &out) const { m_imp->dumpValues(out); } @@ -809,7 +809,7 @@ void Usage::clear() m_imp->clear(); } -bool Usage::parse(const char *argvString, ostream &err) +bool Usage::parse(const char *argvString, std::ostream &err) { string s = string(argvString); std::vector argv; @@ -827,7 +827,7 @@ bool Usage::parse(const char *argvString, ostream &err) return parse(argv.size(), &argv[0], err); } -bool Usage::parse(int argc, char *argv[], ostream &err) +bool Usage::parse(int argc, char *argv[], std::ostream &err) { try { m_imp->parse(argc, argv); @@ -882,14 +882,14 @@ void RangeQualifier::fetch(int index, int &argc, char *argv[]) } } -ostream &operator<<(ostream &out, const RangeQualifier &range) +std::ostream &operator<<(std::ostream &out, const RangeQualifier &range) { return out << "[" << range.getFrom() << ", " << range.getTo() << "]"; } //--------------------------------------------------------- -void RangeQualifier::dumpValue(ostream &out) const +void RangeQualifier::dumpValue(std::ostream &out) const { out << m_name << " = "; if (m_from <= m_to) diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp index c380469..4ed2654 100644 --- a/toonz/sources/common/tapptools/tenv.cpp +++ b/toonz/sources/common/tapptools/tenv.cpp @@ -45,12 +45,12 @@ namespace class EnvGlobals { // singleton - string m_applicationName; - string m_applicationVersion; - string m_applicationFullName; - string m_moduleName; - string m_rootVarName; - string m_systemVarPrefix; + std::string m_applicationName; + std::string m_applicationVersion; + std::string m_applicationFullName; + std::string m_moduleName; + std::string m_rootVarName; + std::string m_systemVarPrefix; TFilePath m_registryRoot; TFilePath m_envFile; TFilePath *m_stuffDir; @@ -67,7 +67,7 @@ public: return &_instance; } - TFilePath getSystemVarPath(string varName) + TFilePath getSystemVarPath(std::string varName) { #ifdef _WIN32 return m_registryRoot + varName; @@ -88,7 +88,7 @@ public: return getSystemVarPath(m_rootVarName); } - string getSystemVarValue(string varName) + std::string getSystemVarValue(std::string varName) { #ifdef _WIN32 return TSystem::getSystemValue(getSystemVarPath(varName)).toStdString(); @@ -139,7 +139,7 @@ public: m_envFile = profilesDir + "env" + (TSystem::getUserName().toStdString() + ".env"); } - void setApplication(string applicationName, string applicationVersion) + void setApplication(std::string applicationName, std::string applicationVersion) { m_applicationName = applicationName; m_applicationVersion = applicationVersion; @@ -153,35 +153,35 @@ public: updateEnvFile(); } - string getApplicationName() { return m_applicationName; } - string getApplicationVersion() { return m_applicationVersion; } + std::string getApplicationName() { return m_applicationName; } + std::string getApplicationVersion() { return m_applicationVersion; } TFilePath getEnvFile() { return m_envFile; } - void setApplicationFullName(string applicationFullName) + void setApplicationFullName(std::string applicationFullName) { m_applicationFullName = applicationFullName; } - string getApplicationFullName() { return m_applicationFullName; } + std::string getApplicationFullName() { return m_applicationFullName; } - void setModuleName(string moduleName) { m_moduleName = moduleName; } - string getModuleName() { return m_moduleName; } + void setModuleName(std::string moduleName) { m_moduleName = moduleName; } + std::string getModuleName() { return m_moduleName; } - void setRootVarName(string varName) + void setRootVarName(std::string varName) { m_rootVarName = varName; updateEnvFile(); } - string getRootVarName() + std::string getRootVarName() { return m_rootVarName; } - void setSystemVarPrefix(string prefix) + void setSystemVarPrefix(std::string prefix) { m_systemVarPrefix = prefix; } - string getSystemVarPrefix() { return m_systemVarPrefix; } + std::string getSystemVarPrefix() { return m_systemVarPrefix; } void setDllRelativeDir(const TFilePath &dllRelativeDir) { @@ -228,11 +228,11 @@ void EnvGlobals::setSystemPath(int id, const TFilePath &fp) class Variable::Imp { public: - string m_name; - string m_value; + std::string m_name; + std::string m_value; bool m_loaded, m_defaultDefined, m_assigned; - Imp(string name) + Imp(std::string name) : m_name(name), m_value(""), m_loaded(false), m_defaultDefined(false), m_assigned(false) {} }; @@ -248,7 +248,7 @@ namespace class VariableSet { - std::map m_variables; + std::map m_variables; bool m_loaded; public: @@ -256,7 +256,7 @@ public: ~VariableSet() { - std::map::iterator it; + std::map::iterator it; for (it = m_variables.begin(); it != m_variables.end(); ++it) delete it->second; } @@ -267,9 +267,9 @@ public: return &instance; } - Variable::Imp *getImp(string name) + Variable::Imp *getImp(std::string name) { - std::map::iterator it; + std::map::iterator it; it = m_variables.find(name); if (it == m_variables.end()) { Variable::Imp *imp = new Variable::Imp(name); @@ -320,7 +320,7 @@ void VariableSet::load() char *t = s; while ('a' <= *s && *s <= 'z' || 'A' <= *s && *s <= 'Z' || '0' <= *s && *s <= '9' || *s == '_') s++; - string name(t, s - t); + std::string name(t, s - t); if (name.size() == 0) continue; while (*s == ' ') @@ -328,7 +328,7 @@ void VariableSet::load() if (*s != '\"') continue; s++; - string value; + std::string value; while (*s != '\n' && *s != '\0' && *s != '\"') { if (*s != '\\') value.push_back(*s); @@ -369,10 +369,10 @@ void VariableSet::save() Tofstream os(fp); if (!os) return; - std::map::iterator it; + std::map::iterator it; for (it = m_variables.begin(); it != m_variables.end(); ++it) { os << it->first << " \""; - string s = it->second->m_value; + std::string s = it->second->m_value; for (int i = 0; i < (int)s.size(); i++) if (s[i] == '\"') os << "\\\""; @@ -392,14 +392,14 @@ void VariableSet::save() //========================================================= -Variable::Variable(string name) +Variable::Variable(std::string name) : m_imp(VariableSet::instance()->getImp(name)) { } //------------------------------------------------------------------- -Variable::Variable(string name, string defaultValue) +Variable::Variable(std::string name, std::string defaultValue) : m_imp(VariableSet::instance()->getImp(name)) { //assert(!m_imp->m_defaultDefined); @@ -416,14 +416,14 @@ Variable::~Variable() //------------------------------------------------------------------- -string Variable::getName() const +std::string Variable::getName() const { return m_imp->m_name; } //------------------------------------------------------------------- -string Variable::getValue() const +std::string Variable::getValue() const { VariableSet::instance()->loadIfNeeded(); return m_imp->m_value; @@ -431,7 +431,7 @@ string Variable::getValue() const //------------------------------------------------------------------- -void Variable::assignValue(string value) +void Variable::assignValue(std::string value) { VariableSet *vs = VariableSet::instance(); vs->loadIfNeeded(); @@ -444,7 +444,7 @@ void Variable::assignValue(string value) //=================================================================== -void TEnv::setApplication(string applicationName, string applicationVersion) +void TEnv::setApplication(std::string applicationName, std::string applicationVersion) { EnvGlobals::instance()->setApplication(applicationName, applicationVersion); @@ -453,42 +453,42 @@ void TEnv::setApplication(string applicationName, string applicationVersion) #endif } -string TEnv::getApplicationName() +std::string TEnv::getApplicationName() { return EnvGlobals::instance()->getApplicationName(); } -string TEnv::getApplicationVersion() +std::string TEnv::getApplicationVersion() { return EnvGlobals::instance()->getApplicationVersion(); } -void TEnv::setApplicationFullName(string applicationFullName) +void TEnv::setApplicationFullName(std::string applicationFullName) { EnvGlobals::instance()->setApplicationFullName(applicationFullName); } -string TEnv::getApplicationFullName() +std::string TEnv::getApplicationFullName() { return EnvGlobals::instance()->getApplicationFullName(); } -void TEnv::setModuleName(string moduleName) +void TEnv::setModuleName(std::string moduleName) { EnvGlobals::instance()->setModuleName(moduleName); } -string TEnv::getModuleName() +std::string TEnv::getModuleName() { return EnvGlobals::instance()->getModuleName(); } -void TEnv::setRootVarName(string varName) +void TEnv::setRootVarName(std::string varName) { EnvGlobals::instance()->setRootVarName(varName); } -string TEnv::getRootVarName() +std::string TEnv::getRootVarName() { return EnvGlobals::instance()->getRootVarName(); } @@ -498,26 +498,26 @@ TFilePath TEnv::getRootVarPath() return EnvGlobals::instance()->getRootVarPath(); } -string TEnv::getSystemVarStringValue(string varName) +std::string TEnv::getSystemVarStringValue(std::string varName) { return EnvGlobals::instance()->getSystemVarValue(varName); } -TFilePath TEnv::getSystemVarPathValue(string varName) +TFilePath TEnv::getSystemVarPathValue(std::string varName) { EnvGlobals *eg = EnvGlobals::instance(); return TFilePath(eg->getSystemVarValue(varName)); } -TFilePathSet TEnv::getSystemVarPathSetValue(string varName) +TFilePathSet TEnv::getSystemVarPathSetValue(std::string varName) { TFilePathSet lst; - string value = EnvGlobals::instance()->getSystemVarValue(varName); + std::string value = EnvGlobals::instance()->getSystemVarValue(varName); int len = (int)value.size(); int i = 0; int j = value.find(';'); - while (j != string::npos) { - string s = value.substr(i, j - i); + while (j != std::string::npos) { + std::string s = value.substr(i, j - i); lst.push_back(TFilePath(s)); i = j + 1; if (i >= len) @@ -529,12 +529,12 @@ TFilePathSet TEnv::getSystemVarPathSetValue(string varName) return lst; } -void TEnv::setSystemVarPrefix(string varName) +void TEnv::setSystemVarPrefix(std::string varName) { EnvGlobals::instance()->setSystemVarPrefix(varName); } -string TEnv::getSystemVarPrefix() +std::string TEnv::getSystemVarPrefix() { return EnvGlobals::instance()->getSystemVarPrefix(); } @@ -608,49 +608,48 @@ TFilePath TEnv::getSystemPath(SystemFileId id) namespace { -istream &operator>>(istream &is, TFilePath &path) +std::istream &operator>>(std::istream &is, TFilePath &path) { - string s; + std::string s; is >> s; - //path = TFilePath(s); return is; } -istream &operator>>(istream &is, TRect &rect) +std::istream &operator>>(std::istream &is, TRect &rect) { return is >> rect.x0 >> rect.y0 >> rect.x1 >> rect.y1; } template -string toString2(T value) +std::string toString2(T value) { - ostrstream ss; + std::ostrstream ss; ss << value << '\0'; - string s(ss.str()); + std::string s(ss.str()); ss.freeze(false); return s; } template <> -string toString2(TRect value) +std::string toString2(TRect value) { - ostrstream ss; + std::ostrstream ss; ss << value.x0 << " " << value.y0 << " " << value.x1 << " " << value.y1 << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } template -void fromString(string s, T &value) +void fromString(std::string s, T &value) { if (s.empty()) return; - istrstream is(s.c_str(), s.size()); + std::istrstream is(s.c_str(), s.size()); is >> value; } -void fromString(string s, string &value) +void fromString(std::string s, std::string &value) { value = s; } @@ -659,8 +658,8 @@ void fromString(string s, string &value) //------------------------------------------------------------------- -IntVar::IntVar(string name, int defValue) : Variable(name, toString(defValue)) {} -IntVar::IntVar(string name) : Variable(name) {} +IntVar::IntVar(std::string name, int defValue) : Variable(name, toString(defValue)) {} +IntVar::IntVar(std::string name) : Variable(name) {} IntVar::operator int() const { int v; @@ -671,8 +670,8 @@ void IntVar::operator=(int v) { assignValue(toString(v)); } //------------------------------------------------------------------- -DoubleVar::DoubleVar(string name, double defValue) : Variable(name, toString(defValue)) {} -DoubleVar::DoubleVar(string name) : Variable(name) {} +DoubleVar::DoubleVar(std::string name, double defValue) : Variable(name, toString(defValue)) {} +DoubleVar::DoubleVar(std::string name) : Variable(name) {} DoubleVar::operator double() const { double v; @@ -683,23 +682,23 @@ void DoubleVar::operator=(double v) { assignValue(toString(v)); } //------------------------------------------------------------------- -StringVar::StringVar(string name, const string &defValue) : Variable(name, defValue) {} -StringVar::StringVar(string name) : Variable(name) {} -StringVar::operator string() const +StringVar::StringVar(std::string name, const std::string &defValue) : Variable(name, defValue) {} +StringVar::StringVar(std::string name) : Variable(name) {} +StringVar::operator std::string() const { - string v; + std::string v; fromString(getValue(), v); return v; } -void StringVar::operator=(const string &v) { assignValue(v); } +void StringVar::operator=(const std::string &v) { assignValue(v); } //------------------------------------------------------------------- -FilePathVar::FilePathVar(string name, const TFilePath &defValue) : Variable(name, toString(defValue)) {} -FilePathVar::FilePathVar(string name) : Variable(name) {} +FilePathVar::FilePathVar(std::string name, const TFilePath &defValue) : Variable(name, toString(defValue)) {} +FilePathVar::FilePathVar(std::string name) : Variable(name) {} FilePathVar::operator TFilePath() const { - string v; + std::string v; fromString(getValue(), v); return TFilePath(v); } @@ -707,8 +706,8 @@ void FilePathVar::operator=(const TFilePath &v) { assignValue(toString(v)); } //------------------------------------------------------------------- -RectVar::RectVar(string name, const TRect &defValue) : Variable(name, toString2(defValue)) {} -RectVar::RectVar(string name) : Variable(name) {} +RectVar::RectVar(std::string name, const TRect &defValue) : Variable(name, toString2(defValue)) {} +RectVar::RectVar(std::string name) : Variable(name) {} RectVar::operator TRect() const { TRect v; diff --git a/toonz/sources/common/tapptools/ttimer.cpp b/toonz/sources/common/tapptools/ttimer.cpp index 7482052..60a398c 100644 --- a/toonz/sources/common/tapptools/ttimer.cpp +++ b/toonz/sources/common/tapptools/ttimer.cpp @@ -25,7 +25,7 @@ void CALLBACK ElapsedTimeCB(UINT uID, UINT uMsg, class TTimer::Imp { public: - Imp(string name, UINT timerRes, TTimer::Type type, TTimer *timer); + Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer); ~Imp(); void start(UINT delay) @@ -52,11 +52,11 @@ public: m_started = false; } - string getName() { return m_name; } + std::string getName() { return m_name; } TUINT64 getTicks() { return m_ticks; } UINT getDelay() { return m_delay; } - string m_name; + std::string m_name; UINT m_timerRes; UINT m_type; @@ -72,7 +72,7 @@ public: //------------------------------------------------------------------------------ -TTimer::Imp::Imp(string name, UINT timerRes, TTimer::Type type, TTimer *timer) +TTimer::Imp::Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) : m_name(name), m_timerRes(timerRes), m_timer(timer), m_type(type), m_timerID(NULL), m_ticks(0), m_delay(0), m_started(false), m_action(0) { @@ -139,7 +139,7 @@ Uint32 ElapsedTimeCB(Uint32 interval, void *param); class TTimer::Imp { public: - Imp(string name, UINT timerRes, TTimer::Type type, TTimer *timer) + Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) : m_action(0), m_ticks(0) { } @@ -160,11 +160,11 @@ public: SDL_RemoveTimer(m_timerID); } - string getName() { return m_name; } + std::string getName() { return m_name; } TUINT64 getTicks() { return m_ticks; } UINT getDelay() { return m_delay; } - string m_name; + std::string m_name; UINT m_timerRes; UINT m_type; @@ -210,7 +210,7 @@ Uint32 ElapsedTimeCB(Uint32 interval, void *param) class TTimer::Imp { public: - Imp(string name, UINT timerRes, TTimer::Type type, TTimer *timer) + Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) : m_action(0) {} ~Imp() {} @@ -227,11 +227,11 @@ public: m_started = false; } - string getName() { return m_name; } + std::string getName() { return m_name; } TUINT64 getTicks() { return m_ticks; } UINT getDelay() { return m_delay; } - string m_name; + std::string m_name; UINT m_timerRes; UINT m_type; @@ -248,7 +248,7 @@ public: class TTimer::Imp { public: - Imp(string name, UINT timerRes, TTimer::Type type, TTimer *timer) + Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) : m_action(0) {} ~Imp() {} @@ -265,11 +265,11 @@ public: m_started = false; } - string getName() { return m_name; } + std::string getName() { return m_name; } TUINT64 getTicks() { return m_ticks; } UINT getDelay() { return m_delay; } - string m_name; + std::string m_name; UINT m_timerRes; UINT m_type; @@ -291,7 +291,7 @@ public: // //=============================================================================== -TTimer::TTimer(const string &name, UINT timerRes, Type type) +TTimer::TTimer(const std::string &name, UINT timerRes, Type type) : m_imp(new TTimer::Imp(name, timerRes, type, this)) { } @@ -325,7 +325,7 @@ void TTimer::stop() //-------------------------------------------------------------------------------- -string TTimer::getName() const +std::string TTimer::getName() const { return m_imp->getName(); } diff --git a/toonz/sources/common/tcache/timagecache.cpp b/toonz/sources/common/tcache/timagecache.cpp index 2ff378f..f01c423 100644 --- a/toonz/sources/common/tcache/timagecache.cpp +++ b/toonz/sources/common/tcache/timagecache.cpp @@ -116,7 +116,7 @@ public: bool m_cantCompress; ImageBuilder *m_builder; ImageInfo *m_imageInfo; - string m_id; + std::string m_id; TUINT32 m_historyCount; bool m_modified; }; @@ -165,7 +165,7 @@ public: ImageInfo *clone(); double m_dpix, m_dpiy; - string m_name; + std::string m_name; TRect m_savebox; bool m_isOpaque; TPoint m_offset; @@ -226,7 +226,7 @@ public: void setInfo(const TToonzImageP &ti); double m_dpix, m_dpiy; - string m_name; + std::string m_name; TRect m_savebox; TPoint m_offset; int m_subs; @@ -718,7 +718,7 @@ TImageP UncompressedOnDiskCacheItem::getImage() const //------------------------------------------------------------------------------ -string TImageCache::getUniqueId(void) +std::string TImageCache::getUniqueId(void) { static TAtomicVar count; std::stringstream ss; @@ -757,13 +757,13 @@ public: } void doCompress(); - void doCompress(string id); + void doCompress(std::string id); UCHAR *compressAndMalloc(TUINT32 requestedSize); // compress in the cache till it can nallocate the requested memory - void outputMap(UINT chunkRequested, string filename); - void remove(const string &id); - void remap(const string &dstId, const string &srcId); - TImageP get(const string &id, bool toBeModified); - void add(const string &id, const TImageP &img, bool overwrite); + void outputMap(UINT chunkRequested, std::string filename); + void remove(const std::string &id); + void remap(const std::string &dstId, const std::string &srcId); + TImageP get(const std::string &id, bool toBeModified); + void add(const std::string &id, const TImageP &img, bool overwrite); TFilePath m_rootDir; #ifndef TNZCORE_LIGHT @@ -772,11 +772,11 @@ public: bool m_isEnabled; #endif - map m_uncompressedItems; - map m_itemHistory; - map m_compressedItems; - map m_itemsByImagePointer; //items ordered by ImageP.getPointer() - map m_duplicatedItems; //for duplicated items (when id1!=id2 but image1==image2) in the map: key is dup id, value is main id + std::map m_uncompressedItems; + std::map m_itemHistory; + std::map m_compressedItems; + std::map m_itemsByImagePointer; //items ordered by ImageP.getPointer() + std::map m_duplicatedItems; //for duplicated items (when id1!=id2 but image1==image2) in the map: key is dup id, value is main id //memoria fisica totale della macchina che non puo' essere utilizzata; TINT64 m_reservedMemory; TThread::Mutex m_mutex; @@ -839,10 +839,10 @@ void TImageCache::Imp::doCompress() TThread::MutexLocker sl(&m_mutex); - std::map::iterator itu = m_itemHistory.begin(); + std::map::iterator itu = m_itemHistory.begin(); for (; itu != m_itemHistory.end() && notEnoughMemory();) { - std::map::iterator it = m_uncompressedItems.find(itu->second); + std::map::iterator it = m_uncompressedItems.find(itu->second); assert(it != m_uncompressedItems.end()); CacheItemP item = it->second; @@ -852,7 +852,7 @@ void TImageCache::Imp::doCompress() ++itu; continue; } - string id = it->first; + std::string id = it->first; #ifdef _WIN32 assert(itu->first == it->second->m_historyCount); @@ -860,7 +860,7 @@ void TImageCache::Imp::doCompress() m_itemsByImagePointer.erase(getPointer(item->getImage())); m_uncompressedItems.erase(it); #else - std::map::iterator itu2 = itu; + std::map::iterator itu2 = itu; itu++; m_itemHistory.erase(itu2); m_itemsByImagePointer.erase(item->getImage().getPointer()); @@ -893,7 +893,7 @@ void TImageCache::Imp::doCompress() if (itu != m_itemHistory.end()) //memory is enough! return; - std::map::iterator itc = m_compressedItems.begin(); + std::map::iterator itc = m_compressedItems.begin(); for (; itc != m_compressedItems.end() && notEnoughMemory(); ++itc) { CacheItemP item = itc->second; if (item->m_cantCompress) @@ -915,12 +915,12 @@ void TImageCache::Imp::doCompress() //------------------------------------------------------------------------------ -void TImageCache::Imp::doCompress(string id) +void TImageCache::Imp::doCompress(std::string id) { TThread::MutexLocker sl(&m_mutex); // search id in m_uncompressedItems - std::map::iterator it = m_uncompressedItems.find(id); + std::map::iterator it = m_uncompressedItems.find(id); if (it == m_uncompressedItems.end()) return; // id not found: return @@ -932,7 +932,7 @@ void TImageCache::Imp::doCompress(string id) return; // search id in m_itemHistory - std::map::iterator itu = m_itemHistory.begin(); + std::map::iterator itu = m_itemHistory.begin(); while (itu != m_itemHistory.end() && itu->second != id) ++itu; if (itu == m_itemHistory.end()) @@ -944,7 +944,7 @@ void TImageCache::Imp::doCompress(string id) itu = m_itemHistory.erase(itu); m_itemsByImagePointer.erase(getPointer(item->getImage())); #else - std::map::iterator itu2 = itu; + std::map::iterator itu2 = itu; itu++; m_itemHistory.erase(itu2); m_itemsByImagePointer.erase(item->getImage().getPointer()); @@ -979,7 +979,7 @@ void TImageCache::Imp::doCompress(string id) if (itu != m_itemHistory.end()) //memory is enough! return; - std::map::iterator itc = m_compressedItems.begin(); + std::map::iterator itc = m_compressedItems.begin(); for ( ; itc != m_compressedItems.end() && notEnoughMemory(); ++itc) { CacheItemP item = itc->second; @@ -1016,11 +1016,11 @@ UCHAR *TImageCache::Imp::compressAndMalloc(TUINT32 size) //assert(size==0 || TBigMemoryManager::instance()->isActive()); - std::map::iterator itu = m_itemHistory.begin(); + std::map::iterator itu = m_itemHistory.begin(); while ((buf = TBigMemoryManager::instance()->getBuffer(size)) == 0 && itu != m_itemHistory.end()) //>TBigMemoryManager::instance()->getAvailableMemoryinKb())) { - std::map::iterator it = m_uncompressedItems.find(itu->second); + std::map::iterator it = m_uncompressedItems.find(itu->second); assert(it != m_uncompressedItems.end()); CacheItemP item = it->second; @@ -1050,7 +1050,7 @@ UCHAR *TImageCache::Imp::compressAndMalloc(TUINT32 size) m_itemsByImagePointer.erase(getPointer(item->getImage())); m_uncompressedItems.erase(it); #else - std::map::iterator itu2 = itu; + std::map::iterator itu2 = itu; itu++; m_itemHistory.erase(itu2); m_itemsByImagePointer.erase(item->getImage().getPointer()); @@ -1061,7 +1061,7 @@ UCHAR *TImageCache::Imp::compressAndMalloc(TUINT32 size) if (buf != 0) return buf; - std::map::iterator itc = m_compressedItems.begin(); + std::map::iterator itc = m_compressedItems.begin(); for (; itc != m_compressedItems.end() && (buf = TBigMemoryManager::instance()->getBuffer(size)) == 0; ++itc) { @@ -1197,7 +1197,7 @@ UCHAR *TImageCache::compressAndMalloc(TUINT32 requestedSize) //------------------------------------------------------------------------------ -void TImageCache::add(const string &id, const TImageP &img, bool overwrite) +void TImageCache::add(const std::string &id, const TImageP &img, bool overwrite) { if (!isEnabled()) return; @@ -1206,13 +1206,13 @@ void TImageCache::add(const string &id, const TImageP &img, bool overwrite) //------------------------------------------------------------------------------ -void TImageCache::Imp::add(const string &id, const TImageP &img, bool overwrite) +void TImageCache::Imp::add(const std::string &id, const TImageP &img, bool overwrite) { TThread::MutexLocker sl(&m_mutex); #ifdef LEVO - std::map::iterator it1 = m_uncompressedItems.begin(); + std::map::iterator it1 = m_uncompressedItems.begin(); for (; it1 != m_uncompressedItems.end(); ++it1) { UncompressedOnMemoryCacheItemP item = (UncompressedOnMemoryCacheItemP)it1->second; @@ -1224,8 +1224,8 @@ void TImageCache::Imp::add(const string &id, const TImageP &img, bool overwrite) } #endif - std::map::iterator itUncompr = m_uncompressedItems.find(id); - std::map::iterator itCompr = m_compressedItems.find(id); + std::map::iterator itUncompr = m_uncompressedItems.find(id); + std::map::iterator itCompr = m_compressedItems.find(id); #ifdef _DEBUGTOONZ TRasterImageP rimg = (TRasterImageP)img; @@ -1242,7 +1242,7 @@ void TImageCache::Imp::add(const string &id, const TImageP &img, bool overwrite) else if (timg) timg->getRaster()->m_cashed = true; #endif - std::map::iterator it; + std::map::iterator it; if (itUncompr != m_uncompressedItems.end()) { assert(m_itemHistory.find(itUncompr->second->m_historyCount) != m_itemHistory.end()); @@ -1255,11 +1255,11 @@ void TImageCache::Imp::add(const string &id, const TImageP &img, bool overwrite) } else return; } else { - std::map::iterator dt = m_duplicatedItems.find(id); + std::map::iterator dt = m_duplicatedItems.find(id); if ((dt != m_duplicatedItems.end()) && !overwrite) return; - std::map::iterator it; + std::map::iterator it; if ((it = m_itemsByImagePointer.find(getPointer(img))) != m_itemsByImagePointer.end()) //already present in cache with another id... { m_duplicatedItems[id] = it->second; @@ -1300,14 +1300,14 @@ void TImageCache::Imp::add(const string &id, const TImageP &img, bool overwrite) #endif } -void TImageCache::remove(const string &id) +void TImageCache::remove(const std::string &id) { m_imp->remove(id); } //------------------------------------------------------------------------------ -void TImageCache::Imp::remove(const string &id) +void TImageCache::Imp::remove(const std::string &id) { if (CacheInstance == 0) return; //the remove can be called when exiting from toonz...after the imagecache was already freed! @@ -1315,7 +1315,7 @@ void TImageCache::Imp::remove(const string &id) assert(check == magic); TThread::MutexLocker sl(&m_mutex); - std::map::iterator it1; + std::map::iterator it1; if ((it1 = m_duplicatedItems.find(id)) != m_duplicatedItems.end()) //it's a duplicated id... { m_duplicatedItems.erase(it1); @@ -1328,14 +1328,14 @@ void TImageCache::Imp::remove(const string &id) if (it1 != m_duplicatedItems.end()) //it has duplicated, so cannot erase it; I erase the duplicate, and assign its id has the main id { - string sonId = it1->first; + std::string sonId = it1->first; m_duplicatedItems.erase(it1); remap(sonId, id); return; } - std::map::iterator it = m_uncompressedItems.find(id); - std::map::iterator itc = m_compressedItems.find(id); + std::map::iterator it = m_uncompressedItems.find(id); + std::map::iterator itc = m_compressedItems.find(id); if (it != m_uncompressedItems.end()) { const CacheItemP &item = it->second; assert((UncompressedOnMemoryCacheItemP)item); @@ -1358,16 +1358,16 @@ void TImageCache::Imp::remove(const string &id) //------------------------------------------------------------------------------ -void TImageCache::remap(const string &dstId, const string &srcId) +void TImageCache::remap(const std::string &dstId, const std::string &srcId) { m_imp->remap(dstId, srcId); } -void TImageCache::Imp::remap(const string &dstId, const string &srcId) +void TImageCache::Imp::remap(const std::string &dstId, const std::string &srcId) { TThread::MutexLocker sl(&m_mutex); - std::map::iterator it = m_uncompressedItems.find(srcId); + std::map::iterator it = m_uncompressedItems.find(srcId); if (it != m_uncompressedItems.end()) { CacheItemP citem = it->second; assert(m_itemHistory.find(citem->m_historyCount) != m_itemHistory.end()); @@ -1385,9 +1385,9 @@ void TImageCache::Imp::remap(const string &dstId, const string &srcId) m_compressedItems.erase(it); m_compressedItems[dstId] = citem; } - std::map::iterator it2 = m_duplicatedItems.find(srcId); + std::map::iterator it2 = m_duplicatedItems.find(srcId); if (it2 != m_duplicatedItems.end()) { - string id = it2->second; + std::string id = it2->second; m_duplicatedItems.erase(it2); m_duplicatedItems[dstId] = id; } @@ -1398,18 +1398,18 @@ void TImageCache::Imp::remap(const string &dstId, const string &srcId) //------------------------------------------------------------------------------ -void TImageCache::remapIcons(const string &dstId, const string &srcId) +void TImageCache::remapIcons(const std::string &dstId, const std::string &srcId) { - std::map::iterator it; - std::map table; - string prefix = srcId + ":"; + std::map::iterator it; + std::map table; + std::string prefix = srcId + ":"; int j = (int)prefix.length(); for (it = m_imp->m_uncompressedItems.begin(); it != m_imp->m_uncompressedItems.end(); ++it) { - string id = it->first; + std::string id = it->first; if (id.find(prefix) == 0) table[id] = dstId + ":" + id.substr(j); } - for (std::map::iterator it2 = table.begin(); + for (std::map::iterator it2 = table.begin(); it2 != table.end(); ++it2) { remap(it2->second, it2->first); } @@ -1474,7 +1474,7 @@ void TImageCache::clearSceneImages() //------------------------------------------------------------------------------ -bool TImageCache::isCached(const string &id) const +bool TImageCache::isCached(const std::string &id) const { TThread::MutexLocker sl(&m_imp->m_mutex); return (m_imp->m_uncompressedItems.find(id) != m_imp->m_uncompressedItems.end() || @@ -1485,11 +1485,11 @@ bool TImageCache::isCached(const string &id) const //------------------------------------------------------------------------------ #ifdef LEVO -bool TImageCache::getSize(const string &id, TDimension &size) const +bool TImageCache::getSize(const std::string &id, TDimension &size) const { QMutexLocker sl(&m_imp->m_mutex); - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) { UncompressedOnMemoryCacheItemP uncompressed = it->second; @@ -1507,7 +1507,7 @@ bool TImageCache::getSize(const string &id, TDimension &size) const } return false; } - std::map::iterator itc = m_imp->m_compressedItems.find(id); + std::map::iterator itc = m_imp->m_compressedItems.find(id); if (itc == m_imp->m_compressedItems.end()) return false; CacheItemP cacheItem = itc->second; @@ -1530,11 +1530,11 @@ bool TImageCache::getSize(const string &id, TDimension &size) const //------------------------------------------------------------------------------ -bool TImageCache::getSavebox(const string &id, TRect &savebox) const +bool TImageCache::getSavebox(const std::string &id, TRect &savebox) const { QMutexLocker sl(&m_imp->m_mutex); - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) { UncompressedOnMemoryCacheItemP uncompressed = it->second; @@ -1552,7 +1552,7 @@ bool TImageCache::getSavebox(const string &id, TRect &savebox) const } return false; } - std::map::iterator itc = m_imp->m_compressedItems.find(id); + std::map::iterator itc = m_imp->m_compressedItems.find(id); if (itc == m_imp->m_compressedItems.end()) return false; @@ -1577,11 +1577,11 @@ bool TImageCache::getSavebox(const string &id, TRect &savebox) const //------------------------------------------------------------------------------ -bool TImageCache::getDpi(const string &id, double &dpiX, double &dpiY) const +bool TImageCache::getDpi(const std::string &id, double &dpiX, double &dpiY) const { QMutexLocker sl(&m_imp->m_mutex); - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) { UncompressedOnMemoryCacheItemP uncompressed = it->second; @@ -1598,7 +1598,7 @@ bool TImageCache::getDpi(const string &id, double &dpiX, double &dpiY) const } return false; } - std::map::iterator itc = m_imp->m_compressedItems.find(id); + std::map::iterator itc = m_imp->m_compressedItems.find(id); if (itc == m_imp->m_compressedItems.end()) return false; CacheItemP cacheItem = itc->second; @@ -1624,18 +1624,18 @@ bool TImageCache::getDpi(const string &id, double &dpiX, double &dpiY) const //------------------------------------------------------------------------------ #endif -bool TImageCache::getSubsampling(const string &id, int &subs) const +bool TImageCache::getSubsampling(const std::string &id, int &subs) const { TThread::MutexLocker sl(&m_imp->m_mutex); - std::map::iterator it1; + std::map::iterator it1; if ((it1 = m_imp->m_duplicatedItems.find(id)) != m_imp->m_duplicatedItems.end()) { assert(m_imp->m_duplicatedItems.find(it1->second) == m_imp->m_duplicatedItems.end()); return getSubsampling(it1->second, subs); } - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) { UncompressedOnMemoryCacheItemP uncompressed = it->second; assert(uncompressed); @@ -1653,7 +1653,7 @@ bool TImageCache::getSubsampling(const string &id, int &subs) const } else return false; } - std::map::iterator itc = m_imp->m_compressedItems.find(id); + std::map::iterator itc = m_imp->m_compressedItems.find(id); if (itc == m_imp->m_compressedItems.end()) return false; CacheItemP cacheItem = itc->second; @@ -1674,11 +1674,11 @@ bool TImageCache::getSubsampling(const string &id, int &subs) const //------------------------------------------------------------------------------ -bool TImageCache::hasBeenModified(const string &id, bool reset) const +bool TImageCache::hasBeenModified(const std::string &id, bool reset) const { TThread::MutexLocker sl(&m_imp->m_mutex); - std::map::iterator it; + std::map::iterator it; if ((it = m_imp->m_duplicatedItems.find(id)) != m_imp->m_duplicatedItems.end()) { assert(m_imp->m_duplicatedItems.find(it->second) == m_imp->m_duplicatedItems.end()); return hasBeenModified(it->second, reset); @@ -1686,7 +1686,7 @@ bool TImageCache::hasBeenModified(const string &id, bool reset) const TImageP img; - std::map::iterator itu = m_imp->m_uncompressedItems.find(id); + std::map::iterator itu = m_imp->m_uncompressedItems.find(id); if (itu != m_imp->m_uncompressedItems.end()) { if (reset && itu->second->m_modified) { itu->second->m_modified = false; @@ -1699,18 +1699,18 @@ bool TImageCache::hasBeenModified(const string &id, bool reset) const //------------------------------------------------------------------------------ -TImageP TImageCache::get(const string &id, bool toBeModified) const +TImageP TImageCache::get(const std::string &id, bool toBeModified) const { return m_imp->get(id, toBeModified); } //------------------------------------------------------------------------------ -TImageP TImageCache::Imp::get(const string &id, bool toBeModified) +TImageP TImageCache::Imp::get(const std::string &id, bool toBeModified) { TThread::MutexLocker sl(&m_mutex); - std::map::const_iterator it; + std::map::const_iterator it; if ((it = m_duplicatedItems.find(id)) != m_duplicatedItems.end()) { assert(m_duplicatedItems.find(it->second) == m_duplicatedItems.end()); return get(it->second, toBeModified); @@ -1718,7 +1718,7 @@ TImageP TImageCache::Imp::get(const string &id, bool toBeModified) TImageP img; - std::map::iterator itu = m_uncompressedItems.find(id); + std::map::iterator itu = m_uncompressedItems.find(id); if (itu != m_uncompressedItems.end()) { img = itu->second->getImage(); if (itu->second->m_historyCount != HistoryCount - 1) //significa che l'ultimo get non era sulla stessa immagine, quindi serve aggiornare l'history! @@ -1731,14 +1731,14 @@ TImageP TImageCache::Imp::get(const string &id, bool toBeModified) } if (toBeModified) { itu->second->m_modified = true; - std::map::iterator itc = m_compressedItems.find(id); + std::map::iterator itc = m_compressedItems.find(id); if (itc != m_compressedItems.end()) m_compressedItems.erase(itc); } return img; } - std::map::iterator itc = m_compressedItems.find(id); + std::map::iterator itc = m_compressedItems.find(id); if (itc == m_compressedItems.end()) return 0; @@ -1793,7 +1793,7 @@ namespace class AccumulateMemUsage { public: - int operator()(int oldValue, std::pair item) + int operator()(int oldValue, std::pair item) { return oldValue + item.second->getSize(); } @@ -1826,9 +1826,9 @@ UINT TImageCache::getDiskUsage() const //------------------------------------------------------------------------------ -UINT TImageCache::getMemUsage(const string &id) const +UINT TImageCache::getMemUsage(const std::string &id) const { - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) return it->second->getSize(); @@ -1842,9 +1842,9 @@ UINT TImageCache::getMemUsage(const string &id) const //! Returns the uncompressed image size (in KB) of the image associated with //! passd id, or 0 if none was found. -UINT TImageCache::getUncompressedMemUsage(const string &id) const +UINT TImageCache::getUncompressedMemUsage(const std::string &id) const { - std::map::iterator it = m_imp->m_uncompressedItems.find(id); + std::map::iterator it = m_imp->m_uncompressedItems.find(id); if (it != m_imp->m_uncompressedItems.end()) return it->second->getSize(); @@ -1865,17 +1865,17 @@ int TImageCache::getItemCount() const */ //------------------------------------------------------------------------------ -UINT TImageCache::getDiskUsage(const string &id) const +UINT TImageCache::getDiskUsage(const std::string &id) const { return 0; } //------------------------------------------------------------------------------ -void TImageCache::dump(ostream &os) const +void TImageCache::dump(std::ostream &os) const { os << "mem: " << getMemUsage() << std::endl; - std::map::iterator it = m_imp->m_uncompressedItems.begin(); + std::map::iterator it = m_imp->m_uncompressedItems.begin(); for (; it != m_imp->m_uncompressedItems.end(); ++it) { os << it->first << std::endl; } @@ -1883,14 +1883,14 @@ void TImageCache::dump(ostream &os) const //------------------------------------------------------------------------------ -void TImageCache::outputMap(UINT chunkRequested, string filename) +void TImageCache::outputMap(UINT chunkRequested, std::string filename) { m_imp->outputMap(chunkRequested, filename); } //------------------------------------------------------------------------------ -void TImageCache::Imp::outputMap(UINT chunkRequested, string filename) +void TImageCache::Imp::outputMap(UINT chunkRequested, std::string filename) { TThread::MutexLocker sl(&m_mutex); //#ifdef _DEBUG @@ -1916,7 +1916,7 @@ void TImageCache::Imp::outputMap(UINT chunkRequested, string filename) TUINT64 umsize = 0; TUINT64 udsize = 0; - std::map::iterator itu = m_uncompressedItems.begin(); + std::map::iterator itu = m_uncompressedItems.begin(); for (; itu != m_uncompressedItems.end(); ++itu) { UncompressedOnMemoryCacheItemP uitem = itu->second; @@ -1931,7 +1931,7 @@ void TImageCache::Imp::outputMap(UINT chunkRequested, string filename) umsize3 += (TUINT64)(itu->second->getSize() / 1024.0); } } - std::map::iterator itc = m_compressedItems.begin(); + std::map::iterator itc = m_compressedItems.begin(); for (; itc != m_compressedItems.end(); ++itc) { CacheItemP boh = itc->second; CompressedOnMemoryCacheItemP cmitem = itc->second; @@ -1974,7 +1974,7 @@ void TImageCache::Imp::outputMap(UINT chunkRequested, string filename) //------------------------------------------------------------------------------ -void TImageCache::compress(const string &id) +void TImageCache::compress(const std::string &id) { m_imp->doCompress(id); } diff --git a/toonz/sources/common/tcolor/tpixel.cpp b/toonz/sources/common/tcolor/tpixel.cpp index 3cf7a82..c2f9a4e 100644 --- a/toonz/sources/common/tcolor/tpixel.cpp +++ b/toonz/sources/common/tcolor/tpixel.cpp @@ -45,21 +45,21 @@ const TPixelGR8 TPixelGR8::Black(0); const TPixelGR16 TPixelGR16::White(maxChannelValue); const TPixelGR16 TPixelGR16::Black(0); -ostream &operator<<(ostream &out, const TPixel32 &pixel) +std::ostream &operator<<(std::ostream &out, const TPixel32 &pixel) { return out << "PixRGBM32(" << (int)pixel.r << ", " << (int)pixel.g << ", " << (int)pixel.b << ", " << (int)pixel.m << ")"; } -ostream &operator<<(ostream &out, const TPixel64 &pixel) +std::ostream &operator<<(std::ostream &out, const TPixel64 &pixel) { return out << "PixRGBM64(" << pixel.r << ", " << pixel.g << ", " << pixel.b << ", " << pixel.m << ")"; } -ostream &operator<<(ostream &out, const TPixelD &pixel) +std::ostream &operator<<(std::ostream &out, const TPixelD &pixel) { return out << "PixD(" << pixel.r << ", " << pixel.g << ", " diff --git a/toonz/sources/common/tcore/tdata.cpp b/toonz/sources/common/tcore/tdata.cpp index 6484742..0d84c72 100644 --- a/toonz/sources/common/tcore/tdata.cpp +++ b/toonz/sources/common/tcore/tdata.cpp @@ -5,7 +5,7 @@ DEFINE_CLASS_CODE(TData, 16) -TTextData::TTextData(string text) +TTextData::TTextData(std::string text) : m_text(toWideString(text)) { } diff --git a/toonz/sources/common/tcore/texception.cpp b/toonz/sources/common/tcore/texception.cpp index 52e2ef2..4fccf77 100644 --- a/toonz/sources/common/tcore/texception.cpp +++ b/toonz/sources/common/tcore/texception.cpp @@ -3,7 +3,7 @@ #include "texception.h" #include "tconvert.h" -TException::TException(const string &msg) +TException::TException(const std::string &msg) { m_msg = toWideString(msg); } diff --git a/toonz/sources/common/tcore/tmathutil.cpp b/toonz/sources/common/tcore/tmathutil.cpp index b3ada9f..4f15e6b 100644 --- a/toonz/sources/common/tcore/tmathutil.cpp +++ b/toonz/sources/common/tcore/tmathutil.cpp @@ -7,7 +7,7 @@ using TConsts::epsilon; -TMathException::TMathException(string msg) +TMathException::TMathException(std::string msg) : m_msg(toWideString(msg)) { } @@ -57,7 +57,7 @@ int modrf(int ord, double *coef, double a, double b, double *val); //------------------------------------------------------------------------- -void convert(const vector &v, poly &p) +void convert(const std::vector &v, poly &p) { assert((int)v.size() <= MAX_ORDER); if ((int)v.size() > MAX_ORDER) @@ -69,7 +69,7 @@ void convert(const vector &v, poly &p) } //------------------------------------------------------------------------- -void convert(const poly &p, vector &v) +void convert(const poly &p, std::vector &v) { v.resize(p.ord); std::copy(p.coef, p.coef + p.ord, v.begin()); @@ -440,8 +440,7 @@ int modrf(int ord, double *coef, double a, double b, double *val) poly[1] = b poly[2] = a */ -int rootForQuadraticEquation(const vector &v, - vector &sol) +int rootForQuadraticEquation(const std::vector &v, std::vector &sol) { double q, delta; @@ -505,8 +504,7 @@ int rootForQuadraticEquation(const vector &v, poly[2] = b poly[3] = a */ -int rootForCubicEquation(const vector &p, - vector &sol) +int rootForCubicEquation(const std::vector &p, std::vector &sol) { /* if( isAlmostZero(p[3]) ) @@ -515,7 +513,7 @@ int rootForCubicEquation(const vector &p, if (isAlmostZero(p[0])) { int numberOfSol; - vector redPol(3); + std::vector redPol(3); redPol[0] = p[1]; redPol[1] = p[2]; redPol[2] = p[3]; @@ -568,8 +566,7 @@ int rootForCubicEquation(const vector &p, //----------------------------------------------------------------------------- -int rootForGreaterThanThreeEquation(const vector &p, - vector &sol) +int rootForGreaterThanThreeEquation(const std::vector &p, std::vector &sol) { poly sseq[MAX_ORDER]; @@ -734,7 +731,7 @@ double tdet(double *LUa, int n, double d) double tdet(double *a, int n) { double d; - vector indx(n); + std::vector indx(n); tLUDecomposition(a, n, &indx[0], d); for (int i = 1; i <= n; ++i) @@ -748,7 +745,7 @@ double tdet(double *a, int n) void tsolveSistem(double *a, int n, double *res) { double d; - vector indx(n); + std::vector indx(n); tLUDecomposition(a, n, &indx[0], d); assert(tdet(a, n, d) != 0); @@ -761,8 +758,7 @@ void tsolveSistem(double *a, int n, double *res) //----------------------------------------------------------------------------- -int rootFinding(const vector &in_poly, - vector &sol) +int rootFinding(const std::vector &in_poly, std::vector &sol) { // per ora risolvo solo i polinomi di grado al piu' pari a 3 assert((int)in_poly.size() <= MAX_ORDER); diff --git a/toonz/sources/common/tcore/tstopwatch.cpp b/toonz/sources/common/tcore/tstopwatch.cpp index 6b49ee3..420a741 100644 --- a/toonz/sources/common/tcore/tstopwatch.cpp +++ b/toonz/sources/common/tcore/tstopwatch.cpp @@ -52,7 +52,7 @@ using namespace std; //----------------------------------------------------------- -TStopWatch::TStopWatch(string name) +TStopWatch::TStopWatch(std::string name) : m_name(name), m_active(false), m_isRunning(false) { if (timerToUse == TTUUnknown) diff --git a/toonz/sources/common/tcore/tstring.cpp b/toonz/sources/common/tcore/tstring.cpp index b2f1c93..e1b0e00 100644 --- a/toonz/sources/common/tcore/tstring.cpp +++ b/toonz/sources/common/tcore/tstring.cpp @@ -15,13 +15,13 @@ class TStringConvertException : public TException { - string m_string; + std::string m_string; public: - TStringConvertException(const string str) : m_string(str) {} + TStringConvertException(const std::string str) : m_string(str) {} }; -wstring toWideString(string s) +std::wstring toWideString(std::string s) { #ifdef TNZCORE_LIGHT std::wstring ws; @@ -33,14 +33,14 @@ wstring toWideString(string s) QString qString = QString::fromUtf8(s.c_str()); // To detect if 's' is UTF-8 encoded or not - if (qString != testString && string(qString.toUtf8()) == s) + if (qString != testString && std::string(qString.toUtf8()) == s) return qString.toStdWString(); else return testString.toStdWString(); #endif } -string toString(wstring ws) +std::string toString(std::wstring ws) { #ifdef TNZCORE_LIGHT std::string s; @@ -59,43 +59,43 @@ string toString(wstring ws) return qString.toStdString(); QByteArray a = qString.toUtf8(); - return string(a); + return std::string(a); #endif } -string toString(const TFilePath &fp) +std::string toString(const TFilePath &fp) { return toString(fp.getWideString()); } -wstring toWideString(int x) +std::wstring toWideString(int x) { return toWideString(toString(x)); } -string toString(int value) +std::string toString(int value) { - ostrstream ss; + std::ostrstream ss; ss << value << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } -string toString(unsigned long value) +std::string toString(unsigned long value) { - ostrstream ss; + std::ostrstream ss; ss << value << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } -string toString(unsigned long long value) +std::string toString(unsigned long long value) { - ostrstream ss; + std::ostrstream ss; ss << value << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } @@ -106,28 +106,28 @@ string toString(unsigned long long value) part, the remainder is not cut off but rounded. */ -string toString(double value, int prec) +std::string toString(double value, int prec) { - ostrstream ss; + std::ostrstream ss; ss.setf(std::ios_base::fixed, std::ios_base::floatfield); if (prec >= 0) ss.precision(prec); ss << value << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(0); return s; } -string toString(void *p) +std::string toString(void *p) { - ostrstream ss; + std::ostrstream ss; ss << p << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } -int toInt(string str) +int toInt(std::string str) { int value = 0; for (int i = 0; i < (int)str.size(); i++) @@ -135,12 +135,12 @@ int toInt(string str) return value; } -int toInt(wstring str) +int toInt(std::wstring str) { return toInt(toString(str)); } -bool isInt(string s) +bool isInt(std::string s) { int i = 0, len = (int)s.size(); if (len == 0) @@ -160,7 +160,7 @@ bool isInt(string s) return true; } -bool isDouble(string s) +bool isDouble(std::string s) { int i = 0, len = (int)s.size(); if (len == 0) @@ -183,57 +183,57 @@ bool isDouble(string s) return true; } -bool isInt(wstring s) { return isInt(toString(s)); } -bool isDouble(wstring s) { return isDouble(toString(s)); } +bool isInt(std::wstring s) { return isInt(toString(s)); } +bool isDouble(std::wstring s) { return isDouble(toString(s)); } -double toDouble(string str) +double toDouble(std::string str) { double value; - istrstream ss(str.c_str(), (std::streamsize)str.length()); + std::istrstream ss(str.c_str(), (std::streamsize)str.length()); ss >> value; return value; } -double toDouble(wstring str) +double toDouble(std::wstring str) { return toDouble(toString(str)); } -wstring toWideString(double v, int p) +std::wstring toWideString(double v, int p) { return toWideString(toString(v, p)); } -string toUpper(string a) +std::string toUpper(std::string a) { #ifdef _WIN32 return _strupr(const_cast(a.c_str())); #else - string ret = a; + std::string ret = a; for (int i = 0; i < (int)ret.length(); i++) ret[i] = toupper(ret[i]); return ret; #endif } -string toLower(string a) +std::string toLower(std::string a) { #ifdef _WIN32 return _strlwr(const_cast(a.c_str())); #else - string ret = a; + std::string ret = a; for (int i = 0; i < (int)ret.length(); i++) ret[i] = tolower(ret[i]); return ret; #endif } -wstring toUpper(wstring a) +std::wstring toUpper(std::wstring a) { #ifdef _WIN32 return _wcsupr(const_cast(a.c_str())); #else - wstring ret; + std::wstring ret; for (int i = 0; i < (int)a.length(); i++) { wchar_t c = towupper(a[i]); ret += c; @@ -242,12 +242,12 @@ wstring toUpper(wstring a) #endif } -wstring toLower(wstring a) +std::wstring toLower(std::wstring a) { #ifdef _WIN32 return _wcslwr(const_cast(a.c_str())); #else - wstring ret; + std::wstring ret; for (int i = 0; i < (int)a.length(); i++) { wchar_t c = towlower(a[i]); ret += c; diff --git a/toonz/sources/common/tcore/tundo.cpp b/toonz/sources/common/tcore/tundo.cpp index 5cb4d38..b1c8a85 100644 --- a/toonz/sources/common/tcore/tundo.cpp +++ b/toonz/sources/common/tcore/tundo.cpp @@ -17,7 +17,7 @@ void callRedo(const TUndo *undo) { undo->redo(); } class TUndoBlock : public TUndo { - vector m_undos; + std::vector m_undos; typedef std::vector::const_iterator Iterator; typedef std::vector::const_reverse_iterator ReverseIterator; mutable bool m_deleted, m_undoing; @@ -129,7 +129,7 @@ struct TUndoManager::TUndoManagerImp { bool m_skipped; int m_undoMemorySize; // in bytes - vector m_blockStack; + std::vector m_blockStack; public: TUndoManagerImp() : m_skipped(false), m_undoMemorySize(0) { m_current = m_undoList.end(); } diff --git a/toonz/sources/common/tfx/tfx.cpp b/toonz/sources/common/tfx/tfx.cpp index 293bb65..f31b5f4 100644 --- a/toonz/sources/common/tfx/tfx.cpp +++ b/toonz/sources/common/tfx/tfx.cpp @@ -37,18 +37,18 @@ namespace //------------------------------------------------------------------------------ -typedef pair NamePort; -typedef map PortTable; -typedef vector PortArray; +typedef std::pair NamePort; +typedef std::map PortTable; +typedef std::vector PortArray; //------------------------------------------------------------------------------ class PortNameEq { - string m_name; + std::string m_name; public: - PortNameEq(const string &name) : m_name(name) {} + PortNameEq(const std::string &name) : m_name(name) {} ~PortNameEq() {} bool operator()(const NamePort &np) { return np.first == m_name; } }; @@ -58,8 +58,8 @@ public: void skipChild(TIStream &is) { while (!is.eos()) { - string dummy = is.getString(); - string tagName; + std::string dummy = is.getString(); + std::string tagName; while (is.openChild(tagName)) { skipChild(is); if (is.isBeginEndTag()) @@ -160,8 +160,8 @@ public: TFx *m_fx; //!< Fx back-pointer TFxImp *m_prev, *m_next; //!< Linked fxs - wstring m_name; - wstring m_fxId; + std::wstring m_name; + std::wstring m_fxId; PortTable m_portTable; //!< Name -> port map PortArray m_portArray; //!< Ports container @@ -223,7 +223,7 @@ class TFxFactory // singleton std::pair> Table; Table m_table; - std::vector m_map; + std::vector m_map; TFxFactory() {} @@ -311,28 +311,28 @@ TFx::~TFx() //-------------------------------------------------- -wstring TFx::getName() const +std::wstring TFx::getName() const { return m_imp->m_name; } //-------------------------------------------------- -void TFx::setName(wstring name) +void TFx::setName(std::wstring name) { m_imp->m_name = name; } //-------------------------------------------------- -wstring TFx::getFxId() const +std::wstring TFx::getFxId() const { return m_imp->m_fxId; } //-------------------------------------------------- -void TFx::setFxId(wstring id) +void TFx::setFxId(std::wstring id) { m_imp->m_fxId = id; } @@ -627,7 +627,7 @@ TFxPort *TFx::getInputPort(int index) const //-------------------------------------------------- -string TFx::getInputPortName(int index) const +std::string TFx::getInputPortName(int index) const { assert(0 <= index && index < (int)(m_imp->m_portArray.size())); return m_imp->m_portArray[index].first; @@ -635,7 +635,7 @@ string TFx::getInputPortName(int index) const //-------------------------------------------------- -bool TFx::renamePort(const string &oldName, const string &newName) +bool TFx::renamePort(const std::string &oldName, const std::string &newName) { PortTable::iterator it = m_imp->m_portTable.find(oldName); if (it == m_imp->m_portTable.end()) @@ -808,15 +808,15 @@ void TFx::setNewIdentifier() void TFx::loadData(TIStream &is) { - string tagName; + std::string tagName; VersionNumber tnzVersion = is.getVersion(); QList groupIds; - QList groupNames; + QList groupNames; while (is.openChild(tagName)) { if (tagName == "params") { while (!is.eos()) { - string paramName; + std::string paramName; while (is.openChild(paramName)) { TParamP param = getParams()->getParam(paramName); if (param) @@ -835,7 +835,7 @@ void TFx::loadData(TIStream &is) throw TException("Missing linkedSetRoot"); linkParams(fx); } else if (tagName == "ports") { - string portName; + std::string portName; while (!is.eos()) { while (is.openChild(portName)) { VersionNumber version = is.getVersion(); @@ -858,7 +858,7 @@ void TFx::loadData(TIStream &is) // Could not find (or add) a port with the corresponding name - throw if (!port) - throw TException(string("port '") + portName + "' is not present"); + throw TException(std::string("port '") + portName + "' is not present"); if (!is.eos()) { TPersist *p = 0; @@ -910,7 +910,7 @@ void TFx::loadData(TIStream &is) groupIds.append(groupId); } } else if (tagName == "groupNames") { - wstring groupName; + std::wstring groupName; while (!is.eos()) { is >> groupName; groupNames.append(groupName); @@ -949,7 +949,7 @@ void TFx::saveData(TOStream &os) if (linkedSetRoot == this) { os.openChild("params"); for (int i = 0; i < getParams()->getParamCount(); i++) { - string paramName = getParams()->getParamName(i); + std::string paramName = getParams()->getParamName(i); TParam *param = getParams()->getParam(i); os.openChild(paramName); param->saveData(os); @@ -980,10 +980,10 @@ void TFx::saveData(TOStream &os) bool cacheEnabled = TPassiveCacheManager::instance()->cacheEnabled(this); if (cacheEnabled) os.child("passiveCacheId") << TPassiveCacheManager::instance()->getPassiveCacheId(this); - wstring name = getName(); + std::wstring name = getName(); if (name != L"") os.child("name") << TFilePath(name); - wstring fxId = getFxId(); + std::wstring fxId = getFxId(); os.child("fxId") << fxId; if (!m_imp->m_attributes.isEnabled()) os.child("enabled") << 0; @@ -996,7 +996,7 @@ void TFx::saveData(TOStream &os) os << groupIdStack[i]; os.closeChild(); os.openChild("groupNames"); - QStack groupNameStack = m_imp->m_attributes.getGroupNameStack(); + QStack groupNameStack = m_imp->m_attributes.getGroupNameStack(); for (i = 0; i < groupNameStack.size(); i++) os << groupNameStack[i]; os.closeChild(); @@ -1007,15 +1007,15 @@ void TFx::saveData(TOStream &os) void TFx::loadPreset(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "dvpreset") { - string fxId = is.getTagAttribute("fxId"); + std::string fxId = is.getTagAttribute("fxId"); if (fxId != getFxType()) throw TException("Preset doesn't match the fx type"); } else if (tagName == "params") { while (!is.eos()) { - string paramName; + std::string paramName; while (is.openChild(paramName)) { try { TParamP param = getParams()->getParam(paramName); @@ -1035,15 +1035,15 @@ void TFx::loadPreset(TIStream &is) void TFx::savePreset(TOStream &os) { - map attributes; - attributes.insert(std::make_pair(string("ver"), string("1.0"))); - attributes.insert(std::make_pair(string("fxId"), getFxType())); + std::map attributes; + attributes.insert(std::make_pair(std::string("ver"), std::string("1.0"))); + attributes.insert(std::make_pair(std::string("fxId"), getFxType())); os.openChild("dvpreset", attributes); os.openChild("params"); for (int i = 0; i < getParams()->getParamCount(); i++) { - string paramName = getParams()->getParamName(i); + std::string paramName = getParams()->getParamName(i); TParam *param = getParams()->getParam(i); os.openChild(paramName); param->saveData(os); @@ -1065,7 +1065,7 @@ void TFx::disconnectAll() //-------------------------------------------------- -TFx *TFx::create(string name) +TFx *TFx::create(std::string name) { return TFxFactory::instance()->create(name); } diff --git a/toonz/sources/common/tfx/tfxcachemanager.cpp b/toonz/sources/common/tfx/tfxcachemanager.cpp index 786119d..9a6bb76 100644 --- a/toonz/sources/common/tfx/tfxcachemanager.cpp +++ b/toonz/sources/common/tfx/tfxcachemanager.cpp @@ -238,7 +238,7 @@ void TFxCacheManager::notifyPredictedRelease(const TCacheResourceP& resource) //**************************************************************************************************** void TFxCacheManager::declareResource( - const string &alias, const TFxP &fx, + const std::string &alias, const TFxP &fx, const TRectD &rect, double frame, const TRenderSettings &rs, bool subtileable) { @@ -261,7 +261,7 @@ void TFxCacheManager::declareResource( //----------------------------------------------------------------------------------- ResourceData TFxCacheManager::getResource( - const string &alias, + const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs) { TCacheResourceP result, temp; @@ -499,7 +499,7 @@ ResourceBuilder::ResourceBuilder( //----------------------------------------------------------------------------------- void ResourceBuilder::declareResource( - const string &alias, const TFxP &fx, + const std::string &alias, const TFxP &fx, const TRectD &rect, double frame, const TRenderSettings &rs, bool subtileable) { diff --git a/toonz/sources/common/tfx/tmacrofx.cpp b/toonz/sources/common/tfx/tmacrofx.cpp index 018d294..04f0601 100644 --- a/toonz/sources/common/tfx/tmacrofx.cpp +++ b/toonz/sources/common/tfx/tmacrofx.cpp @@ -97,10 +97,10 @@ void collectParams(TMacroFx *macroFx) //-------------------------------------------------- -bool TMacroFx::analyze(const vector &fxs, +bool TMacroFx::analyze(const std::vector &fxs, TFxP &root, - vector &roots, - vector &leafs) + std::vector &roots, + std::vector &leafs) { if (fxs.size() == 1) return false; @@ -172,7 +172,7 @@ bool TMacroFx::analyze(const vector &fxs, //-------------------------------------------------- -bool TMacroFx::analyze(const vector &fxs) +bool TMacroFx::analyze(const std::vector &fxs) { TFxP root = 0; std::vector leafs; @@ -219,7 +219,7 @@ TMacroFx::~TMacroFx() {} TFx *TMacroFx::clone(bool recursive) const { int n = m_fxs.size(); - vector clones(n); + std::vector clones(n); std::map table; std::map::iterator it; int i, rootIndex = -1; @@ -307,7 +307,7 @@ TFxTimeRegion TMacroFx::getTimeRegion() const //-------------------------------------------------- -string TMacroFx::getPluginId() const +std::string TMacroFx::getPluginId() const { return "Base"; } @@ -329,7 +329,7 @@ TFx *TMacroFx::getRoot() const //-------------------------------------------------- -TFx *TMacroFx::getFxById(const wstring &id) const +TFx *TMacroFx::getFxById(const std::wstring &id) const { int i; for (i = 0; i < (int)m_fxs.size(); i++) { @@ -342,16 +342,16 @@ TFx *TMacroFx::getFxById(const wstring &id) const //-------------------------------------------------- -const vector &TMacroFx::getFxs() const +const std::vector &TMacroFx::getFxs() const { return m_fxs; } //-------------------------------------------------- -string TMacroFx::getMacroFxType() const +std::string TMacroFx::getMacroFxType() const { - string name = getFxType() + "("; + std::string name = getFxType() + "("; for (int i = 0; i < (int)m_fxs.size(); i++) { if (i > 0) name += ","; @@ -365,13 +365,13 @@ string TMacroFx::getMacroFxType() const //-------------------------------------------------- -TMacroFx *TMacroFx::create(const vector &fxs) +TMacroFx *TMacroFx::create(const std::vector &fxs) { std::vector leafs; std::vector roots; TFxP root = 0; - vector orederedFxs = sortFxs(fxs); + std::vector orederedFxs = sortFxs(fxs); // verifica che gli effetti selezionati siano idonei ad essere raccolti // in una macro. Ci deve essere un solo nodo terminale @@ -397,8 +397,8 @@ TMacroFx *TMacroFx::create(const vector &fxs) int count = fx->getInputPortCount(); for (; k < count; k++) { TFxPort *port = fx->getInputPort(k); - string portName = fx->getInputPortName(k); - string fxId = toString(fx->getFxId()); + std::string portName = fx->getInputPortName(k); + std::string fxId = toString(fx->getFxId()); portName += "_" + toString(macroFx->getInputPortCount()) + "_" + fxId; TFx *portFx = port->getFx(); if (portFx) { @@ -436,9 +436,9 @@ bool TMacroFx::canHandle(const TRenderSettings &info, double frame) //-------------------------------------------------- -string TMacroFx::getAlias(double frame, const TRenderSettings &info) const +std::string TMacroFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -491,7 +491,7 @@ void TMacroFx::compatibilityTranslatePort(int major, int minor, std::string &por if (VersionNumber(major, minor) == VersionNumber(1, 16)) { for (int i = 0; i < getInputPortCount(); ++i) { const std::string &name = getInputPortName(i); - if (name.find(portName) != string::npos) { + if (name.find(portName) != std::string::npos) { portName = name; break; } @@ -504,7 +504,7 @@ void TMacroFx::compatibilityTranslatePort(int major, int minor, std::string &por void TMacroFx::loadData(TIStream &is) { VersionNumber tnzVersion = is.getVersion(); - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "root") { TPersist *p = 0; @@ -526,7 +526,7 @@ void TMacroFx::loadData(TIStream &is) int i = 0; while (is.matchTag(tagName)) { if (tagName == "port") { - string name = is.getTagAttribute("name"); + std::string name = is.getTagAttribute("name"); if (tnzVersion < VersionNumber(1, 16) && name != "") { TRasterFxPort *port = new TRasterFxPort(); addInputPort(name, *port); @@ -537,14 +537,14 @@ void TMacroFx::loadData(TIStream &is) compatibilityTranslatePort(tnzVersion.first, tnzVersion.second, name); - string inPortName = name; + std::string inPortName = name; inPortName.erase(inPortName.find("_"), inPortName.size() - 1); - string inFxId = name; + std::string inFxId = name; inFxId.erase(0, inFxId.find_last_of("_") + 1); for (int i = 0; i < (int)m_fxs.size(); i++) { - wstring fxId = m_fxs[i]->getFxId(); + std::wstring fxId = m_fxs[i]->getFxId(); if (fxId == toWideString(inFxId)) { if (TFxPort *port = m_fxs[i]->getInputPort(inPortName)) addInputPort(name, *port); @@ -583,7 +583,7 @@ void TMacroFx::saveData(TOStream &os) os.openChild("ports"); for (i = 0; i < getInputPortCount(); i++) { std::string portName = getInputPortName(i); - std::map attr; + std::map attr; attr["name_inFx"] = portName; os.openCloseChild("port", attr); } diff --git a/toonz/sources/common/tfx/tpassivecachemanager.cpp b/toonz/sources/common/tfx/tpassivecachemanager.cpp index da0a349..218e137 100644 --- a/toonz/sources/common/tfx/tpassivecachemanager.cpp +++ b/toonz/sources/common/tfx/tpassivecachemanager.cpp @@ -841,7 +841,7 @@ void TPassiveCacheManager::invalidateLevel(const std::string &levelName) std::set &resources = *it; std::set::iterator jt, kt; for (jt = resources.begin(); jt != resources.end();) { - if ((*jt)->getName().find(levelName) != string::npos) { + if ((*jt)->getName().find(levelName) != std::string::npos) { kt = jt++; it->erase(kt); } else @@ -935,7 +935,7 @@ void TPassiveCacheManager::onXsheetChanged() //------------------------------------------------------------------------- void TPassiveCacheManager::getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { diff --git a/toonz/sources/common/tfx/tpredictivecachemanager.cpp b/toonz/sources/common/tfx/tpredictivecachemanager.cpp index 43b19d8..3be1eb0 100644 --- a/toonz/sources/common/tfx/tpredictivecachemanager.cpp +++ b/toonz/sources/common/tfx/tpredictivecachemanager.cpp @@ -74,7 +74,7 @@ public: { } - void run(TCacheResourceP &resource, const string &alias, + void run(TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { @@ -91,12 +91,12 @@ public: private: void getResourceTestRun( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData); void getResourceComputing( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData); }; @@ -131,7 +131,7 @@ void TPredictiveCacheManager::setBPP(int bpp) //--------------------------------------------------------------------------- void TPredictiveCacheManager::getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { @@ -146,7 +146,7 @@ void TPredictiveCacheManager::getResource( //************************************************************************************************ void TPredictiveCacheManager::Imp::getResourceTestRun( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { @@ -180,7 +180,7 @@ void TPredictiveCacheManager::Imp::getResourceTestRun( //--------------------------------------------------------------------------- void TPredictiveCacheManager::Imp::getResourceComputing( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { diff --git a/toonz/sources/common/tfx/trenderer.cpp b/toonz/sources/common/tfx/trenderer.cpp index eb3ad71..255d01d 100644 --- a/toonz/sources/common/tfx/trenderer.cpp +++ b/toonz/sources/common/tfx/trenderer.cpp @@ -109,7 +109,7 @@ inline void interlace(TRasterP f0, const TRasterP &f1, int field) class RasterItem { - string m_rasterId; + std::string m_rasterId; public: int m_bpp; @@ -1296,7 +1296,7 @@ std::vector calculateSortedFxs(TRasterFxP rootFx) //--------------------------------------------------------- -void TRendererImp::startRendering(unsigned long renderId, const vector &renderDatas) +void TRendererImp::startRendering(unsigned long renderId, const std::vector &renderDatas) { rootFx = renderDatas.front().m_fxRoot.m_frameA; int T = renderDatas.size(); @@ -1483,7 +1483,7 @@ void TRendererImp::startRendering(unsigned long renderId, const vectorgetAlias(frame, renderData.m_info); + std::string alias = fx->getAlias(frame, renderData.m_info); if (renderData.m_fxRoot.m_frameB) alias = alias + renderData.m_fxRoot.m_frameB->getAlias(frame, renderData.m_info); diff --git a/toonz/sources/common/tfx/ttzpimagefx.cpp b/toonz/sources/common/tfx/ttzpimagefx.cpp index 5a1bf92..4a0a46c 100644 --- a/toonz/sources/common/tfx/ttzpimagefx.cpp +++ b/toonz/sources/common/tfx/ttzpimagefx.cpp @@ -9,7 +9,7 @@ // Global functions //********************************************************************************************** -void parseIndexes(string indexes, vector &items) +void parseIndexes(std::string indexes, std::vector &items) { #ifdef _WIN32 char seps[] = " ,;"; @@ -37,13 +37,13 @@ void parseIndexes(string indexes, vector &items) //------------------------------------------------------------------- -void insertIndexes(vector items, PaletteFilterFxRenderData *t) +void insertIndexes(std::vector items, PaletteFilterFxRenderData *t) { #ifdef _WIN32 for (int i = 0; i < (int)items.size(); i++) { char *starttoken, *endtoken; char subseps[] = "-"; - string tmp = items[i]; + std::string tmp = items[i]; char *context = 0; starttoken = strtok_s((char *)tmp.c_str(), subseps, &context); endtoken = strtok_s(NULL, subseps, &context); @@ -65,7 +65,7 @@ void insertIndexes(vector items, PaletteFilterFxRenderData *t) for (int i = 0; i < (int)items.size(); i++) { char *starttoken, *endtoken; char subseps[] = "-"; - string tmp = items[i]; + std::string tmp = items[i]; starttoken = strtok((char *)tmp.c_str(), subseps); endtoken = strtok(NULL, subseps); if (!endtoken && isInt(starttoken)) { @@ -89,7 +89,7 @@ void insertIndexes(vector items, PaletteFilterFxRenderData *t) // ExternalPaletteFxRenderData implementation //********************************************************************************************** -ExternalPaletteFxRenderData::ExternalPaletteFxRenderData(TPaletteP palette, const string &name) +ExternalPaletteFxRenderData::ExternalPaletteFxRenderData(TPaletteP palette, const std::string &name) : m_palette(palette), m_name(name) { } @@ -103,7 +103,7 @@ bool ExternalPaletteFxRenderData::operator==(const TRasterFxRenderData &data) co //------------------------------------------------------------------------------ -string ExternalPaletteFxRenderData::toString() const +std::string ExternalPaletteFxRenderData::toString() const { return m_name; } @@ -131,9 +131,9 @@ bool PaletteFilterFxRenderData::operator==(const TRasterFxRenderData &data) cons //------------------------------------------------------------------------------ -string PaletteFilterFxRenderData::toString() const +std::string PaletteFilterFxRenderData::toString() const { - string alias; + std::string alias; std::set::const_iterator it = m_colors.begin(); for (; it != m_colors.end(); ++it) alias += ::toString(*it); @@ -198,9 +198,9 @@ bool SandorFxRenderData::operator==(const TRasterFxRenderData &data) const //------------------------------------------------------------------------------ -string SandorFxRenderData::toString() const +std::string SandorFxRenderData::toString() const { - string alias; + std::string alias; if (m_type == BlendTz) { alias += ::toString(m_blendParams.m_colorIndex) + " "; alias += ::toString(m_blendParams.m_smoothness) + " "; @@ -249,8 +249,8 @@ TRectD SandorFxRenderData::getBBoxEnlargement(const TRectD &bbox) case BlendTz: { //Nothing happen, unless we have color 0 among the blended ones. In such case, //we have to enlarge the bbox proportionally to the amount param. - vector items; - string indexes = std::string(m_argv[0]); + std::vector items; + std::string indexes = std::string(m_argv[0]); parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); diff --git a/toonz/sources/common/tfx/unaryFx.cpp b/toonz/sources/common/tfx/unaryFx.cpp index 8420ff1..abde0fd 100644 --- a/toonz/sources/common/tfx/unaryFx.cpp +++ b/toonz/sources/common/tfx/unaryFx.cpp @@ -78,12 +78,12 @@ bool TGeometryFx::doGetBBox(double frame, TRectD &bBox, const TRenderSettings &i //-------------------------------------------------- -string TGeometryFx::getAlias(double frame, const TRenderSettings &info) const +std::string TGeometryFx::getAlias(double frame, const TRenderSettings &info) const { TGeometryFx *tthis = const_cast(this); TAffine affine = tthis->getPlacement(frame); - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole diff --git a/toonz/sources/common/tgeometry/tcurveutil.cpp b/toonz/sources/common/tgeometry/tcurveutil.cpp index be1d30f..4cc6baf 100644 --- a/toonz/sources/common/tgeometry/tcurveutil.cpp +++ b/toonz/sources/common/tgeometry/tcurveutil.cpp @@ -249,8 +249,8 @@ int intersect(const TQuadratic &c0, double A = (a * a + d * d) * coeff * coeff; double aux = A * c2 + (a * b + d * e) * coeff; - vector t; - vector solutions; + std::vector t; + std::vector solutions; t.push_back(aux * c2 + a * c + d * f - k * a - d * q); aux += A * c2; @@ -403,14 +403,14 @@ int intersect(const TQuadratic &q, return intersect(s, TSegment(q.getP0(), q.getP2()), intersections); } - vector bez, pol; + std::vector bez, pol; bez.push_back(q.getP0()); bez.push_back(q.getP1()); bez.push_back(q.getP2()); bezier2poly(bez, pol); - vector poly_1(3, 0), sol; + std::vector poly_1(3, 0), sol; poly_1[0] = a * pol[0].x + b * pol[0].y + c; poly_1[1] = a * pol[1].x + b * pol[1].y; diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp index 9b04bb7..a561d44 100644 --- a/toonz/sources/common/tgl/tgl.cpp +++ b/toonz/sources/common/tgl/tgl.cpp @@ -77,7 +77,7 @@ double tglGetPixelSize2() //----------------------------------------------------------------------------- -double tglGetTextWidth(const string &s, void *font) +double tglGetTextWidth(const std::string &s, void *font) { double factor = 0.07; double w = 0; @@ -88,7 +88,7 @@ double tglGetTextWidth(const string &s, void *font) //----------------------------------------------------------------------------- -void tglDrawText(const TPointD &p, const string &s, void *character) +void tglDrawText(const TPointD &p, const std::string &s, void *character) { #ifndef __sgi glPushMatrix(); @@ -106,7 +106,7 @@ void tglDrawText(const TPointD &p, const string &s, void *character) //----------------------------------------------------------------------------- -void tglDrawText(const TPointD &p, const wstring &s, void *character) +void tglDrawText(const TPointD &p, const std::wstring &s, void *character) { #ifndef __sgi glPushMatrix(); @@ -322,7 +322,7 @@ public: static GlFontManager *instance(); bool setFont(void *font = GLUT_BITMAP_TIMES_ROMAN_10); void drawText(/*const TRectD bBox,*/ - wstring wtext /*, + std::wstring wtext /*, TDimensionD scale = TDimensionD(1.0, 1.0)*/); private: @@ -407,13 +407,13 @@ bool GlFontManager::setFont(void *font) //---------------------------------------------------------------------------- void GlFontManager::drawText(/*const TRectD bBox,*/ - wstring wtext /*, + std::wstring wtext /*, TDimensionD scale*/) { if (!m_currentFont) return; - string text = toString(wtext); + std::string text = toString(wtext); const char *textString = text.c_str(); glListBase(m_base); /* diff --git a/toonz/sources/common/tiio/tiio_bmp.cpp b/toonz/sources/common/tiio/tiio_bmp.cpp index 3ceb903..8f1e858 100644 --- a/toonz/sources/common/tiio/tiio_bmp.cpp +++ b/toonz/sources/common/tiio/tiio_bmp.cpp @@ -697,16 +697,16 @@ void BmpWriter::open(FILE *file, const TImageInfo &info) TEnumProperty *p = (TEnumProperty *)(m_properties->getProperty("Bits Per Pixel")); assert(p); - string str = toString(p->getValue()); + std::string str = toString(p->getValue()); m_bitPerPixel = atoi(str.c_str()); int cmapSize = 0; - vector *colormap = 0; + std::vector *colormap = 0; if (m_bitPerPixel == 8) { TPointerProperty *colormapProp = (TPointerProperty *)(m_properties->getProperty("Colormap")); if (colormapProp) { - colormap = (vector *)colormapProp->getValue(); + colormap = (std::vector *)colormapProp->getValue(); cmapSize = colormap->size(); } else cmapSize = 256; diff --git a/toonz/sources/common/tiio/tiio_jpg.cpp b/toonz/sources/common/tiio/tiio_jpg.cpp index c8e0ee2..5200d35 100644 --- a/toonz/sources/common/tiio/tiio_jpg.cpp +++ b/toonz/sources/common/tiio/tiio_jpg.cpp @@ -25,7 +25,7 @@ //========================================================= -const string Tiio::JpgWriterProperties::QUALITY("Quality"); +const std::string Tiio::JpgWriterProperties::QUALITY("Quality"); //========================================================= diff --git a/toonz/sources/common/timage/tlevel.cpp b/toonz/sources/common/timage/tlevel.cpp index 4c6a212..66094c5 100644 --- a/toonz/sources/common/timage/tlevel.cpp +++ b/toonz/sources/common/timage/tlevel.cpp @@ -23,14 +23,14 @@ TLevel::~TLevel() //------------------------------------------------- -string TLevel::getName() const +std::string TLevel::getName() const { return m_name; } //------------------------------------------------- -void TLevel::setName(string name) +void TLevel::setName(std::string name) { m_name = name; } diff --git a/toonz/sources/common/timage_io/timage_io.cpp b/toonz/sources/common/timage_io/timage_io.cpp index 3fd2e6b..45291bf 100644 --- a/toonz/sources/common/timage_io/timage_io.cpp +++ b/toonz/sources/common/timage_io/timage_io.cpp @@ -92,7 +92,7 @@ void TImageReader::close() /*! Opens for reading using \b fopen(). */ -void TImageReader::getTzpPaletteColorNames(map> &pltColorNames) +void TImageReader::getTzpPaletteColorNames(std::map> &pltColorNames) { if (!m_file) open(); @@ -110,7 +110,7 @@ void TImageReader::open() { assert(m_file == NULL); - string type = toLower(m_path.getType()); + std::string type = toLower(m_path.getType()); m_file = fopen(m_path, "rb"); //Opens for reading. If the file does not exist or cannot be found, the fopen_s call fails if (m_file == NULL) //Non dovrebbe mai andarci! @@ -132,7 +132,7 @@ void TImageReader::open() QString msg = QString::fromStdWString(e.getMessage()); if (msg == QString("Old 4.1 Palette")) throw e; - } catch (string str) { + } catch (std::string str) { if (str == "Tiff file closed") m_file = NULL; } @@ -818,7 +818,7 @@ const TImageInfo *TImageReader::getImageInfo() const // //=========================================================== -TImageException::TImageException(const TFilePath &fp, const string &msg) +TImageException::TImageException(const TFilePath &fp, const std::string &msg) : TException(msg), m_fp(fp) { } diff --git a/toonz/sources/common/timage_io/tlevel_io.cpp b/toonz/sources/common/timage_io/tlevel_io.cpp index 33e498f..f2a4e38 100644 --- a/toonz/sources/common/timage_io/tlevel_io.cpp +++ b/toonz/sources/common/timage_io/tlevel_io.cpp @@ -25,7 +25,7 @@ DEFINE_CLASS_CODE(TLevelWriter, 9) typedef std::pair LevelReaderKey; std::map LevelReaderTable; std::map> LevelWriterTable; -//std::map LevelReaderWriterTable; +//std::map LevelReaderWriterTable; //----------------------------------------------------------- diff --git a/toonz/sources/common/tparam/tcubicbezier.cpp b/toonz/sources/common/tparam/tcubicbezier.cpp index 7486289..533d867 100644 --- a/toonz/sources/common/tparam/tcubicbezier.cpp +++ b/toonz/sources/common/tparam/tcubicbezier.cpp @@ -90,7 +90,7 @@ DVAPI std::pair getMinMaxCubicBezierY(const TPointD &a, return std::pair(TPointD(a.x, a.y), TPointD(b.x, b.y)); else - return pair(TPointD(b.x, b.y), + return std::pair(TPointD(b.x, b.y), TPointD(a.x, a.y)); } else { double discr = bbY * bbY - 4 * aaY * ccY; @@ -99,7 +99,7 @@ DVAPI std::pair getMinMaxCubicBezierY(const TPointD &a, return std::pair(TPointD(a.x, a.y), TPointD(b.x, b.y)); else - return pair(TPointD(b.x, b.y), + return std::pair(TPointD(b.x, b.y), TPointD(a.x, a.y)); } else { double sqrt_discr = sqrt(discr); @@ -119,9 +119,9 @@ DVAPI std::pair getMinMaxCubicBezierY(const TPointD &a, double x_0 = aX * u0 * u0 * u0 + bX * u0 * u0 + cX * u0 + dX; double x_1 = aX * u1 * u1 * u1 + bX * u1 * u1 + cX * u1 + dX; if (y_0 < y_1) - return pair(TPointD(x_0, y_0), TPointD(x_1, y_1)); + return std::pair(TPointD(x_0, y_0), TPointD(x_1, y_1)); else - return pair(TPointD(x_1, y_1), TPointD(x_0, y_0)); + return std::pair(TPointD(x_1, y_1), TPointD(x_0, y_0)); } } } diff --git a/toonz/sources/common/tparam/tdoublekeyframe.cpp b/toonz/sources/common/tparam/tdoublekeyframe.cpp index c3396b0..249f73e 100644 --- a/toonz/sources/common/tparam/tdoublekeyframe.cpp +++ b/toonz/sources/common/tparam/tdoublekeyframe.cpp @@ -16,7 +16,7 @@ TDoubleKeyframe::~TDoubleKeyframe() void TDoubleKeyframe::saveData(TOStream &os) const { - static std::map typeCodes; + static std::map typeCodes; if (typeCodes.empty()) { typeCodes[None] = "n"; typeCodes[Constant] = "C"; @@ -29,7 +29,7 @@ void TDoubleKeyframe::saveData(TOStream &os) const typeCodes[File] = "F"; typeCodes[SimilarShape] = "SimShape"; }; - map attr; + std::map attr; if (!m_linkedHandles) attr["lnk"] = "no"; if (m_step > 1) @@ -47,7 +47,7 @@ void TDoubleKeyframe::saveData(TOStream &os) const os.child("prev") << m_value << m_speedIn.x; break; } - string unitName = m_unitName != "" ? m_unitName : "default"; + std::string unitName = m_unitName != "" ? m_unitName : "default"; switch (m_type) { case Constant: case Exponential: @@ -78,7 +78,7 @@ void TDoubleKeyframe::saveData(TOStream &os) const void TDoubleKeyframe::loadData(TIStream &is) { - static std::map typeCodes; + static std::map typeCodes; if (typeCodes.empty()) { typeCodes["n"] = None; typeCodes["C"] = Constant; @@ -92,17 +92,17 @@ void TDoubleKeyframe::loadData(TIStream &is) typeCodes["SimShape"] = SimilarShape; }; - string tagName; + std::string tagName; if (!is.matchTag(tagName)) return; - std::map::iterator it = + std::map::iterator it = typeCodes.find(tagName); if (it == typeCodes.end()) { throw TException(tagName + " : unexpected tag"); } m_type = it->second; is.getTagParam("step", m_step); - string lnkValue; + std::string lnkValue; if (is.getTagParam("lnk", lnkValue) && lnkValue == "no") m_linkedHandles = false; if (is.matchTag(tagName)) { diff --git a/toonz/sources/common/tparam/tdoubleparamfile.cpp b/toonz/sources/common/tparam/tdoubleparamfile.cpp index 170a84d..8415c36 100644 --- a/toonz/sources/common/tparam/tdoubleparamfile.cpp +++ b/toonz/sources/common/tparam/tdoubleparamfile.cpp @@ -30,7 +30,7 @@ bool parseDouble(double &value, char *&s) s++; } } - string w(t, s - t); + std::string w(t, s - t); value = toDouble(w); return true; } diff --git a/toonz/sources/common/tparam/tnotanimatableparam.cpp b/toonz/sources/common/tparam/tnotanimatableparam.cpp index 86fa65d..a77834c 100644 --- a/toonz/sources/common/tparam/tnotanimatableparam.cpp +++ b/toonz/sources/common/tparam/tnotanimatableparam.cpp @@ -87,7 +87,7 @@ void TFilePathParam::saveData(TOStream &os) //========================================================= void TStringParam::loadData(TIStream &is) { - wstring def, value; + std::wstring def, value; is >> def >> value; setDefaultValue(def); setValue(value, false); @@ -123,7 +123,7 @@ class matchesValue public: matchesValue(T v) : m_v(v) {} - bool operator()(const pair &p) { return m_v == p.first; } + bool operator()(const std::pair &p) { return m_v == p.first; } }; } @@ -132,16 +132,16 @@ public: class TEnumParamImp { public: - vector> m_items; + std::vector> m_items; void copy(std::unique_ptr& src) { m_items.clear(); - std::back_insert_iterator>> bii(m_items); + std::back_insert_iterator>> bii(m_items); std::copy(src->m_items.begin(), src->m_items.end(), bii); } bool checkValue(int v) { - std::vector>::iterator it = + std::vector>::iterator it = std::find_if(m_items.begin(), m_items.end(), matchesValue(v)); return it != m_items.end(); } @@ -149,7 +149,7 @@ public: //--------------------------------------------------------- -TEnumParam::TEnumParam(const int &v, const string &caption) +TEnumParam::TEnumParam(const int &v, const std::string &caption) : TNotAnimatableParam(v), m_imp(new TEnumParamImp()) { addItem(v, caption); @@ -193,7 +193,7 @@ TEnumParam::TEnumParam() void TEnumParam::setValue(int v, bool undoing) { bool valid = false; - std::vector>::iterator it = m_imp->m_items.begin(); + std::vector>::iterator it = m_imp->m_items.begin(); for (; it != m_imp->m_items.end(); ++it) { if (it->first == v) { valid = true; @@ -209,11 +209,11 @@ void TEnumParam::setValue(int v, bool undoing) //--------------------------------------------------------- -void TEnumParam::setValue(const string &caption, bool undoing) +void TEnumParam::setValue(const std::string &caption, bool undoing) { bool valid = false; int v = 0; - std::vector>::iterator it = m_imp->m_items.begin(); + std::vector>::iterator it = m_imp->m_items.begin(); for (; it != m_imp->m_items.end(); ++it) { if (it->second == caption) { v = it->first; @@ -230,7 +230,7 @@ void TEnumParam::setValue(const string &caption, bool undoing) //--------------------------------------------------------- -void TEnumParam::addItem(const int &item, const string &caption) +void TEnumParam::addItem(const int &item, const std::string &caption) { m_imp->m_items.push_back(std::make_pair(item, caption)); } @@ -244,7 +244,7 @@ int TEnumParam::getItemCount() const //--------------------------------------------------------- -void TEnumParam::getItem(int i, int &item, string &caption) const +void TEnumParam::getItem(int i, int &item, std::string &caption) const { assert(i >= 0 && i < m_imp->m_items.size()); item = m_imp->m_items[i].first; diff --git a/toonz/sources/common/tparam/tparamcontainer.cpp b/toonz/sources/common/tparam/tparamcontainer.cpp index d58fa4c..7865e6f 100644 --- a/toonz/sources/common/tparam/tparamcontainer.cpp +++ b/toonz/sources/common/tparam/tparamcontainer.cpp @@ -23,7 +23,7 @@ void TParamVar::setParamObserver(TParamObserver *obs) class TParamContainer::Imp { public: - std::map m_nameTable; + std::map m_nameTable; std::vector m_vars; TParamObserver *m_paramObserver; Imp() : m_paramObserver(0) {} @@ -74,7 +74,7 @@ bool TParamContainer::isParamHidden(int index) const return m_imp->m_vars[index]->isHidden(); } -string TParamContainer::getParamName(int index) const +std::string TParamContainer::getParamName(int index) const { assert(0 <= index && index < getParamCount()); return m_imp->m_vars[index]->getName(); @@ -86,9 +86,9 @@ const TParamVar *TParamContainer::getParamVar(int index) const return m_imp->m_vars[index]; } -TParam *TParamContainer::getParam(string name) const +TParam *TParamContainer::getParam(std::string name) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_imp->m_nameTable.find(name); if (it == m_imp->m_nameTable.end()) return 0; diff --git a/toonz/sources/common/tparam/tparamset.cpp b/toonz/sources/common/tparam/tparamset.cpp index 7d6ef90..7fcfd9c 100644 --- a/toonz/sources/common/tparam/tparamset.cpp +++ b/toonz/sources/common/tparam/tparamset.cpp @@ -37,7 +37,7 @@ double m_lastAffectedFrame; */ namespace { -void doRelease(const pair ¶m) +void doRelease(const std::pair ¶m) { param.first->release(); } @@ -49,7 +49,7 @@ class TParamSetImp : public TParamObserver { friend class TParamSet; TParamSet *m_param; - vector> m_params; + std::vector> m_params; // ChangeBlock *m_changeBlock; bool m_draggingEnabled, m_notificationEnabled; @@ -101,7 +101,7 @@ public: //--------------------------------------------------------- -TParamSet::TParamSet(string name) +TParamSet::TParamSet(std::string name) : TParam(name) , m_imp(new TParamSetImp(this)) { @@ -162,14 +162,14 @@ void TParamSet::beginParameterChange() //assert(!m_imp->m_changeBlock); - vector params; + std::vector params; /* MyBackInsertIterator > > myBackInsertIterator(params); copy(m_imp->m_params.begin(), m_imp->m_params.end(), myIterator); */ - std::vector>::iterator it2 = m_imp->m_params.begin(); + std::vector>::iterator it2 = m_imp->m_params.begin(); for (; it2 != m_imp->m_params.end(); ++it2) params.push_back(it2->first); @@ -201,10 +201,10 @@ m_imp->notify(change); //--------------------------------------------------------- -void TParamSet::addParam(const TParamP ¶m, const string &name) +void TParamSet::addParam(const TParamP ¶m, const std::string &name) { - pair paramToInsert = std::make_pair(param.getPointer(), name); - std::vector>::iterator it = + std::pair paramToInsert = std::make_pair(param.getPointer(), name); + std::vector>::iterator it = std::find(m_imp->m_params.begin(), m_imp->m_params.end(), paramToInsert); if (it == m_imp->m_params.end()) { @@ -220,10 +220,10 @@ void TParamSet::addParam(const TParamP ¶m, const string &name) //--------------------------------------------------------- -void TParamSet::insertParam(const TParamP ¶m, const string &name, int index) +void TParamSet::insertParam(const TParamP ¶m, const std::string &name, int index) { - pair paramToInsert = std::make_pair(param.getPointer(), name); - std::vector>::iterator it = + std::pair paramToInsert = std::make_pair(param.getPointer(), name); + std::vector>::iterator it = std::find(m_imp->m_params.begin(), m_imp->m_params.end(), paramToInsert); if (it == m_imp->m_params.end()) { @@ -249,7 +249,7 @@ class matchesParam public: matchesParam(const TParamP ¶m) : m_param(param) {} - bool operator()(const pair ¶m) + bool operator()(const std::pair ¶m) { return m_param.getPointer() == param.first; } @@ -260,7 +260,7 @@ public: void TParamSet::removeParam(const TParamP ¶m) { - std::vector>::iterator it = + std::vector>::iterator it = std::find_if(m_imp->m_params.begin(), m_imp->m_params.end(), matchesParam(param)); if (it != m_imp->m_params.end()) { param->removeObserver(m_imp); @@ -278,7 +278,7 @@ void TParamSet::removeParam(const TParamP ¶m) void TParamSet::removeAllParam() { while (!m_imp->m_params.empty()) { - std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator it = m_imp->m_params.begin(); TParam *param = it->first; param->removeObserver(m_imp); param->release(); @@ -303,7 +303,7 @@ TParamP TParamSet::getParam(int i) const //--------------------------------------------------------- -string TParamSet::getParamName(int i) const +std::string TParamSet::getParamName(int i) const { assert(i >= 0 && i < (int)m_imp->m_params.size()); return m_imp->m_params[i].second; @@ -311,7 +311,7 @@ string TParamSet::getParamName(int i) const //--------------------------------------------------------- -int TParamSet::getParamIdx(const string &name) const +int TParamSet::getParamIdx(const std::string &name) const { int i, paramsCount = m_imp->m_params.size(); for (i = 0; i < paramsCount; ++i) @@ -323,9 +323,9 @@ int TParamSet::getParamIdx(const string &name) const //--------------------------------------------------------- -void TParamSet::getAnimatableParams(vector ¶ms, bool recursive) +void TParamSet::getAnimatableParams(std::vector ¶ms, bool recursive) { - std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator it = m_imp->m_params.begin(); for (; it != m_imp->m_params.end(); ++it) { TParam *param = it->first; @@ -383,7 +383,7 @@ void TParamSet::removeObserver(TParamObserver *observer) void TParamSet::enableDragging(bool on) { - std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator it = m_imp->m_params.begin(); for (; it != m_imp->m_params.end(); ++it) { TDoubleParamP dparam(it->first); //if (dparam) @@ -414,7 +414,7 @@ void TParamSet::enableNotification(bool on) { // std::for_each(m_imp->m_params.begin(), m_imp->m_params.end(), std::bind2nd(DoEnableNotification, on)); - std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator it = m_imp->m_params.begin(); for (; it != m_imp->m_params.end(); ++it) { it->first->enableNotification(on); } @@ -566,10 +566,10 @@ void TParamSet::copy(TParam *src) void TParamSet::loadData(TIStream &is) { - string tagName; + std::string tagName; is.openChild(tagName); while (!is.eos()) { - string paramName; + std::string paramName; is.openChild(paramName); TPersist *p = 0; is >> p; @@ -586,8 +586,8 @@ void TParamSet::loadData(TIStream &is) void TParamSet::saveData(TOStream &os) { os.openChild(getName()); - std::vector>::iterator it = m_imp->m_params.begin(); - std::vector>::iterator end = m_imp->m_params.end(); + std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator end = m_imp->m_params.end(); while (it != end) { os.openChild(it->second); //it->first->saveData(os); @@ -600,14 +600,14 @@ void TParamSet::saveData(TOStream &os) //--------------------------------------------------------- -string TParamSet::getValueAlias(double frame, int precision) +std::string TParamSet::getValueAlias(double frame, int precision) { - string alias = "("; + std::string alias = "("; - std::vector>::iterator end = m_imp->m_params.begin(); + std::vector>::iterator end = m_imp->m_params.begin(); std::advance(end, m_imp->m_params.size() - 1); - std::vector>::iterator it = m_imp->m_params.begin(); + std::vector>::iterator it = m_imp->m_params.begin(); for (; it != end; ++it) alias += it->first->getValueAlias(frame, precision) + ","; diff --git a/toonz/sources/common/tparam/tpixelparam.cpp b/toonz/sources/common/tparam/tpixelparam.cpp index 21bae5c..bff017f 100644 --- a/toonz/sources/common/tparam/tpixelparam.cpp +++ b/toonz/sources/common/tparam/tpixelparam.cpp @@ -34,7 +34,7 @@ TPixelParam::TPixelParam(const TPixel32 &p) addParam(m_data->m_g, "Green"); addParam(m_data->m_b, "Blue"); addParam(m_data->m_m, "Alpha"); - string measureName("colorChannel"); + std::string measureName("colorChannel"); m_data->m_r->setMeasureName(measureName); m_data->m_g->setMeasureName(measureName); m_data->m_b->setMeasureName(measureName); @@ -50,7 +50,7 @@ TPixelParam::TPixelParam(const TPixelParam &src) addParam(m_data->m_g, "Green"); addParam(m_data->m_b, "Blue"); addParam(m_data->m_m, "Alpha"); - string measureName("colorChannel"); + std::string measureName("colorChannel"); m_data->m_r->setMeasureName(measureName); m_data->m_g->setMeasureName(measureName); m_data->m_b->setMeasureName(measureName); @@ -69,7 +69,7 @@ void TPixelParam::copy(TParam *src) m_data->m_g->copy(p->m_data->m_g.getPointer()); m_data->m_b->copy(p->m_data->m_b.getPointer()); m_data->m_m->copy(p->m_data->m_m.getPointer()); - string measureName("colorChannel"); + std::string measureName("colorChannel"); m_data->m_r->setMeasureName(measureName); m_data->m_g->setMeasureName(measureName); @@ -167,7 +167,7 @@ bool TPixelParam::setValue64(double frame, const TPixel64 &pix) void TPixelParam::loadData(TIStream &is) { - string childName; + std::string childName; while (is.openChild(childName)) { if (childName == "red") m_data->m_r->loadData(is); diff --git a/toonz/sources/common/tparam/tpointparam.cpp b/toonz/sources/common/tparam/tpointparam.cpp index 0055b71..03b7abd 100644 --- a/toonz/sources/common/tparam/tpointparam.cpp +++ b/toonz/sources/common/tparam/tpointparam.cpp @@ -99,7 +99,7 @@ void TPointParam::setDefaultValue(const TPointD &p) void TPointParam::loadData(TIStream &is) { - string childName; + std::string childName; while (is.openChild(childName)) { if (childName == "x") m_data->m_x->loadData(is); diff --git a/toonz/sources/common/tparam/trangeparam.cpp b/toonz/sources/common/tparam/trangeparam.cpp index 7f3a637..7faaa45 100644 --- a/toonz/sources/common/tparam/trangeparam.cpp +++ b/toonz/sources/common/tparam/trangeparam.cpp @@ -100,7 +100,7 @@ void TRangeParam::setDefaultValue(const DoublePair &v) void TRangeParam::loadData(TIStream &is) { - string childName; + std::string childName; while (is.openChild(childName)) { if (childName == "min") m_data->m_min->loadData(is); diff --git a/toonz/sources/common/tparam/tspectrumparam.cpp b/toonz/sources/common/tparam/tspectrumparam.cpp index ee65526..b8b2262 100644 --- a/toonz/sources/common/tparam/tspectrumparam.cpp +++ b/toonz/sources/common/tparam/tspectrumparam.cpp @@ -13,7 +13,7 @@ #include "tspectrumparam.h" -typedef pair ColorKeyParam; +typedef std::pair ColorKeyParam; //========================================================= @@ -400,7 +400,7 @@ void TSpectrumParam::loadData(TIStream &is) { assert(m_imp); m_imp->clearKeys(); - string tagName; + std::string tagName; is.openChild(tagName); assert(tagName == "spectrum"); while (!is.eos()) { @@ -463,9 +463,9 @@ bool TSpectrumParam::isNotificationEnabled() const namespace { -inline string toString(const TPixel32 &color) +inline std::string toString(const TPixel32 &color) { - string alias = "("; + std::string alias = "("; alias += ::toString(color.r) + ","; alias += ::toString(color.g) + ","; alias += ::toString(color.b) + ","; @@ -474,9 +474,9 @@ inline string toString(const TPixel32 &color) return alias; } -inline string toString(const TSpectrum::ColorKey &key, int precision) +inline std::string toString(const TSpectrum::ColorKey &key, int precision) { - string alias = "("; + std::string alias = "("; alias += ::toString(key.first, precision) + ","; alias += toString(key.second); alias += ")"; @@ -485,7 +485,7 @@ inline string toString(const TSpectrum::ColorKey &key, int precision) } // namespace -string TSpectrumParam::getValueAlias(double frame, int precision) +std::string TSpectrumParam::getValueAlias(double frame, int precision) { std::vector keys; int keyCount = m_imp->getKeyCount(); @@ -497,7 +497,7 @@ string TSpectrumParam::getValueAlias(double frame, int precision) keys.push_back(key); } - string alias = "("; + std::string alias = "("; if (!keys.empty()) { std::vector::iterator it = keys.begin(); diff --git a/toonz/sources/common/tparam/ttonecurveparam.cpp b/toonz/sources/common/tparam/ttonecurveparam.cpp index f1aee47..5990cd2 100644 --- a/toonz/sources/common/tparam/ttonecurveparam.cpp +++ b/toonz/sources/common/tparam/ttonecurveparam.cpp @@ -239,7 +239,7 @@ void TToneCurveParam::setDefaultValue(const QList &value) //--------------------------------------------------------- -string TToneCurveParam::getValueAlias(double frame, int precision) +std::string TToneCurveParam::getValueAlias(double frame, int precision) { return getCurrentParamSet()->getValueAlias(frame, precision) + m_isLinear->getValueAlias(frame, precision); } @@ -357,7 +357,7 @@ double TToneCurveParam::keyframeIndexToFrame(int index) const void TToneCurveParam::loadData(TIStream &is) { - string tagName; + std::string tagName; is.openChild(tagName); assert(tagName == "tonecurve"); m_rgbaParamSet->removeAllParam(); diff --git a/toonz/sources/common/tproperty.cpp b/toonz/sources/common/tproperty.cpp index 4a87d7e..8320d1e 100644 --- a/toonz/sources/common/tproperty.cpp +++ b/toonz/sources/common/tproperty.cpp @@ -54,7 +54,7 @@ TPropertyGroup *TPropertyGroup::clone() const void TPropertyGroup::add(TProperty *p) { - string name = p->getName(); + std::string name = p->getName(); assert(m_table.find(name) == m_table.end()); m_properties.push_back(std::make_pair(p, true)); m_table[name] = p; @@ -62,13 +62,13 @@ void TPropertyGroup::add(TProperty *p) void TPropertyGroup::bind(TProperty &p) { - string name = p.getName(); + std::string name = p.getName(); assert(m_table.find(name) == m_table.end()); m_properties.push_back(std::make_pair(&p, false)); m_table[name] = &p; } -TProperty *TPropertyGroup::getProperty(string name) +TProperty *TPropertyGroup::getProperty(std::string name) { PropertyTable::iterator i = m_table.find(name); if (i == m_table.end()) @@ -134,7 +134,7 @@ public: void visit(TDoubleProperty *p) { - std::map attr; + std::map attr; attr["type"] = "double"; attr["name"] = p->getName(); attr["min"] = toString(p->getRange().first); @@ -144,7 +144,7 @@ public: } void visit(TDoublePairProperty *p) { - std::map attr; + std::map attr; attr["type"] = "pair"; attr["name"] = p->getName(); attr["min"] = toString(p->getRange().first); @@ -155,7 +155,7 @@ public: } void visit(TIntPairProperty *p) { - std::map attr; + std::map attr; attr["type"] = "pair"; attr["name"] = p->getName(); attr["min"] = toString(p->getRange().first); @@ -166,7 +166,7 @@ public: } void visit(TIntProperty *p) { - std::map attr; + std::map attr; attr["type"] = "int"; attr["name"] = p->getName(); attr["min"] = toString(p->getRange().first); @@ -176,7 +176,7 @@ public: } void visit(TBoolProperty *p) { - std::map attr; + std::map attr; attr["type"] = "bool"; attr["name"] = p->getName(); attr["value"] = p->getValue() ? "true" : "false"; @@ -184,7 +184,7 @@ public: } void visit(TStringProperty *p) { - std::map attr; + std::map attr; attr["type"] = "string"; attr["name"] = p->getName(); attr["value"] = toString(p->getValue()); @@ -193,7 +193,7 @@ public: void visit(TStyleIndexProperty *p) { - std::map attr; + std::map attr; attr["type"] = "string"; attr["name"] = p->getName(); attr["value"] = p->getValueAsString(); @@ -202,13 +202,13 @@ public: void visit(TEnumProperty *p) { - std::map attr; + std::map attr; attr["type"] = "enum"; attr["name"] = p->getName(); attr["value"] = toString(p->getValue()); if (TEnumProperty::isRangeSavingEnabled()) { m_os.openChild("property", attr); - std::vector range = p->getRange(); + std::vector range = p->getRange(); for (int i = 0; i < (int)range.size(); i++) { attr.clear(); attr["value"] = toString(range[i]); @@ -220,7 +220,7 @@ public: } void visit(TPointerProperty *p) { - std::map attr; + std::map attr; attr["type"] = "pointer"; attr["name"] = p->getName(); attr["value"] = p->getValueAsString(); @@ -236,12 +236,12 @@ void TPropertyGroup::loadData(TIStream &is) delete it->first; m_properties.clear(); m_table.clear(); - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "property") { - string name = is.getTagAttribute("name"); - string type = is.getTagAttribute("type"); - string svalue = is.getTagAttribute("value"); + std::string name = is.getTagAttribute("name"); + std::string type = is.getTagAttribute("type"); + std::string svalue = is.getTagAttribute("value"); if (name == "") throw TException("missing property name"); if (type == "") @@ -258,7 +258,7 @@ void TPropertyGroup::loadData(TIStream &is) double max = toDouble(is.getTagAttribute("max")); TDoublePairProperty::Value v(0, 0); int i = svalue.find(' '); - if (i != (int)string::npos) { + if (i != (int)std::string::npos) { v.first = toDouble(svalue.substr(0, i)); v.second = toDouble(svalue.substr(i + 1)); } @@ -280,7 +280,7 @@ void TPropertyGroup::loadData(TIStream &is) else { while (is.matchTag(tagName)) { if (tagName == "item") { - string item = is.getTagAttribute("value"); + std::string item = is.getTagAttribute("value"); p->addValue(toWideString(item)); } else throw TException("expected range property "); diff --git a/toonz/sources/common/trasterimage/tcodec.cpp b/toonz/sources/common/trasterimage/tcodec.cpp index 437a583..49fc220 100644 --- a/toonz/sources/common/trasterimage/tcodec.cpp +++ b/toonz/sources/common/trasterimage/tcodec.cpp @@ -143,7 +143,7 @@ int Header::getRasterSize() const // TRasterCodecSnappy //------------------------------------------------------------------------------ -/*TRasterCodecSnappy::TRasterCodecSnappy(const string &name, bool useCache) +/*TRasterCodecSnappy::TRasterCodecSnappy(const std::string &name, bool useCache) : TRasterCodec(name) , m_raster() , m_useCache(useCache) @@ -380,7 +380,7 @@ bool lz4decompress(LZ4F_decompressionContext_t lz4dctx, } } // namespace -TRasterCodecLz4::TRasterCodecLz4(const string &name, bool useCache) +TRasterCodecLz4::TRasterCodecLz4(const std::string &name, bool useCache) : TRasterCodec(name), m_raster(), m_useCache(useCache), m_cacheId("") { } @@ -616,7 +616,7 @@ bool lzoDecompress(const QByteArray src, int dstSize, QByteArray &dst) //------------------------------------------------------------------------------ -TRasterCodecLZO::TRasterCodecLZO(const string &name, bool useCache) +TRasterCodecLZO::TRasterCodecLZO(const std::string &name, bool useCache) : TRasterCodec(name), m_raster(), m_useCache(useCache), m_cacheId("") { } diff --git a/toonz/sources/common/trop/quickput.cpp b/toonz/sources/common/trop/quickput.cpp index af70c07..8fec906 100644 --- a/toonz/sources/common/trop/quickput.cpp +++ b/toonz/sources/common/trop/quickput.cpp @@ -3061,7 +3061,7 @@ void doQuickPutCmapped( int dnWrap = dn->getWrap(); int upWrap = up->getWrap(); - vector colors(palette->getStyleCount()); + std::vector colors(palette->getStyleCount()); //vector inks(palette->getStyleCount()); if (globalColorScale != TPixel::Black) @@ -3303,8 +3303,8 @@ void doQuickPutCmapped( int lyPred = up->getLy() * (1 << PADN) - 1; int dnWrap = dn->getWrap(); int upWrap = up->getWrap(); - vector paints(palette->getStyleCount()); - vector inks(palette->getStyleCount()); + std::vector paints(palette->getStyleCount()); + std::vector inks(palette->getStyleCount()); if (s.m_transparencyCheck) for (int i = 0; i < palette->getStyleCount(); i++) { @@ -3622,8 +3622,8 @@ void doQuickPutCmapped( int count = tmax(palette->getStyleCount(), TPixelCM32::getMaxInk(), TPixelCM32::getMaxPaint()); - vector paints(count, TPixel32::Red); - vector inks(count, TPixel32::Red); + std::vector paints(count, TPixel32::Red); + std::vector inks(count, TPixel32::Red); if (globalColorScale != TPixel::Black) for (int i = 0; i < palette->getStyleCount(); i++) paints[i] = inks[i] = applyColorScaleCMapped(palette->getStyle(i)->getAverageColor(), globalColorScale); @@ -3721,8 +3721,8 @@ void doQuickResampleColorFilter( return; const int PADN = 16; - vector paints(plt->getStyleCount()); - vector inks(plt->getStyleCount()); + std::vector paints(plt->getStyleCount()); + std::vector inks(plt->getStyleCount()); for (int i = 0; i < plt->getStyleCount(); i++) paints[i] = inks[i] = ::premultiply(plt->getStyle(i)->getAverageColor()); diff --git a/toonz/sources/common/trop/tconvolve.cpp b/toonz/sources/common/trop/tconvolve.cpp index 4758b53..e6dacd7 100644 --- a/toonz/sources/common/trop/tconvolve.cpp +++ b/toonz/sources/common/trop/tconvolve.cpp @@ -80,8 +80,8 @@ void doConvolve_row_9_i(PIXOUT *pixout, int n, PIXIN *pixarr[], long w[]) template void doConvolve_cm32_row_9_i(PIXOUT *pixout, int n, TPixelCM32 *pixarr[], long w[], - const vector &paints, - const vector &inks) + const std::vector &paints, + const std::vector &inks) { long w1, w2, w3, w4, w5, w6, w7, w8, w9; TPixelCM32 *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9; @@ -181,8 +181,8 @@ void doConvolve_row_i(PIXOUT *pixout, int n, template void doConvolve_cm32_row_i(PIXOUT *pixout, int n, TPixelCM32 *pixarr[], long w[], int pixn, - const vector &paints, - const vector &inks) + const std::vector &paints, + const std::vector &inks) { long ar, ag, ab, am; int i; diff --git a/toonz/sources/common/trop/trop.cpp b/toonz/sources/common/trop/trop.cpp index cc1c263..591e675 100644 --- a/toonz/sources/common/trop/trop.cpp +++ b/toonz/sources/common/trop/trop.cpp @@ -126,7 +126,7 @@ class Gamma_Lut { public: - vector m_table; + std::vector m_table; Gamma_Lut(int insteps, int outsteps, double gamma) { double inspace = (double)(insteps); diff --git a/toonz/sources/common/trop/tropcm.cpp b/toonz/sources/common/trop/tropcm.cpp index f7c6911..0edf20b 100644 --- a/toonz/sources/common/trop/tropcm.cpp +++ b/toonz/sources/common/trop/tropcm.cpp @@ -438,7 +438,7 @@ TRasterP putSingleInkInRasterRGBM(TRasterCM32P &rasIn, int inkId) //filename!! //interactive!! -bool computePaletteFx(const vector> &fx, +bool computePaletteFx(const std::vector> &fx, const TTile &tileOut, const TTile &tileIn, const TPaletteP plt) { int i; @@ -448,8 +448,8 @@ bool computePaletteFx(const vector> &fx, int frame = plt->getFrame(); - vector paintLayers(fx.size()); - vector inkLayers(fx.size()); + std::vector paintLayers(fx.size()); + std::vector inkLayers(fx.size()); //tolgo dal raster d'ingresso gli ink e i paint con gli effetti, mettendoli in dei raster layer for (i = 0; i < (int)fx.size(); i++) { @@ -514,11 +514,11 @@ bool renderRas32(const TTile &tileOut, const TTile &tileIn, const TPaletteP pale /* mark up are made apart */ //computeMarkup(rasIn, palette); - vector> fxArray; + std::vector> fxArray; for (int i = 0; i < palette->getStyleCount(); i++) if (palette->getStyle(i)->isRasterStyle()) - fxArray.push_back(pair(palette->getStyle(i), i)); + fxArray.push_back(std::pair(palette->getStyle(i), i)); if (fxArray.empty()) return false; @@ -732,7 +732,7 @@ void TRop::eraseColors(TRasterCM32P ras, vector &colorIds, bool eraseInks, /*------------------------------------------------------------------------*/ -void TRop::eraseColors(TRasterCM32P ras, vector *colorIds, bool eraseInks) +void TRop::eraseColors(TRasterCM32P ras, std::vector *colorIds, bool eraseInks) { if (colorIds) std::sort(colorIds->begin(), colorIds->end()); @@ -783,7 +783,7 @@ void TRop::applyMatchLines(TRasterCM32P rasOut, const TRasterCM32P &rasUp, const /*------------------------------------------------------------------------*/ -void TRop::eraseStyleIds(TToonzImage *image, const vector styleIds) +void TRop::eraseStyleIds(TToonzImage *image, const std::vector styleIds) { assert(image); TRasterCM32P ras = image->getRaster(); diff --git a/toonz/sources/common/tsound/tsound.cpp b/toonz/sources/common/tsound/tsound.cpp index c95addc..442840a 100644 --- a/toonz/sources/common/tsound/tsound.cpp +++ b/toonz/sources/common/tsound/tsound.cpp @@ -119,7 +119,7 @@ TSoundTrackP TSoundTrack::create( break; default: - string s; + std::string s; s = "Type " + toString((int)sampleRate) + " Hz " + toString(bitPerSample) + " bits "; if (channelCount == 1) s += "mono: "; @@ -184,7 +184,7 @@ TSoundTrackP TSoundTrack::create( break; default: - string s; + std::string s; s = "Type " + toString((int)sampleRate) + " Hz " + toString(bitPerSample) + " bits "; if (channelCount == 1) s += "mono: "; diff --git a/toonz/sources/common/tsound/tsound_nt.cpp b/toonz/sources/common/tsound/tsound_nt.cpp index bcdb147..bfcbe95 100644 --- a/toonz/sources/common/tsound/tsound_nt.cpp +++ b/toonz/sources/common/tsound/tsound_nt.cpp @@ -1139,8 +1139,8 @@ public: #ifndef TNZCORE_LIGHT TThread::Executor m_executor; #endif - vector m_whdr; - vector m_recordedBlocks; + std::vector m_whdr; + std::vector m_recordedBlocks; std::set m_supportedRate; HANDLE m_hLastBlockDone; @@ -2062,7 +2062,7 @@ MMRESULT getControlDetails(HMIXEROBJ hMixer, //------------------------------------------------------------------------------ // restituiscei l nome della linea identificata da lineID -string getMixerLineName(DWORD lineID) +std::string getMixerLineName(DWORD lineID) { MIXERLINE mxl; MMRESULT ret; @@ -2072,7 +2072,7 @@ string getMixerLineName(DWORD lineID) assert(false); return ""; #else - return string(mxl.szName); + return std::string(mxl.szName); #endif } @@ -2080,9 +2080,9 @@ string getMixerLineName(DWORD lineID) // restituisce la lista degli identificativi delle linee sorgente associate // alla destinazione di tipo dstComponentType -list getMixerSrcLines(DWORD dstComponentType) +std::list getMixerSrcLines(DWORD dstComponentType) { - list srcList; + std::list srcList; MMRESULT ret; MIXERLINE mxl; @@ -2106,9 +2106,9 @@ list getMixerSrcLines(DWORD dstComponentType) // restituisce la lista degli identificativi delle linee sorgente di tipo // srcComponentType associate alla destinazione di tipo dstComponentType -list getMixerSrcLines(DWORD dstComponentType, DWORD srcComponentType) +std::list getMixerSrcLines(DWORD dstComponentType, DWORD srcComponentType) { - list srcList; + std::list srcList; MMRESULT ret; MIXERLINE mxl; diff --git a/toonz/sources/common/tstream/tstream.cpp b/toonz/sources/common/tstream/tstream.cpp index ae5a30b..67317d2 100644 --- a/toonz/sources/common/tstream/tstream.cpp +++ b/toonz/sources/common/tstream/tstream.cpp @@ -38,7 +38,7 @@ string escape(string v) //=============================================================== -void writeCompressedFile(TFilePath dst, const string &str) +void writeCompressedFile(TFilePath dst, const std::string &str) { } @@ -128,7 +128,7 @@ class StreamTag { public: string m_name; - std::map m_attributes; + std::map m_attributes; enum Type { BeginTag, EndTag, BeginEndTag }; @@ -156,7 +156,7 @@ public: break; } cout << endl; - std::map::iterator it; + std::map::iterator it; for (it = m_attributes.begin(); it != m_attributes.end(); ++it) { cout << " '" << it->first << "' = '" << it->second << "'" << endl; } @@ -167,7 +167,7 @@ public: class TPersistFactory { - typedef std::map Table; + typedef std::map Table; static TPersistFactory *m_factory; Table m_table; TPersistFactory() {} @@ -201,7 +201,7 @@ TPersistFactory *TPersistFactory::m_factory = 0; //-------------------------------- -TPersistDeclaration::TPersistDeclaration(const string &id) +TPersistDeclaration::TPersistDeclaration(const std::string &id) : m_id(id) { TPersistFactory::instance()->add(id, this); @@ -209,7 +209,7 @@ TPersistDeclaration::TPersistDeclaration(const string &id) //=============================================================== -TPersist *TPersist::create(const string &name) +TPersist *TPersist::create(const std::string &name) { return TPersistFactory::instance()->create(name); } @@ -224,7 +224,7 @@ public: bool m_compressed; ostrstream m_ostrstream; - vector m_tagStack; + vector m_tagStack; int m_tab; bool m_justStarted; typedef map PersistTable; @@ -426,7 +426,7 @@ TOStream &TOStream::operator<<(QString _v) //--------------------------------------------------------------- -TOStream &TOStream::operator<<(wstring v) +TOStream &TOStream::operator<<(std::wstring v) { return operator<<(toString(v)); /* @@ -536,14 +536,14 @@ void TOStream::openChild(string tagName) //--------------------------------------------------------------- -void TOStream::openChild(string tagName, const map &attributes) +void TOStream::openChild(string tagName, const map &attributes) { assert(tagName != ""); m_imp->m_tagStack.push_back(tagName); if (m_imp->m_justStarted == false) cr(); *(m_imp->m_os) << "<" << m_imp->m_tagStack.back(); - for (std::map::const_iterator it = attributes.begin(); + for (std::map::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { *(m_imp->m_os) << " " << it->first << "=\"" << escape(it->second) << "\""; @@ -573,14 +573,14 @@ void TOStream::closeChild() //--------------------------------------------------------------- -void TOStream::openCloseChild(string tagName, const map &attributes) +void TOStream::openCloseChild(string tagName, const map &attributes) { assert(tagName != ""); // m_imp->m_tagStack.push_back(tagName); if (m_imp->m_justStarted == false) cr(); *(m_imp->m_os) << "<" << tagName; - for (std::map::const_iterator it = attributes.begin(); + for (std::map::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { *(m_imp->m_os) << " " << it->first << "=\"" << escape(it->second) << "\""; @@ -647,7 +647,7 @@ public: string m_strbuffer; bool m_compressed; - vector m_tagStack; + vector m_tagStack; typedef map PersistTable; PersistTable m_table; @@ -1015,7 +1015,7 @@ TIStream &TIStream::operator>>(double &v) } //--------------------------------------------------------------- -TIStream &TIStream::operator>>(wstring &v) +TIStream &TIStream::operator>>(std::wstring &v) { string s; operator>>(s); @@ -1236,7 +1236,7 @@ TIStream &TIStream::operator>>(TPersist *&v) StreamTag tag = m_imp->m_currentTag; m_imp->m_currentTag = StreamTag(); string tagName = tag.m_name; - std::map::iterator it; + std::map::iterator it; int id = -1; it = tag.m_attributes.find("id"); if (it != tag.m_attributes.end()) @@ -1316,7 +1316,7 @@ bool TIStream::matchTag(string &tagName) string TIStream::getTagAttribute(string name) const { StreamTag &tag = m_imp->m_currentTag; - std::map::const_iterator it = tag.m_attributes.find(name); + std::map::const_iterator it = tag.m_attributes.find(name); if (it == tag.m_attributes.end()) return ""; else @@ -1330,7 +1330,7 @@ bool TIStream::getTagParam(string paramName, string &value) if (m_imp->m_tagStack.empty()) return false; StreamTag &tag = m_imp->m_currentTag; - std::map::const_iterator it = tag.m_attributes.find(paramName); + std::map::const_iterator it = tag.m_attributes.find(paramName); if (it == tag.m_attributes.end()) return false; value = it->second; diff --git a/toonz/sources/common/tstream/tstreamexception.cpp b/toonz/sources/common/tstream/tstreamexception.cpp index 3337cad..644768c 100644 --- a/toonz/sources/common/tstream/tstreamexception.cpp +++ b/toonz/sources/common/tstream/tstreamexception.cpp @@ -8,19 +8,19 @@ namespace { -wstring getLocation(TIStream &is) + std::wstring getLocation(TIStream &is) { return L"File: " + is.getFilePath().getWideString() + L":" + toWideString(is.getLine()); } -wstring message(TIStream &is, wstring msg) +std::wstring message(TIStream &is, std::wstring msg) { return getLocation(is) + L"\n" + msg; } -wstring message(TIStream &is, string msg) +std::wstring message(TIStream &is, std::string msg) { return message(is, toWideString(msg)); } @@ -37,12 +37,12 @@ TIStreamException::TIStreamException(TIStream &is, const TException &e) { } -TIStreamException::TIStreamException(TIStream &is, wstring msg) +TIStreamException::TIStreamException(TIStream &is, std::wstring msg) : TException(message(is, msg)) { } -TIStreamException::TIStreamException(TIStream &is, string msg) +TIStreamException::TIStreamException(TIStream &is, std::string msg) : TException(message(is, msg)) { } diff --git a/toonz/sources/common/tsystem/tbigmemorymanager.cpp b/toonz/sources/common/tsystem/tbigmemorymanager.cpp index 8cd31a1..c8f8e1a 100644 --- a/toonz/sources/common/tsystem/tbigmemorymanager.cpp +++ b/toonz/sources/common/tsystem/tbigmemorymanager.cpp @@ -25,7 +25,7 @@ class Chunkinfo public: TUINT32 m_size; //int m_locks; - vector m_rasters; + std::vector m_rasters; //bool m_putInNormalMemory; Chunkinfo(TUINT32 size, TRaster *ras) //, bool putInNormalMemory=false) : m_size(size) @@ -203,7 +203,7 @@ UCHAR *TBigMemoryManager::getBuffer(UINT size) if (m_theMemory == 0) return (UCHAR *)calloc(size, 1); - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); UCHAR *buffer = m_theMemory; TUINT32 chunkSize = 0; UCHAR *address = 0; @@ -333,7 +333,7 @@ if (m_availableMemorym_parent) }*/ if (ras->m_parent) { - map::iterator it = m_chunks.find(ras->m_parent->m_buffer); + std::map::iterator it = m_chunks.find(ras->m_parent->m_buffer); if (it != m_chunks.end()) { @@ -406,7 +406,7 @@ TRaster *TBigMemoryManager::findRaster(TRaster *ras) { //return 0; - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); while (it != m_chunks.end()) { for (UINT i = 0; i < it->second.m_rasters.size(); i++) if (it->second.m_rasters[i] == ras) @@ -421,7 +421,7 @@ TRaster *TBigMemoryManager::findRaster(TRaster *ras) void TBigMemoryManager::printMap() { - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); TSystem::outputDebug("BIGMEMORY chunks totali: " + toString((int)m_chunks.size()) + "\n"); int count = 0; @@ -445,7 +445,7 @@ bool TBigMemoryManager::releaseRaster(TRaster *ras) { TThread::MutexLocker sl(&m_mutex); UCHAR *buffer = (ras->m_parent) ? (ras->m_parent->m_buffer) : (ras->m_buffer); - map::iterator it = m_chunks.find(buffer); + std::map::iterator it = m_chunks.find(buffer); if (m_theMemory == 0 || it == m_chunks.end()) { assert(buffer); @@ -466,7 +466,7 @@ bool TBigMemoryManager::releaseRaster(TRaster *ras) if (it->second.m_rasters.size() > 1) //non e' il solo raster ad usare il buffer; non libero { - vector::iterator it2 = it->second.m_rasters.begin(); + std::vector::iterator it2 = it->second.m_rasters.begin(); for (; it2 != it->second.m_rasters.end(); ++it2) { if (ras == *it2) { it->second.m_rasters.erase(it2); @@ -510,7 +510,7 @@ void TBigMemoryManager::checkConsistency() int count = 0; //int size = m_chunks.size(); - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); UCHAR *endAddress = m_theMemory; TUINT32 freeMem = 0, allocMem = 0; @@ -553,7 +553,7 @@ void TBigMemoryManager::checkConsistency() //------------------------------------------------------------------------------ -map::iterator TBigMemoryManager::shiftBlock(const map::iterator &it, TUINT32 offset) +std::map::iterator TBigMemoryManager::shiftBlock(const std::map::iterator &it, TUINT32 offset) { UCHAR *newAddress = it->first - offset; @@ -563,7 +563,7 @@ map::iterator TBigMemoryManager::shiftBlock(const mapfirst, it->second.m_size); //se overlappano. m_chunks[newAddress] = Chunkinfo(it->second.m_size, it->second.m_rasters[0]); - map::iterator it1 = m_chunks.find(newAddress); + std::map::iterator it1 = m_chunks.find(newAddress); assert(it1->first < it1->second.m_rasters[0]->m_buffer); UINT i = 0; @@ -611,7 +611,7 @@ UCHAR *TBigMemoryManager::remap(TUINT32 size) //size==0 -> remappo tutto checkConsistency(); #endif UINT i; - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); try { UCHAR *buffer = m_theMemory; @@ -625,7 +625,7 @@ UCHAR *TBigMemoryManager::remap(TUINT32 size) //size==0 -> remappo tutto return buffer + chunkSize; else if (gap > 0 && it->second.m_size > 0) //c'e' un frammento di memoria, accorpo; ma solo se non sto in fondo { - vector &rasters = it->second.m_rasters; + std::vector &rasters = it->second.m_rasters; assert(rasters[0]->m_parent == 0); //devo controllare il lockCount solo sul parent, la funzione lock() locka solo il parent; @@ -674,7 +674,7 @@ void TBigMemoryManager::printLog(TUINT32 size) os << "memoria richiesta: " << size / 1024 << " KB\n"; os << "memoria libera: " << m_availableMemory / 1024 << " KB\n\n\n"; - map::iterator it = m_chunks.begin(); + std::map::iterator it = m_chunks.begin(); UCHAR *buffer = m_theMemory; UINT chunkSize = 0; for (; it != m_chunks.end(); it++) { diff --git a/toonz/sources/common/tsystem/tfilepath.cpp b/toonz/sources/common/tsystem/tfilepath.cpp index df7705b..f48dedd 100644 --- a/toonz/sources/common/tsystem/tfilepath.cpp +++ b/toonz/sources/common/tsystem/tfilepath.cpp @@ -44,14 +44,14 @@ bool isNumbers(std::wstring str, int fromSeg, int toSeg) }; //TFrameId::operator string() const -string TFrameId::expand(FrameFormat format) const +std::string TFrameId::expand(FrameFormat format) const { if (m_frame == EMPTY_FRAME) return ""; else if (m_frame == NO_FRAME) return "-"; char buffer[80]; - ostrstream o_buff(buffer, sizeof(buffer)); + std::ostrstream o_buff(buffer, sizeof(buffer)); if (format == FOUR_ZEROS || format == UNDERSCORE_FOUR_ZEROS) { o_buff.fill('0'); o_buff.width(4); @@ -63,7 +63,7 @@ string TFrameId::expand(FrameFormat format) const if (m_letter != '\0') o_buff << m_letter; int len = o_buff.pcount(); - return string(buffer, len); + return std::string(buffer, len); } //------------------------------------------------------------------- @@ -104,7 +104,7 @@ inline bool isSlash(wchar_t c) // cerca l'ultimo '/' o '\'. Se non c'e' ritorna -1 // di modo che la sottostringa che parte da getLastSlash() + 1 e' nome.frame.tipo -inline int getLastSlash(const wstring &path) +inline int getLastSlash(const std::wstring &path) { int i; for (i = path.length() - 1; i >= 0 && !isSlash(path[i]); i--) { @@ -264,7 +264,7 @@ TFilePath::TFilePath(const char *path) //----------------------------------------------------------------------------- -TFilePath::TFilePath(const string &path) +TFilePath::TFilePath(const std::string &path) { setPath(toWideString(path)); } @@ -298,8 +298,8 @@ bool TFilePath::operator==(const TFilePath &fp) const bool TFilePath::operator<(const TFilePath &fp) const { - wstring iName = m_path; - wstring jName = fp.m_path; + std::wstring iName = m_path; + std::wstring jName = fp.m_path; int i1 = 0, j1 = 0; int i2 = m_path.find(L"\\"); int j2 = fp.m_path.find(L"\\"); @@ -412,7 +412,7 @@ TFilePath &TFilePath::operator+=(const std::wstring &s) //----------------------------------------------------------------------------- -const wstring TFilePath::getWideString() const +const std::wstring TFilePath::getWideString() const { return m_path; /* @@ -468,9 +468,9 @@ QString TFilePath::getQString() const //----------------------------------------------------------------------------- -ostream &operator<<(ostream &out, const TFilePath &path) +std::ostream &operator<<(std::ostream &out, const TFilePath &path) { - wstring w = path.getWideString(); + std::wstring w = path.getWideString(); return out << toString(w) << " "; // string w = path.getString(); // return out << w << " "; @@ -504,27 +504,27 @@ bool TFilePath::isRoot() const { return m_path.length() == 1 && m_path[0] == slash || m_path.length() == 3 && iswalpha(m_path[0]) && m_path[1] == ':' && m_path[2] == slash || - m_path.length() > 2 && m_path[0] == slash && m_path[1] == slash && (string::npos == m_path.find(slash, 2) || m_path.find(slash, 2) == m_path.size() - 1); + m_path.length() > 2 && m_path[0] == slash && m_path[1] == slash && (std::string::npos == m_path.find(slash, 2) || m_path.find(slash, 2) == m_path.size() - 1); } //----------------------------------------------------------------------------- // ritorna ""(niente tipo, niente punto), "." (file con tipo) o ".." (file con tipo e frame) -string TFilePath::getDots() const +std::string TFilePath::getDots() const { int i = getLastSlash(m_path); - wstring str = m_path.substr(i + 1); + std::wstring str = m_path.substr(i + 1); // potrei anche avere a.b.c.d dove d e' l'estensione i = str.rfind(L"."); - if (i == (int)wstring::npos || str == L"..") + if (i == (int)std::wstring::npos || str == L"..") return ""; - if (str.substr(0, i).rfind(L".") != wstring::npos) + if (str.substr(0, i).rfind(L".") != std::wstring::npos) return ".."; else if (m_underscoreFormatAllowed) { int j = str.substr(0, i).rfind(L"_"); /*-- j == i-1は、フレーム番号を抜いて"A_.tga"のような場合の条件 --*/ - return (j != (int)wstring::npos && + return (j != (int)std::wstring::npos && (j == i - 1 || isNumbers(str, j, i))) ? ".." : "."; @@ -534,12 +534,12 @@ string TFilePath::getDots() const //----------------------------------------------------------------------------- -string TFilePath::getDottedType() const // ritorna l'estensione con PUNTO (se c'e') +std::string TFilePath::getDottedType() const // ritorna l'estensione con PUNTO (se c'e') { int i = getLastSlash(m_path); - wstring str = m_path.substr(i + 1); + std::wstring str = m_path.substr(i + 1); i = str.rfind(L"."); - if (i == (int)wstring::npos) + if (i == (int)std::wstring::npos) return ""; return toLower(toString(str.substr(i))); @@ -547,31 +547,31 @@ string TFilePath::getDottedType() const // ritorna l'estensione con PUNTO (se c' //----------------------------------------------------------------------------- -string TFilePath::getUndottedType() const // ritorna l'estensione senza PUNTO +std::string TFilePath::getUndottedType() const // ritorna l'estensione senza PUNTO { size_t i = getLastSlash(m_path); - wstring str = m_path.substr(i + 1); + std::wstring str = m_path.substr(i + 1); i = str.rfind(L"."); - if (i == wstring::npos || i == str.length() - 1) + if (i == std::wstring::npos || i == str.length() - 1) return ""; return toLower(toString(str.substr(i + 1))); } //----------------------------------------------------------------------------- -wstring TFilePath::getWideName() const // noDot! noSlash! +std::wstring TFilePath::getWideName() const // noDot! noSlash! { int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); + std::wstring str = m_path.substr(i + 1); i = str.rfind(L"."); - if (i == (int)wstring::npos) + if (i == (int)std::wstring::npos) return str; int j = str.substr(0, i).rfind(L"."); - if (j != (int)wstring::npos) + if (j != (int)std::wstring::npos) i = j; else if (m_underscoreFormatAllowed) { j = str.substr(0, i).rfind(L"_"); - if (j != (int)wstring::npos && isNumbers(str, j, i)) + if (j != (int)std::wstring::npos && isNumbers(str, j, i)) i = j; } return str.substr(0, i); @@ -579,14 +579,14 @@ wstring TFilePath::getWideName() const // noDot! noSlash! //----------------------------------------------------------------------------- -string TFilePath::getName() const // noDot! noSlash! +std::string TFilePath::getName() const // noDot! noSlash! { return toString(getWideName()); } //----------------------------------------------------------------------------- // es. TFilePath("/pippo/pluto.0001.gif").getLevelName() == "pluto..gif" -string TFilePath::getLevelName() const +std::string TFilePath::getLevelName() const { return toString(getLevelNameW()); } @@ -597,13 +597,13 @@ string TFilePath::getLevelName() const std::wstring TFilePath::getLevelNameW() const { int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); // str e' m_path senza directory + std::wstring str = m_path.substr(i + 1); // str e' m_path senza directory int j = str.rfind(L"."); // str[j..] = ".type" - if (j == (int)wstring::npos) + if (j == (int)std::wstring::npos) return str; // no frame; no type i = str.substr(0, j).rfind(L'.'); - if (i == (int)wstring::npos && m_underscoreFormatAllowed) + if (i == (int)std::wstring::npos && m_underscoreFormatAllowed) i = str.substr(0, j).rfind(L'_'); if (j == i || j - i == 1) //prova.tif o prova..tif @@ -647,17 +647,17 @@ bool TFilePath::isLevelName() const TFrameId TFilePath::getFrame() const { int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); // str e' il path senza parentdir + std::wstring str = m_path.substr(i + 1); // str e' il path senza parentdir i = str.rfind(L'.'); - if (i == (int)wstring::npos || str == L"." || str == L"..") + if (i == (int)std::wstring::npos || str == L"." || str == L"..") return TFrameId(TFrameId::NO_FRAME); int j; j = str.substr(0, i).rfind(L'.'); - if (j == (int)wstring::npos && m_underscoreFormatAllowed) + if (j == (int)std::wstring::npos && m_underscoreFormatAllowed) j = str.substr(0, i).rfind(L'_'); - if (j == (int)wstring::npos) + if (j == (int)std::wstring::npos) return TFrameId(TFrameId::NO_FRAME); if (i == j + 1) return TFrameId(TFrameId::EMPTY_FRAME); @@ -680,13 +680,13 @@ TFrameId TFilePath::getFrame() const //----------------------------------------------------------------------------- -TFilePath TFilePath::withType(const string &type) const +TFilePath TFilePath::withType(const std::string &type) const { assert(type.length() < 2 || type.substr(0, 2) != ".."); int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); // str e' il path senza parentdir + std::wstring str = m_path.substr(i + 1); // str e' il path senza parentdir int j = str.rfind(L'.'); - if (j == (int)wstring::npos || str == L"..") + if (j == (int)std::wstring::npos || str == L"..") // il path originale non ha tipo { if (type == "") @@ -709,7 +709,7 @@ TFilePath TFilePath::withType(const string &type) const //----------------------------------------------------------------------------- -TFilePath TFilePath::withName(const string &name) const +TFilePath TFilePath::withName(const std::string &name) const { return withName(toWideString(name)); } @@ -719,14 +719,14 @@ TFilePath TFilePath::withName(const string &name) const TFilePath TFilePath::withName(const std::wstring &name) const { int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); // str e' il path senza parentdir + std::wstring str = m_path.substr(i + 1); // str e' il path senza parentdir int j; j = str.rfind(L'.'); - if (j == (int)wstring::npos) { + if (j == (int)std::wstring::npos) { if (m_underscoreFormatAllowed) { j = str.rfind(L'_'); - if (j != (int)wstring::npos) + if (j != (int)std::wstring::npos) return TFilePath(m_path.substr(0, i + 1) + name + str.substr(j)); } return TFilePath(m_path.substr(0, i + 1) + name); @@ -734,10 +734,10 @@ TFilePath TFilePath::withName(const std::wstring &name) const int k; k = str.substr(0, j).rfind(L"."); - if (k == (int)wstring::npos && m_underscoreFormatAllowed) + if (k == (int)std::wstring::npos && m_underscoreFormatAllowed) k = str.substr(0, j).rfind(L"_"); - if (k == (int)(wstring::npos)) + if (k == (int)(std::wstring::npos)) k = j; else if (k != j - 1 && !isNumbers(str, k, j)) k = j; @@ -757,23 +757,23 @@ TFilePath TFilePath::withParentDir(const TFilePath &dir) const TFilePath TFilePath::withFrame(const TFrameId &frame, TFrameId::FrameFormat format) const { - const wstring dot = L".", dotDot = L".."; + const std::wstring dot = L".", dotDot = L".."; int i = getLastSlash(m_path); //cerco l'ultimo slash - wstring str = m_path.substr(i + 1); // str e' il path senza parentdir + std::wstring str = m_path.substr(i + 1); // str e' il path senza parentdir assert(str != dot && str != dotDot); int j = str.rfind(L'.'); char *ch = "."; if (m_underscoreFormatAllowed && (format == TFrameId::UNDERSCORE_FOUR_ZEROS || format == TFrameId::UNDERSCORE_NO_PAD)) ch = "_"; - if (j == (int)wstring::npos) { + if (j == (int)std::wstring::npos) { if (frame.isEmptyFrame() || frame.isNoFrame()) return *this; else return TFilePath(m_path + toWideString(ch + frame.expand(format))); } - string frameString; + std::string frameString; if (frame.isNoFrame()) frameString = ""; else @@ -781,11 +781,11 @@ TFilePath TFilePath::withFrame(const TFrameId &frame, TFrameId::FrameFormat form int k = str.substr(0, j).rfind(L'.'); - if (k != (int)wstring::npos) + if (k != (int)std::wstring::npos) return TFilePath(m_path.substr(0, k + i + 1) + toWideString(frameString) + str.substr(j)); else if (m_underscoreFormatAllowed) { k = str.substr(0, j).rfind(L'_'); - if (k != (int)wstring::npos && + if (k != (int)std::wstring::npos && (k == j - 1 || isNumbers(str, k, j))) /*-- "_." の並びか、"_[数字]."の並びのとき --*/ return TFilePath(m_path.substr(0, k + i + 1) + ((frame.isNoFrame()) ? L"" : toWideString("_" + frame.expand(format))) + str.substr(j)); } @@ -847,7 +847,7 @@ bool TFilePath::match(const TFilePath &fp) const //----------------------------------------------------------------------------- -void TFilePath::split(wstring &head, TFilePath &tail) const +void TFilePath::split(std::wstring &head, TFilePath &tail) const { TFilePath ancestor = getParentDir(); if (ancestor == TFilePath()) { diff --git a/toonz/sources/common/tsystem/tfiletype.cpp b/toonz/sources/common/tsystem/tfiletype.cpp index 4fa543d..95918b4 100644 --- a/toonz/sources/common/tsystem/tfiletype.cpp +++ b/toonz/sources/common/tsystem/tfiletype.cpp @@ -10,7 +10,7 @@ namespace class FileTypeData { public: - map m_table; + std::map m_table; public: FileTypeData() @@ -34,7 +34,7 @@ public: TFileType::Type TFileType::getInfo(const TFilePath &fp) { FileTypeData *data = FileTypeData::instance(); - std::map::iterator it = data->m_table.find(fp.getType()); + std::map::iterator it = data->m_table.find(fp.getType()); int type = (it == data->m_table.end()) ? TFileType::UNKNOW_FILE : it->second; if ((type & TFileType::LEVEL) == 0 && (fp.getDots() == "..")) @@ -45,10 +45,10 @@ TFileType::Type TFileType::getInfo(const TFilePath &fp) //-------------------------------------------------------------------------------- -TFileType::Type TFileType::getInfoFromExtension(const string &extension) +TFileType::Type TFileType::getInfoFromExtension(const std::string &extension) { FileTypeData *data = FileTypeData::instance(); - std::map::iterator it = data->m_table.find(extension); + std::map::iterator it = data->m_table.find(extension); int type = (it == data->m_table.end()) ? TFileType::UNKNOW_FILE : it->second; return (TFileType::Type)type; } @@ -60,7 +60,7 @@ TFileType::Type TFileType::getInfoFromExtension(const QString &type) //-------------------------------------------------------------------------------- -void TFileType::declare(string extension, Type type) +void TFileType::declare(std::string extension, Type type) { FileTypeData *data = FileTypeData::instance(); data->m_table[extension] = type; diff --git a/toonz/sources/common/tsystem/tlogger.cpp b/toonz/sources/common/tsystem/tlogger.cpp index c21b1da..71a4a3b 100644 --- a/toonz/sources/common/tsystem/tlogger.cpp +++ b/toonz/sources/common/tsystem/tlogger.cpp @@ -61,7 +61,7 @@ TLogger *TLogger::instance() return &_instance; } -TLogger::Message::Message(MessageType type, string text) +TLogger::Message::Message(MessageType type, std::string text) : m_type(type), m_text(text) { QTime t = QTime::currentTime(); @@ -119,7 +119,7 @@ TLogger::Stream::~Stream() } } -TLogger::Stream &TLogger::Stream::operator<<(string v) +TLogger::Stream &TLogger::Stream::operator<<(std::string v) { m_text += v; return *this; diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp index b30f191..45348c1 100644 --- a/toonz/sources/common/tsystem/tpluginmanager.cpp +++ b/toonz/sources/common/tsystem/tpluginmanager.cpp @@ -53,7 +53,7 @@ public: Handle getHandle() const { return m_handle; } const TPluginInfo &getInfo() const { return m_info; } void setInfo(const TPluginInfo &info) { m_info = info; } - string getName() const { return m_info.getName(); } + std::string getName() const { return m_info.getName(); } }; //----------------------------------------------------------------------------- @@ -94,7 +94,7 @@ TPluginManager *TPluginManager::instance() //----------------------------------------------------------------------------- -bool TPluginManager::isIgnored(string name) const +bool TPluginManager::isIgnored(std::string name) const { return m_ignoreList.count(toLower(name)) > 0; } @@ -126,7 +126,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) TLogger::debug() << "Already loaded " << fp; return; } - string name = fp.getName(); + std::string name = fp.getName(); if (isIgnored(name)) { TLogger::debug() << "Ignored " << fp; return; @@ -136,14 +136,14 @@ void TPluginManager::loadPlugin(const TFilePath &fp) #ifdef _WIN32 Plugin::Handle handle = LoadLibraryW(fp.getWideString().c_str()); #else - wstring str_fp = fp.getWideString(); + std::wstring str_fp = fp.getWideString(); Plugin::Handle handle = dlopen(toString(str_fp).c_str(), RTLD_NOW); // RTLD_LAZY #endif if (!handle) { // non riesce a caricare la libreria; TLogger::warning() << "Unable to load " << fp; #ifdef _WIN32 - wstring getFormattedMessage(DWORD lastError); + std::wstring getFormattedMessage(DWORD lastError); TLogger::warning() << toString(getFormattedMessage(GetLastError())); #else TLogger::warning() << dlerror(); @@ -186,11 +186,11 @@ void TPluginManager::loadPlugin(const TFilePath &fp) void TPluginManager::loadPlugins(const TFilePath &dir) { #if defined(_WIN32) - const string extension = "dll"; + const std::string extension = "dll"; #elif defined(LINUX) || defined(__sgi) - const string extension = "so"; + const std::string extension = "so"; #elif defined(MACOSX) - const string extension = "dylib"; + const std::string extension = "dylib"; #endif TFilePathSet dirContent = TSystem::readDirectory(dir, false); @@ -202,7 +202,7 @@ void TPluginManager::loadPlugins(const TFilePath &dir) TFilePath fp = *it; if (fp.getType() != extension) continue; - wstring fullpath = fp.getWideString(); + std::wstring fullpath = fp.getWideString(); #ifdef _WIN32 @@ -238,9 +238,9 @@ void TPluginManager::loadStandardPlugins() //-------------------------------------------------------------- -void TPluginManager::setIgnoredList(const std::set &names) +void TPluginManager::setIgnoredList(const std::set &names) { m_ignoreList.clear(); - for (std::set::const_iterator it = names.begin(); it != names.end(); ++it) + for (std::set::const_iterator it = names.begin(); it != names.end(); ++it) m_ignoreList.insert(toLower(*it)); } diff --git a/toonz/sources/common/tsystem/tsystem.cpp b/toonz/sources/common/tsystem/tsystem.cpp index 019687e..ad73849 100644 --- a/toonz/sources/common/tsystem/tsystem.cpp +++ b/toonz/sources/common/tsystem/tsystem.cpp @@ -998,7 +998,7 @@ TSystemException::TSystemException(const TFilePath &fname, int err) //-------------------------------------------------------------- -TSystemException::TSystemException(const TFilePath &fname, const string &msg) +TSystemException::TSystemException(const TFilePath &fname, const std::string &msg) : m_fname(fname), m_err(-1), m_msg(toWideString(msg)) { } @@ -1011,7 +1011,7 @@ TSystemException::TSystemException(const TFilePath &fname, const wstring &msg) //-------------------------------------------------------------- -TSystemException::TSystemException(const string &msg) +TSystemException::TSystemException(const std::string &msg) : m_fname(""), m_err(-1), m_msg(toWideString(msg)) { } diff --git a/toonz/sources/common/tsystem/uncpath.cpp b/toonz/sources/common/tsystem/uncpath.cpp index 92ed0ac..cf06429 100644 --- a/toonz/sources/common/tsystem/uncpath.cpp +++ b/toonz/sources/common/tsystem/uncpath.cpp @@ -14,7 +14,7 @@ bool TSystem::isUNC(const TFilePath &path) { // si assume che il path e' gia' in formato UNC se inizia con "\\" - wstring pathStr = path.getWideString(); + std::wstring pathStr = path.getWideString(); return pathStr.length() > 2 && pathStr.substr(0, 2) == L"\\\\"; } @@ -28,10 +28,10 @@ TFilePath TSystem::toUNC(const TFilePath &fp) if (isUNC(fp)) return fp; - string fpStr = toString(fp.getWideString()); + std::string fpStr = toString(fp.getWideString()); if (fpStr.length() > 1 && fpStr.c_str()[1] == ':') { - string drive = fpStr.substr(0, 3); + std::string drive = fpStr.substr(0, 3); UINT uiDriveType = GetDriveTypeA(drive.c_str()); if (uiDriveType & DRIVE_REMOTE) { @@ -77,7 +77,7 @@ TFilePath TSystem::toUNC(const TFilePath &fp) int iBestMatch = 0; - string csTemp, + std::string csTemp, csTempDrive, csBestMatch; @@ -93,25 +93,25 @@ TFilePath TSystem::toUNC(const TFilePath &fp) if (p->shi502_type == STYPE_DISKTREE) { //#ifdef IS_DOTNET // shi502_path e' una wstring, aanche se la dichiarazione di PSHARE_INFO_502 non lo sa! - wstring shareLocalPathW = (LPWSTR)(p->shi502_path); - string shareLocalPath = toString(shareLocalPathW); + std::wstring shareLocalPathW = (LPWSTR)(p->shi502_path); + std::string shareLocalPath = toString(shareLocalPathW); //#else //string shareLocalPath = toString(p->shi502_path); //#endif if (toLower(fpStr).find(toLower(shareLocalPath)) == 0) { - string hostName = TSystem::getHostName().toStdString(); + std::string hostName = TSystem::getHostName().toStdString(); // #ifdef IS_DOTNET // shi502_netname e' una wstring, anche se la dichiarazione di PSHARE_INFO_502 non lo sa! - wstring shareNetNameW = (LPWSTR)(p->shi502_netname); - string shareNetName = toString(shareNetNameW); + std::wstring shareNetNameW = (LPWSTR)(p->shi502_netname); + std::string shareNetName = toString(shareNetNameW); // #else //string shareNetName = toString(p->shi502_netname); //#endif shareNetName.append("\\"); - string fp(fpStr); - string uncpath = "\\\\" + hostName + "\\" + + std::string fp(fpStr); + std::string uncpath = "\\\\" + hostName + "\\" + fp.replace(0, shareLocalPath.size(), shareNetName); return TFilePath(uncpath); @@ -150,24 +150,24 @@ TFilePath TSystem::toLocalPath(const TFilePath &fp) if (!isUNC(fp)) return TFilePath(fp); - string pathStr = toString(fp.getWideString()); + std::string pathStr = toString(fp.getWideString()); // estrae hostname e il nome dello share dal path UNC - string::size_type idx = pathStr.find_first_of("\\", 2); - if (idx == string::npos) + std::string::size_type idx = pathStr.find_first_of("\\", 2); + if (idx == std::string::npos) throw TException("The path specified is not a valid UNC path"); - string hostname = pathStr.substr(2, idx - 2); + std::string hostname = pathStr.substr(2, idx - 2); if (toLower(hostname) != toLower(TSystem::getHostName().toStdString())) throw TException("The UNC path specified does not refer to the local host"); - string::size_type idx2 = pathStr.find_first_of("\\", idx + 1); - if (idx2 == string::npos) + std::string::size_type idx2 = pathStr.find_first_of("\\", idx + 1); + if (idx2 == std::string::npos) throw TException("The path specified is not a valid UNC path"); - string fpShareName = pathStr.substr(idx + 1, idx2 - idx - 1); - string path = pathStr.substr(idx2 + 1, pathStr.size() - idx2); + std::string fpShareName = pathStr.substr(idx + 1, idx2 - idx - 1); + std::string path = pathStr.substr(idx2 + 1, pathStr.size() - idx2); NET_API_STATUS res; do { @@ -185,8 +185,8 @@ TFilePath TSystem::toLocalPath(const TFilePath &fp) if (p->shi502_type == STYPE_DISKTREE) { //#ifdef IS_DOTNET //shi502_netname e' una wstring, anche se la dichiarazione di PSHARE_INFO_502 non lo sa! - wstring shareNetNameW = (LPWSTR)(p->shi502_netname); - string shareNetName = toString(shareNetNameW); + std::wstring shareNetNameW = (LPWSTR)(p->shi502_netname); + std::string shareNetName = toString(shareNetNameW); // #else //string shareNetName = toString(p->shi502_netname); //#endif @@ -194,12 +194,12 @@ TFilePath TSystem::toLocalPath(const TFilePath &fp) if (toLower(fpShareName) == toLower(shareNetName)) { //#ifdef IS_DOTNET // shi502_path e' una wstring, anche se la dichiarazione di PSHARE_INFO_502 non lo sa! - wstring shareLocalPathW = (LPWSTR)(p->shi502_path); - string shareLocalPath = toString(shareLocalPathW); + std::wstring shareLocalPathW = (LPWSTR)(p->shi502_path); + std::string shareLocalPath = toString(shareLocalPathW); //#else //string shareLocalPath = toString(p->shi502_path); //#endif - string localPath = shareLocalPath + path; + std::string localPath = shareLocalPath + path; return TFilePath(localPath); } } diff --git a/toonz/sources/common/ttest/ttest.cpp b/toonz/sources/common/ttest/ttest.cpp index dba0d64..e5c6b9e 100644 --- a/toonz/sources/common/ttest/ttest.cpp +++ b/toonz/sources/common/ttest/ttest.cpp @@ -26,8 +26,8 @@ namespace class TTestTable { - typedef map Table; - typedef set SkipTable; + typedef map Table; + typedef set SkipTable; Table m_table; SkipTable m_skipTable; TTestTable(){}; @@ -41,7 +41,7 @@ public: return theTable; } - void add(const string &str, TTest *test) + void add(const std::string &str, TTest *test) { assert(test); if (m_table.find(str) != m_table.end()) { @@ -52,12 +52,12 @@ public: m_table[str] = test; } - void skip(const string &str) + void skip(const std::string &str) { m_skipTable.insert(str); } - void run(const string &str) + void run(const std::string &str) { if (m_skipTable.find(str) != m_skipTable.end()) return; @@ -107,7 +107,7 @@ public: //------------------------------------------------------------ -TTest::TTest(const string &testName) +TTest::TTest(const std::string &testName) { TTestTable::table()->add(testName, this); } @@ -159,7 +159,7 @@ void TTest::runTests(string name) { TFilePath testFile = getTestFile(name); - std::vector testType; + std::vector testType; if (name == "verif_image") { testType.push_back("write"); testType.push_back("read"); diff --git a/toonz/sources/common/tunit/tunit.cpp b/toonz/sources/common/tunit/tunit.cpp index 5d8bf14..d86add1 100644 --- a/toonz/sources/common/tunit/tunit.cpp +++ b/toonz/sources/common/tunit/tunit.cpp @@ -97,7 +97,7 @@ public: //=================================================================== -TUnit::TUnit(wstring ext, TUnitConverter *converter) +TUnit::TUnit(std::wstring ext, TUnitConverter *converter) : m_defaultExtension(ext), m_converter(converter) { m_extensions.push_back(ext); @@ -121,7 +121,7 @@ TUnit::~TUnit() //------------------------------------------------------------------- -void TUnit::addExtension(wstring ext) +void TUnit::addExtension(std::wstring ext) { if (std::find( m_extensions.begin(), m_extensions.end(), ext) == m_extensions.end()) @@ -132,7 +132,7 @@ void TUnit::addExtension(wstring ext) //------------------------------------------------------------------- -bool TUnit::isExtension(wstring ext) const +bool TUnit::isExtension(std::wstring ext) const { return std::find( m_extensions.begin(), m_extensions.end(), ext) != m_extensions.end(); @@ -140,7 +140,7 @@ bool TUnit::isExtension(wstring ext) const //------------------------------------------------------------------- -void TUnit::setDefaultExtension(wstring ext) +void TUnit::setDefaultExtension(std::wstring ext) { if (!ext.empty() && std::find(m_extensions.begin(), m_extensions.end(), ext) == m_extensions.end()) m_extensions.push_back(ext); @@ -149,7 +149,7 @@ void TUnit::setDefaultExtension(wstring ext) //=================================================================== -TMeasure::TMeasure(string name, TUnit *mainUnit) +TMeasure::TMeasure(std::string name, TUnit *mainUnit) : m_name(name), m_mainUnit(0), m_standardUnit(0), m_currentUnit(0), m_defaultValue(0) { add(mainUnit); @@ -161,12 +161,12 @@ TMeasure::TMeasure(string name, TUnit *mainUnit) TMeasure::TMeasure(const TMeasure &src) : m_name(src.m_name), m_mainUnit(src.m_mainUnit), m_currentUnit(src.m_currentUnit), m_standardUnit(src.m_standardUnit), m_defaultValue(src.m_defaultValue) { - std::map::const_iterator it; + std::map::const_iterator it; for (it = src.m_extensions.begin(); it != src.m_extensions.end(); ++it) { TUnit *u = it->second; assert(u); - const std::vector &e = u->getExtensions(); + const std::vector &e = u->getExtensions(); assert(std::find(e.begin(), e.end(), it->first) != e.end()); m_extensions[it->first] = u; } @@ -182,9 +182,9 @@ TMeasure::~TMeasure() void TMeasure::add(TUnit *unit) { - const std::vector &e = unit->getExtensions(); + const std::vector &e = unit->getExtensions(); for (int i = 0; i < (int)e.size(); i++) { - wstring ext = e[i]; + std::wstring ext = e[i]; assert(m_extensions.count(ext) == 0); m_extensions[ext] = unit; } @@ -192,9 +192,9 @@ void TMeasure::add(TUnit *unit) //------------------------------------------------------------------- -TUnit *TMeasure::getUnit(wstring ext) const +TUnit *TMeasure::getUnit(std::wstring ext) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_extensions.find(ext); return it == m_extensions.end() ? 0 : it->second; } @@ -415,9 +415,9 @@ void TMeasureManager::add(TMeasure *m) //------------------------------------------------------------------- -TMeasure *TMeasureManager::get(string name) const +TMeasure *TMeasureManager::get(std::string name) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_measures.find(name); if (it == m_measures.end()) return 0; @@ -427,7 +427,7 @@ TMeasure *TMeasureManager::get(string name) const //=================================================================== -TMeasuredValue::TMeasuredValue(string measureName) +TMeasuredValue::TMeasuredValue(std::string measureName) : m_measure(0), m_value(0) { setMeasure(measureName); @@ -452,14 +452,14 @@ void TMeasuredValue::setMeasure(const TMeasure *measure) //------------------------------------------------------------------- -void TMeasuredValue::setMeasure(string measureName) +void TMeasuredValue::setMeasure(std::string measureName) { setMeasure(TMeasureManager::instance()->get(measureName)); } //------------------------------------------------------------------- -bool TMeasuredValue::setValue(wstring s, int *pErr) +bool TMeasuredValue::setValue(std::wstring s, int *pErr) { if (s == ::toWideString("")) { if (pErr) @@ -472,7 +472,7 @@ bool TMeasuredValue::setValue(wstring s, int *pErr) int i = 0, len = s.length(); // skip blanks i = s.find_first_not_of(::toWideString(" \t")); - assert(i != (int)wstring::npos); + assert(i != (int)std::wstring::npos); int j = i; // match number if (i < len && (s[i] == L'-' || s[i] == L'+')) @@ -496,7 +496,7 @@ bool TMeasuredValue::setValue(wstring s, int *pErr) valueFlag = true; // skip blanks i = s.find_first_not_of(::toWideString(" \t"), i); - if (i == (int)wstring::npos) + if (i == (int)std::wstring::npos) i = s.length(); } @@ -504,10 +504,10 @@ bool TMeasuredValue::setValue(wstring s, int *pErr) if (i < (int)s.length()) { j = i; i = s.find_last_not_of(::toWideString(" \t")); - if (i == (int)wstring::npos) + if (i == (int)std::wstring::npos) i = len - 1; if (j <= i) { - wstring unitExt = s.substr(j, i + 1 - j); + std::wstring unitExt = s.substr(j, i + 1 - j); unit = m_measure->getUnit(unitExt); if (!unit) { if (pErr) @@ -533,11 +533,11 @@ bool TMeasuredValue::setValue(wstring s, int *pErr) //------------------------------------------------------------------- -wstring TMeasuredValue::toWideString(int decimals) const +std::wstring TMeasuredValue::toWideString(int decimals) const { double v = getValue(CurrentUnit); - string s = toString(v, decimals); - if (s.find('.') != string::npos) { + std::string s = toString(v, decimals); + if (s.find('.') != std::string::npos) { int i = s.length(); while (i > 0 && s[i - 1] == '0') i--; @@ -546,7 +546,7 @@ wstring TMeasuredValue::toWideString(int decimals) const if (i < (int)s.length()) s = s.substr(0, i); } - wstring measure = m_measure->getCurrentUnit()->getDefaultExtension(); + std::wstring measure = m_measure->getCurrentUnit()->getDefaultExtension(); if (measure.empty()) return ::toWideString(s); return ::toWideString(s) + ::toWideString(" ") + measure; diff --git a/toonz/sources/common/tvectorimage/cornerdetector.cpp b/toonz/sources/common/tvectorimage/cornerdetector.cpp index f99abc1..cbe601e 100644 --- a/toonz/sources/common/tvectorimage/cornerdetector.cpp +++ b/toonz/sources/common/tvectorimage/cornerdetector.cpp @@ -42,10 +42,10 @@ AlgorithmPointI operator-(const AlgorithmPointI &op1, const AlgorithmPointI &op2 //====================================================================== //! Definisce point_container come un vettore di AlgorithmPointI -typedef vector point_container; +typedef std::vector point_container; //! Definisce corner_container come un vettore di interi -typedef vector corner_container; +typedef std::vector corner_container; int gMinSampleNum; int gMinDist; @@ -67,7 +67,7 @@ point_container gPoints; \param points Vettore di T3DPoints */ -bool interpolate(const vector &points) +bool interpolate(const std::vector &points) { unsigned int curr, next; @@ -232,7 +232,7 @@ void findCornerCandidates() //---------------------------------------------------------------------- //! Trova gli angoli tra i punti di gPoints -void findCorners(int neighborLimit, vector &cornerIndexes) +void findCorners(int neighborLimit, std::vector &cornerIndexes) { unsigned int curr, prec, next; curr = gMaxDist; @@ -262,9 +262,9 @@ void findCorners(int neighborLimit, vector &cornerIndexes) //---------------------------------------------------------------------- //! Individua gli eventuali angoli presenti nella curva da calcolare -void detectCorners(const vector &inputPoints, +void detectCorners(const std::vector &inputPoints, int minSampleNum, int minDist, int maxDist, double maxAngle, - vector &cornerIndexes) + std::vector &cornerIndexes) { gMinSampleNum = minSampleNum; gMinDist = minDist; diff --git a/toonz/sources/common/tvectorimage/drawutil.cpp b/toonz/sources/common/tvectorimage/drawutil.cpp index 92510eb..f185885 100644 --- a/toonz/sources/common/tvectorimage/drawutil.cpp +++ b/toonz/sources/common/tvectorimage/drawutil.cpp @@ -90,7 +90,7 @@ void drawQuadraticCenterline(const TQuadratic &inQuad, //----------------------------------------------------------------------------- -void stroke2polyline(vector &pnts, const TStroke &stroke, +void stroke2polyline(std::vector &pnts, const TStroke &stroke, double pixelSize, double w0, double w1, bool lastRepeatable) { TPointD p; @@ -413,7 +413,7 @@ void drawStrokeCenterline(const TStroke &stroke, DVAPI TStroke *makeEllipticStroke(double thick, TPointD center, double radiusX, double radiusY) { - vector points(17); + std::vector points(17); double xmin = center.x - radiusX; // x coordinate of the upper left corner of the bounding rectangle double ymin = center.y - radiusY; // y coordinate of the upper left corner of the bounding rectangle diff --git a/toonz/sources/common/tvectorimage/outlineApproximation.cpp b/toonz/sources/common/tvectorimage/outlineApproximation.cpp index adb5663..50f9338 100644 --- a/toonz/sources/common/tvectorimage/outlineApproximation.cpp +++ b/toonz/sources/common/tvectorimage/outlineApproximation.cpp @@ -240,7 +240,7 @@ TQuadratic *makeOutlineForThickQuadratic(const TThickQuadratic *tq, int upOrDown } catch (TMathException &) { return new TQuadratic((upOrDown) ? p0aux : p2aux, (p0aux + p2aux) * 0.5, (upOrDown) ? p2aux : p0aux); } catch (std::exception &e) { - string s(e.what()); + std::string s(e.what()); abort(); } catch (...) { abort(); @@ -318,7 +318,7 @@ void makeOutline(/*std::ofstream& cout,*/ void splitCircularArcIntoQuadraticCurves(const TPointD &Center, const TPointD &Pstart, const TPointD &Pend, - vector &quadArray) + std::vector &quadArray) { // It splits a circular anticlockwise arc into a sequence of quadratic bezier curves // Every quadratic curve can approximate an arc no TLonger than 45 degrees (or 60). @@ -409,8 +409,8 @@ void splitCircularArcIntoQuadraticCurves(const TPointD &Center, // minore di quadratiche viene riempito con quadratiche degeneri // con i punti di controllo coincidenti nell'ultimo estremo valido void copy(/*std::ofstream& cout,*/ - const vector &arrayUp, - const vector &arrayDown, + const std::vector &arrayUp, + const std::vector &arrayDown, outlineBoundary &ob) { int minSize = tmin(arrayUp.size(), arrayDown.size()); @@ -425,8 +425,8 @@ void copy(/*std::ofstream& cout,*/ ob.push_back(outlineEdge(arrayUp[i], arrayDown[i])); } if (arrayUp.size() != arrayDown.size()) { - const vector &vMaxSize = arrayUp.size() > arrayDown.size() ? arrayUp : arrayDown; - const vector &vMinSize = arrayUp.size() < arrayDown.size() ? arrayUp : arrayDown; + const std::vector &vMaxSize = arrayUp.size() > arrayDown.size() ? arrayUp : arrayDown; + const std::vector &vMinSize = arrayUp.size() < arrayDown.size() ? arrayUp : arrayDown; int delta = vMaxSize.size() - vMinSize.size(); @@ -645,7 +645,7 @@ void drawOutline(const outlineBoundary &ob, double pixelSize) } void computeOutlines(const TStroke *stroke, int startQuad, int endQuad, - vector &quadArray, double error2) + std::vector &quadArray, double error2) { outlineBoundary ob; makeOutline(stroke, startQuad, endQuad, ob, error2); diff --git a/toonz/sources/common/tvectorimage/tcomputeregions.cpp b/toonz/sources/common/tvectorimage/tcomputeregions.cpp index 6a9bafb..9c9fa37 100644 --- a/toonz/sources/common/tvectorimage/tcomputeregions.cpp +++ b/toonz/sources/common/tvectorimage/tcomputeregions.cpp @@ -2919,7 +2919,7 @@ class Intersection #ifdef _DEBUG -void TVectorImage::Imp::checkRegions(const vector ®ions) +void TVectorImage::Imp::checkRegions(const std::vector ®ions) { for (UINT i = 0; i < regions.size(); i++) { TRegion *r = regions[i]; @@ -2937,7 +2937,7 @@ void TVectorImage::Imp::checkRegions(const vector ®ions) // assert(!e->m_s->isSelfLoop()); } if (r->getSubregionCount() > 0) { - vector aux(r->getSubregionCount()); + std::vector aux(r->getSubregionCount()); for (j = 0; j < r->getSubregionCount(); j++) aux[j] = r->getSubregion(j); checkRegions(aux); @@ -2950,7 +2950,7 @@ void TVectorImage::Imp::checkRegions(const vector ®ions) namespace { -inline TGroupId getGroupId(TRegion *r, const vector &strokes) +inline TGroupId getGroupId(TRegion *r, const std::vector &strokes) { for (UINT i = 0; i < r->getEdgeCount(); i++) if (r->getEdge(i)->m_index >= 0) @@ -2965,7 +2965,7 @@ TRegion *TVectorImage::findRegion(const TRegion ®ion) const { TRegion *ret = 0; - for (vector::iterator it = m_imp->m_regions.begin(); it != m_imp->m_regions.end(); ++it) + for (std::vector::iterator it = m_imp->m_regions.begin(); it != m_imp->m_regions.end(); ++it) if ((ret = (*it)->findRegion(region)) != 0) return ret; @@ -2976,7 +2976,7 @@ TRegion *TVectorImage::findRegion(const TRegion ®ion) const void TVectorImage::Imp::addRegion(TRegion *region) { - for (vector::iterator it = m_regions.begin(); it != m_regions.end(); ++it) { + for (std::vector::iterator it = m_regions.begin(); it != m_regions.end(); ++it) { if (getGroupId(region, m_strokes) != getGroupId(*it, m_strokes)) continue; @@ -3040,7 +3040,7 @@ void TVectorImage::Imp::moveStroke(int fromIndex, int moveBefore) m_strokes.erase(m_strokes.begin() + fromIndex); - vector::iterator it = m_strokes.begin(); + std::vector::iterator it = m_strokes.begin(); if (fromIndex < moveBefore) advance(it, moveBefore - 1); else diff --git a/toonz/sources/common/tvectorimage/tregion.cpp b/toonz/sources/common/tvectorimage/tregion.cpp index 0b27899..0f1d2c8 100644 --- a/toonz/sources/common/tvectorimage/tregion.cpp +++ b/toonz/sources/common/tvectorimage/tregion.cpp @@ -107,7 +107,7 @@ public: bool contains(const TStroke &s, bool mayIntersect) const; bool isSubRegionOf(const TRegion::Imp &r) const; bool getInternalPoint(TPointD &p, double left, double right, double y); - void computeScanlineIntersections(double y, vector &intersections) const; + void computeScanlineIntersections(double y, std::vector &intersections) const; bool thereAreintersections(const TStroke &s) const; int leftScanlineIntersections(const TPointD &p, @@ -313,7 +313,7 @@ if((q.getPoint(t0).y-p.y)*(q.getPoint(t1).y-p.y)<0) //----------------------------------------------------------------------------- -void addIntersection(const TQuadratic &q, double t, double t0, double t1, vector &intersections, double intersection, vector &sides) +void addIntersection(const TQuadratic &q, double t, double t0, double t1, std::vector &intersections, double intersection, std::vector &sides) { int side = 0; @@ -338,8 +338,8 @@ void addIntersection(const TQuadratic &q, double t, double t0, double t1, vector //----------------------------------------------------------------------------- -void findIntersections(double y, const TQuadratic &q, double t0, double t1, vector &intersections, - vector &sides) +void findIntersections(double y, const TQuadratic &q, double t0, double t1, std::vector &intersections, + std::vector &sides) { TRectD bbox = q.getBBox(); @@ -519,7 +519,7 @@ void TRegion::draw(const TVectorRenderData &rd) //----------------------------------------------------------------------------- -void checkPolyline(const vector &p) +void checkPolyline(const std::vector &p) { int ret; @@ -533,7 +533,7 @@ void checkPolyline(const vector &p) for (int i = 0; i < pointSize; i++) { for (int j = i + 1; j < pointSize; j++) { - vector res; + std::vector res; p1 = TPointD(p[i].x, p[i].y); p2 = TPointD(p[i + 1].x, p[i + 1].y); @@ -562,7 +562,7 @@ void checkPolyline(const vector &p) TSegment s0(p1, p2); for (int j = 0; j < pointSize; j++) { - vector res; + std::vector res; p1 = TPointD(p[j].x, p[j].y); p2 = TPointD(p[j + 1].x, p[j + 1].y); @@ -617,14 +617,14 @@ bool TRegion::Imp::noSubregionContains(const TPointD &p) const //----------------------------------------------------------------------------- -void TRegion::computeScanlineIntersections(double y, vector &intersections) const +void TRegion::computeScanlineIntersections(double y, std::vector &intersections) const { m_imp->computeScanlineIntersections(y, intersections); } //----------------------------------------------------------------------------- -void TRegion::Imp::computeScanlineIntersections(double y, vector &intersections) const +void TRegion::Imp::computeScanlineIntersections(double y, std::vector &intersections) const { TRectD bbox = getBBox(); if (y <= bbox.y0 || y >= bbox.y1) @@ -633,7 +633,7 @@ void TRegion::Imp::computeScanlineIntersections(double y, vector &inters assert(intersections.empty()); UINT i, firstSide = 0; - vector sides; + std::vector sides; for (i = 0; i < m_edge.size(); i++) { TEdge *e = m_edge[i]; @@ -1414,7 +1414,7 @@ void TRegion::addSubregion(TRegion *region) void TRegion::Imp::addSubregion(TRegion *region) { - for (vector::iterator it = m_includedRegionArray.begin(); it != m_includedRegionArray.end(); ++it) { + for (std::vector::iterator it = m_includedRegionArray.begin(); it != m_includedRegionArray.end(); ++it) { if (region->contains(**it)) { //region->addSubregion(*it); region->addSubregion(*it); diff --git a/toonz/sources/common/tvectorimage/tvectorimage.cpp b/toonz/sources/common/tvectorimage/tvectorimage.cpp index 07fdbf2..b51aaaa 100644 --- a/toonz/sources/common/tvectorimage/tvectorimage.cpp +++ b/toonz/sources/common/tvectorimage/tvectorimage.cpp @@ -201,11 +201,11 @@ void TVectorImage::Imp::moveStrokes(int fromIndex, int count, int moveBefore, bo else moveStroke(fromIndex + i, moveBefore + i); - vector changedStrokes; + std::vector changedStrokes; if (regroup) regroupGhosts(changedStrokes); if (!changedStrokes.empty()) - notifyChangedStrokes(changedStrokes, vector(), false); + notifyChangedStrokes(changedStrokes, std::vector(), false); } //----------------------------------------------------------------------------- @@ -230,7 +230,7 @@ m_imp->insertStrokeAt(vs, strokeIndex); //----------------------------------------------------------------------------- /* -TRectD TVectorImage::addStroke(const vector &points) +TRectD TVectorImage::addStroke(const std::vector &points) { // era: TStroke *stroke = makeTStroke(points); TStroke *stroke = TStroke::interpolate(points, 5.0); @@ -298,14 +298,14 @@ TStroke *TVectorImage::Imp::removeStroke(int index, bool doComputeRegions) //----------------------------------------------------------------------------- -void TVectorImage::removeStrokes(const vector &toBeRemoved, bool deleteThem, bool recomputeRegions) +void TVectorImage::removeStrokes(const std::vector &toBeRemoved, bool deleteThem, bool recomputeRegions) { m_imp->removeStrokes(toBeRemoved, deleteThem, recomputeRegions); } //----------------------------------------------------------------------------- -void TVectorImage::Imp::removeStrokes(const vector &toBeRemoved, bool deleteThem, bool recomputeRegions) +void TVectorImage::Imp::removeStrokes(const std::vector &toBeRemoved, bool deleteThem, bool recomputeRegions) { QMutexLocker sl(m_mutex); @@ -445,12 +445,12 @@ TRegion *TVectorImage::Imp::getRegion(TRegionId regId, int index) const if (index >= (int)m_strokes.size()) return 0; - list &edgeList = m_strokes[index]->m_edgeList; + std::list &edgeList = m_strokes[index]->m_edgeList; - list::iterator endList = edgeList.end(); + std::list::iterator endList = edgeList.end(); double w0; double w1; - for (list::iterator it = edgeList.begin(); it != endList; ++it) { + for (std::list::iterator it = edgeList.begin(); it != endList; ++it) { w0 = (*it)->m_w0; w1 = (*it)->m_w1; @@ -483,9 +483,9 @@ TRegion* TVectorImage::getRegion(TRegionId regId) const if( index >= (int)m_imp->m_strokes.size() ) return 0; - list &edgeList = m_imp->m_strokes[index]->m_edgeList; + std::list &edgeList = m_imp->m_strokes[index]->m_edgeList; - list::iterator endList = edgeList.end(); + std::list::iterator endList = edgeList.end(); double w0; double w1; for(list::iterator it= edgeList.begin(); it!=endList; ++it) @@ -512,10 +512,10 @@ TRegion* TVectorImage::getRegion(TRegionId regId) const void TVectorImage::setEdgeColors(int strokeIndex, int leftColorIndex, int rightColorIndex) { - list &ll = m_imp->m_strokes[strokeIndex]->m_edgeList; + std::list &ll = m_imp->m_strokes[strokeIndex]->m_edgeList; - list::const_iterator l = ll.begin(); - list::const_iterator l_e = ll.end(); + std::list::const_iterator l = ll.begin(); + std::list::const_iterator l_e = ll.end(); for (; l != l_e; ++l) { //double w0 = (*l)->m_w0, w1 = (*l)->m_w1; if ((*l)->m_w0 > (*l)->m_w1) { @@ -932,9 +932,9 @@ void TVectorImage::seedFill() */ //----------------------------------------------------------------------------- -void TVectorImage::notifyChangedStrokes(const vector &strokeIndexArray, const vector &oldStrokeArray, bool areFlipped) +void TVectorImage::notifyChangedStrokes(const std::vector &strokeIndexArray, const std::vector &oldStrokeArray, bool areFlipped) { - vector aux; + std::vector aux; /* if (oldStrokeArray.empty()) @@ -954,10 +954,10 @@ else*/ void TVectorImage::notifyChangedStrokes(int strokeIndexArray, TStroke *oldStroke, bool isFlipped) { - vector app(1); + std::vector app(1); app[0] = strokeIndexArray; - vector oldStrokeArray(1); + std::vector oldStrokeArray(1); oldStrokeArray[0] = oldStroke ? oldStroke : getStroke(strokeIndexArray); m_imp->notifyChangedStrokes(app, oldStrokeArray, isFlipped); } @@ -966,12 +966,12 @@ void TVectorImage::notifyChangedStrokes(int strokeIndexArray, TStroke *oldStroke //ofstream of("C:\\temp\\butta.txt"); -void transferColors(const list &oldList, const list &newList, bool isStrokeChanged, bool isFlipped, bool overwriteColor) +void transferColors(const std::list &oldList, const std::list &newList, bool isStrokeChanged, bool isFlipped, bool overwriteColor) { if (newList.empty() || oldList.empty()) return; - list::const_iterator it; + std::list::const_iterator it; // unused variable #if 0 list::const_iterator it1; @@ -1012,7 +1012,7 @@ list::const_iterator it1; //w1 = (*it)->m_w1; } - list::const_iterator it1 = oldList.begin(); + std::list::const_iterator it1 = oldList.begin(); for (; it1 != oldList.end(); ++it1) { // unused variable #if 0 @@ -1055,14 +1055,14 @@ void TVectorImage::transferStrokeColors(TVectorImageP sourceImage, TVectorImageP destinationImage, int destinationStroke) { - list *sourceList = &(sourceImage->m_imp->m_strokes[sourceStroke]->m_edgeList); - list *destinationList = &(destinationImage->m_imp->m_strokes[destinationStroke]->m_edgeList); + std::list *sourceList = &(sourceImage->m_imp->m_strokes[sourceStroke]->m_edgeList); + std::list *destinationList = &(destinationImage->m_imp->m_strokes[destinationStroke]->m_edgeList); transferColors(*sourceList, *destinationList, true, false, false); } //----------------------------------------------------------------------------- -bool TVectorImage::Imp::areWholeGroups(const vector &indexes) const +bool TVectorImage::Imp::areWholeGroups(const std::vector &indexes) const { UINT i, j; for (i = 0; i < indexes.size(); i++) { @@ -1084,7 +1084,7 @@ bool TVectorImage::Imp::areWholeGroups(const vector &indexes) const //------------------------------------------------------------------- void invalidateRegionPropAndBBox(TRegion *reg); -void TVectorImage::Imp::notifyChangedStrokes(const vector &strokeIndexArray, const vector &oldStrokeArray, bool areFlipped) +void TVectorImage::Imp::notifyChangedStrokes(const std::vector &strokeIndexArray, const std::vector &oldStrokeArray, bool areFlipped) { #ifdef _DEBUG @@ -1096,8 +1096,8 @@ void TVectorImage::Imp::notifyChangedStrokes(const vector &strokeIndexArray if (!m_computedAlmostOnce && !m_notIntersectingStrokes) return; - typedef list EdgeList; - vector oldEdgeListArray(strokeIndexArray.size()); + typedef std::list EdgeList; + std::vector oldEdgeListArray(strokeIndexArray.size()); int i; //se si sono trasformati interi gruppi (senza deformare le stroke) non c'e' bisogno di ricalcolare le regioni! @@ -1115,7 +1115,7 @@ void TVectorImage::Imp::notifyChangedStrokes(const vector &strokeIndexArray //if (s->m_s->isSelfLoop()) // assert(s->m_edgeList.size()<=1); - list::iterator it = s->m_edgeList.begin(); + std::list::iterator it = s->m_edgeList.begin(); for (; it != s->m_edgeList.end(); it++) { TEdge *e = new TEdge(**it, false); if (!oldStrokeArray.empty()) @@ -1219,8 +1219,8 @@ TVectorImageP mergeAndClear(TVectorImageP v1, TVectorImageP v2 ) { TVectorImageP out = new TVectorImage; - vector::iterator it_b = v1->m_imp->m_strokes.begin(); - vector::iterator it_e = v1->m_imp->m_strokes.end(); + std::vector::iterator it_b = v1->m_imp->m_strokes.begin(); + std::vector::iterator it_e = v1->m_imp->m_strokes.end(); std::copy( it_b, it_e, std::back_inserter( out->m_imp->m_strokes ) ); @@ -1245,7 +1245,7 @@ VIStroke::VIStroke(const VIStroke &s, bool sameId) : m_isPoint(s.m_isPoint), m_isNewForFill(s.m_isNewForFill), m_groupId(s.m_groupId) { m_s = new TStroke(*s.m_s); - list::const_iterator it = s.m_edgeList.begin(), it_e = s.m_edgeList.end(); + std::list::const_iterator it = s.m_edgeList.begin(), it_e = s.m_edgeList.end(); for (; it != it_e; ++it) { m_edgeList.push_back(new TEdge(**it, true)); m_edgeList.back()->m_s = m_s; @@ -1295,7 +1295,7 @@ void TVectorImage::mergeImage(const TVectorImageP &img, const TAffine &affine, c m_imp->m_computedAlmostOnce |= img->m_imp->m_computedAlmostOnce; - vector changedStrokeArray(imageSize); + std::vector changedStrokeArray(imageSize); img->m_imp->reindexGroups(*m_imp); @@ -1338,7 +1338,7 @@ void TVectorImage::mergeImage(const TVectorImageP &img, const TAffine &affine, c int styleId; // cambio i colori delle regioni - list::const_iterator it = tarStroke->m_edgeList.begin(), it_e = tarStroke->m_edgeList.end(); + std::list::const_iterator it = tarStroke->m_edgeList.begin(), it_e = tarStroke->m_edgeList.end(); for (; it != it_e; ++it) { int styleId = (*it)->m_styleId; styleTableIt = styleTable.find(styleId); @@ -1362,7 +1362,7 @@ void TVectorImage::mergeImage(const TVectorImageP &img, const TAffine &affine, c m_imp->m_strokes.push_back(tarStroke); changedStrokeArray[i] = oldSize + i; } else { - vector::iterator it = m_imp->m_strokes.begin(); + std::vector::iterator it = m_imp->m_strokes.begin(); advance(it, insertAt + i); m_imp->m_strokes.insert(it, tarStroke); changedStrokeArray[i] = insertAt + i; @@ -1374,7 +1374,7 @@ void TVectorImage::mergeImage(const TVectorImageP &img, const TAffine &affine, c m_imp->reindexEdges(changedStrokeArray, true); } - notifyChangedStrokes(changedStrokeArray, vector(), false); + notifyChangedStrokes(changedStrokeArray, std::vector(), false); #ifdef _DEBUG checkIntersections(); @@ -1412,7 +1412,7 @@ void TVectorImage::Imp::reindexGroups(TVectorImage::Imp &img) void TVectorImage::mergeImage(const std::vector &images) { UINT oldSize = getStrokeCount(); - vector changedStrokeArray; + std::vector changedStrokeArray; const TVectorImage *img; int index; @@ -1463,7 +1463,7 @@ void TVectorImage::mergeImage(const std::vector &images) } } - notifyChangedStrokes(changedStrokeArray, vector(), false); + notifyChangedStrokes(changedStrokeArray, std::vector(), false); } //------------------------------------------------------------------- @@ -1474,17 +1474,17 @@ void TVectorImage::recomputeRegionsIfNeeded() m_imp->m_justLoaded = false; - vector v(m_imp->m_strokes.size()); + std::vector v(m_imp->m_strokes.size()); int i; for (i = 0; i < (int)m_imp->m_strokes.size(); i++) v[i] = i; - m_imp->notifyChangedStrokes(v, vector(), false); + m_imp->notifyChangedStrokes(v, std::vector(), false); } //----------------------------------------------------------------------------- -void TVectorImage::eraseStyleIds(const vector styleIds) +void TVectorImage::eraseStyleIds(const std::vector styleIds) { int j; for (j = 0; j < (int)styleIds.size(); j++) { @@ -1511,16 +1511,16 @@ void TVectorImage::eraseStyleIds(const vector styleIds) //------------------------------------------------------------------- -void TVectorImage::insertImage(const TVectorImageP &img, const vector &dstIndices) +void TVectorImage::insertImage(const TVectorImageP &img, const std::vector &dstIndices) { UINT i; UINT imageSize = img->getStrokeCount(); assert(dstIndices.size() == imageSize); //img->m_imp->reindexGroups(*m_imp); - vector changedStrokeArray(imageSize); + std::vector changedStrokeArray(imageSize); - vector::iterator it = m_imp->m_strokes.begin(); + std::vector::iterator it = m_imp->m_strokes.begin(); for (i = 0; i < imageSize; i++) { assert(i == 0 || dstIndices[i] > dstIndices[i - 1]); @@ -1538,7 +1538,7 @@ void TVectorImage::insertImage(const TVectorImageP &img, const vector &dstI } m_imp->reindexEdges(changedStrokeArray, true); - notifyChangedStrokes(changedStrokeArray, vector(), false); + notifyChangedStrokes(changedStrokeArray, std::vector(), false); //m_imp->computeRegions(); } @@ -1559,13 +1559,13 @@ void TVectorImage::enableMinimizeEdges(bool enabled) //----------------------------------------------------------------------------- -TVectorImageP TVectorImage::splitImage(const vector &indices, bool removeFlag) +TVectorImageP TVectorImage::splitImage(const std::vector &indices, bool removeFlag) { TVectorImageP out = new TVectorImage; out->m_imp->m_maxGroupId = m_imp->m_maxGroupId; out->m_imp->m_maxGhostGroupId = m_imp->m_maxGhostGroupId; - vector toBeRemoved; + std::vector toBeRemoved; TPalette *vp = getPalette(); if (vp) @@ -1591,7 +1591,7 @@ TVectorImageP TVectorImage::splitImage(const vector &indices, bool removeFl TVectorImageP TVectorImage::splitSelected(bool removeFlag) { TVectorImageP out = new TVectorImage; - vector toBeRemoved; + std::vector toBeRemoved; for (UINT i = 0; i < getStrokeCount(); ++i) { VIStroke *ref = m_imp->m_strokes[i]; @@ -1671,7 +1671,7 @@ void TVectorImage::getUsedStyles(std::set &styles) const int styleId = srcStroke->m_s->getStyle(); if (styleId != 0) styles.insert(styleId); - list::const_iterator it = srcStroke->m_edgeList.begin(); + std::list::const_iterator it = srcStroke->m_edgeList.begin(); for (; it != srcStroke->m_edgeList.end(); ++it) { styleId = (*it)->m_styleId; if (styleId != 0) @@ -1787,12 +1787,12 @@ bool TVectorImage::isComputedRegionAlmostOnce() const //----------------------------------------------------------------------------- -void TVectorImage::splitStroke(int strokeIndex, const vector &sortedWRanges) +void TVectorImage::splitStroke(int strokeIndex, const std::vector &sortedWRanges) { m_imp->splitStroke(strokeIndex, sortedWRanges); } -void TVectorImage::Imp::splitStroke(int strokeIndex, const vector &sortedWRanges) +void TVectorImage::Imp::splitStroke(int strokeIndex, const std::vector &sortedWRanges) { int i; VIStroke *subV = 0; @@ -1839,14 +1839,14 @@ if (vs->m_s->isSelfLoop()) m_regions.clear(); - list origEdgeList; //metto al pizzo la edge list della stroke, perche' la erase intersection ne fara' scempio - list::iterator it = vs->m_edgeList.begin(), it_e = vs->m_edgeList.end(); + std::list origEdgeList; //metto al pizzo la edge std::list della stroke, perche' la erase intersection ne fara' scempio + std::list::iterator it = vs->m_edgeList.begin(), it_e = vs->m_edgeList.end(); for (; it != it_e; ++it) origEdgeList.push_back(new TEdge(**it, false)); removeStroke(strokeIndex, false); - vector> edgeList(sortedWRanges.size()); + std::vector> edgeList(sortedWRanges.size()); strokeIndex--; int wSize = (int)sortedWRanges.size(); @@ -1879,7 +1879,7 @@ if (vs->m_s->isSelfLoop()) /*assert(m_strokes[strokeIndex]->m_edgeList.empty()); assert(m_strokes[strokeIndex-wSize+1]->m_edgeList.empty());*/ - list::const_iterator it = origEdgeList.begin(), it_e = origEdgeList.end(); + std::list::const_iterator it = origEdgeList.begin(), it_e = origEdgeList.end(); for (; it != it_e; ++it) { double wMin = tmin((*it)->m_w0, (*it)->m_w1); double wMax = tmax((*it)->m_w0, (*it)->m_w1); @@ -1919,8 +1919,8 @@ if (vs->m_s->isSelfLoop()) { VIStroke *s0 = m_strokes[strokeIndex]; VIStroke *s1 = m_strokes[strokeIndex - wSize + 1]; - list &l0 = edgeList.back(); - list &l1 = edgeList.front(); + std::list &l0 = edgeList.back(); + std::list &l1 = edgeList.front(); //assert(s0->m_edgeList.empty()); //assert(s1->m_edgeList.empty()); @@ -1932,7 +1932,7 @@ if (vs->m_s->isSelfLoop()) VIStroke *s = new VIStroke(joinStrokes(s0->m_s, s1->m_s), groupId); insertStrokeAt(s, strokeIndex); - list::iterator it = l0.begin(), it_e = l0.end(); + std::list::iterator it = l0.begin(), it_e = l0.end(); for (; it != it_e; ++it) { (*it)->m_s = s->m_s; (*it)->m_index = strokeIndex; @@ -1952,7 +1952,7 @@ if (vs->m_s->isSelfLoop()) assert(l1.empty()); edgeList.erase(edgeList.begin()); - vector appSortedWRanges; + std::vector appSortedWRanges; wSize--; @@ -1982,10 +1982,10 @@ if (vs->m_s->isSelfLoop()) //----------------------------------------------------------------------------- -void computeEdgeList(TStroke *newS, const list &edgeList1, bool join1AtBegin, - const list &edgeList2, bool join2AtBegin, list &edgeList) +void computeEdgeList(TStroke *newS, const std::list &edgeList1, bool join1AtBegin, + const std::list &edgeList2, bool join2AtBegin, std::list &edgeList) { - list::const_iterator it; + std::list::const_iterator it; if (!edgeList1.empty()) { TStroke *s1 = edgeList1.front()->m_s; @@ -2035,21 +2035,21 @@ void computeEdgeList(TStroke *newS, const list &edgeList1, bool join1At //#include "tpalette.h" #include "tcolorstyles.h" -void printEdges(ofstream &os, char *str, TPalette *plt, const list &edges) +void printEdges(std::ofstream &os, char *str, TPalette *plt, const std::list &edges) { - list::const_iterator it; + std::list::const_iterator it; - os << str << endl; + os << str << std::endl; for (it = edges.begin(); it != edges.end(); ++it) { TColorStyle *style = plt->getStyle((*it)->m_styleId); TPixel32 color = style->getMainColor(); - os << "w0-w1:(" << (*it)->m_w0 << "-->" << (*it)->m_w1 << ")" << endl; - os << "color=(" << color.r << "," << color.g << "," << color.b << ")" << endl; + os << "w0-w1:(" << (*it)->m_w0 << "-->" << (*it)->m_w1 << ")" << std::endl; + os << "color=(" << color.r << "," << color.g << "," << color.b << ")" << std::endl; } - os << endl - << endl - << endl; + os << std::endl + << std::endl + << std::endl; } #else #define printEdges @@ -2058,7 +2058,7 @@ void printEdges(ofstream &os, char *str, TPalette *plt, const list &edg //----------------------------------------------------------------------------- #ifdef _DEBUG -void TVectorImage::Imp::printStrokes(ofstream &os) +void TVectorImage::Imp::printStrokes(std::ofstream &os) { for (int i = 0; i < (int)m_strokes.size(); i++) { os << "*****stroke #" << i << " *****"; @@ -2110,7 +2110,7 @@ VIStroke *TVectorImage::Imp::extendStrokeSmoothly(int index, const TThickPoint & stroke->setControlPoint(cpCount - 2, middleP * 0.1 + stroke->getControlPoint(cpCount - 3) * 0.9); } - vector points(cpCount); + std::vector points(cpCount); for (int i = 0; i < cpCount - 1; i++) points[i] = stroke->getControlPoint((cpIndex == 0) ? cpCount - i - 1 : i); points[cpCount - 1] = pos; @@ -2118,11 +2118,11 @@ VIStroke *TVectorImage::Imp::extendStrokeSmoothly(int index, const TThickPoint & TStroke *newStroke = new TStroke(points); newStroke->setStyle(styleId); newStroke->outlineOptions() = stroke->outlineOptions(); - list oldEdgeList, emptyList; + std::list oldEdgeList, emptyList; computeEdgeList(newStroke, m_strokes[index]->m_edgeList, cpIndex == 0, emptyList, 0, oldEdgeList); - vector toBeDeleted; + std::vector toBeDeleted; toBeDeleted.push_back(index); removeStrokes(toBeDeleted, true, false); @@ -2144,7 +2144,7 @@ VIStroke *TVectorImage::Imp::extendStroke(int index, const TThickPoint &p, int c TStroke *ret; int cpCount = stroke->getControlPointCount(); int count = 0; - vector points(cpCount + 2); + std::vector points(cpCount + 2); int i, incr = (cpIndex == 0) ? -1 : 1; for (i = ((cpIndex == 0) ? cpCount - 1 : 0); i != cpIndex + incr; i += incr) points[count++] = stroke->getControlPoint(i); @@ -2156,12 +2156,12 @@ VIStroke *TVectorImage::Imp::extendStroke(int index, const TThickPoint &p, int c newStroke->setStyle(stroke->getStyle()); newStroke->outlineOptions() = stroke->outlineOptions(); ret = newStroke; - list oldEdgeList, emptyList; + std::list oldEdgeList, emptyList; if (m_computedAlmostOnce) computeEdgeList(newStroke, m_strokes[index]->m_edgeList, cpIndex == 0, emptyList, false, oldEdgeList); - vector toBeDeleted; + std::vector toBeDeleted; toBeDeleted.push_back(index); removeStrokes(toBeDeleted, true, false); @@ -2192,7 +2192,7 @@ VIStroke *TVectorImage::Imp::joinStroke(int index1, int index2, int cpIndex1, in int styleId = stroke1->getStyle(); int count = 0; - vector points(cpCount1 + ((index1 != index2) ? cpCount2 : 1) + 1); + std::vector points(cpCount1 + ((index1 != index2) ? cpCount2 : 1) + 1); int i, incr = (cpIndex1 == 0) ? -1 : 1; for (i = ((cpIndex1 == 0) ? cpCount1 - 1 : 0); i != cpIndex1 + incr; i += incr) points[count++] = stroke1->getControlPoint(i); @@ -2210,13 +2210,13 @@ VIStroke *TVectorImage::Imp::joinStroke(int index1, int index2, int cpIndex1, in //ret = newStroke; if (index1 == index2) newStroke->setSelfLoop(); - list oldEdgeList, emptyList; + std::list oldEdgeList, emptyList; computeEdgeList(newStroke, m_strokes[index1]->m_edgeList, cpIndex1 == 0, (index1 != index2) ? m_strokes[index2]->m_edgeList : emptyList, cpIndex2 == 0, oldEdgeList); - vector toBeDeleted; + std::vector toBeDeleted; toBeDeleted.push_back(index1); if (index1 != index2) toBeDeleted.push_back(index2); @@ -2292,7 +2292,7 @@ VIStroke *TVectorImage::Imp::joinStrokeSmoothly(int index1, int index2, int cpIn } if (stroke1 == stroke2) { - list oldEdgeList, emptyList; + std::list oldEdgeList, emptyList; computeEdgeList(stroke1, m_strokes[index1]->m_edgeList, cpIndex1 == 0, emptyList, false, oldEdgeList); eraseIntersection(index1); @@ -2305,7 +2305,7 @@ VIStroke *TVectorImage::Imp::joinStrokeSmoothly(int index1, int index2, int cpIn //nundo->m_newStrokeId=stroke1->getId(); } - vector points; + std::vector points; points.reserve(cpCount1 + cpCount2 - 1); int incr = (cpIndex1) ? 1 : -1; @@ -2329,7 +2329,7 @@ VIStroke *TVectorImage::Imp::joinStrokeSmoothly(int index1, int index2, int cpIn ret = newStroke; //nundo->m_newStroke=new TStroke(*newStroke); //nundo->m_newStrokeId=newStroke->getId(); - list oldEdgeList; + std::list oldEdgeList; //ofstream os("c:\\temp\\edges.txt"); //printEdges(os, "****edgelist1", getPalette(), m_imp->m_strokes[index1]->m_edgeList); @@ -2339,7 +2339,7 @@ VIStroke *TVectorImage::Imp::joinStrokeSmoothly(int index1, int index2, int cpIn m_strokes[index2]->m_edgeList, cpIndex2 == 0, oldEdgeList); //printEdges(os, "****edgelist", getPalette(), oldEdgeList); - vector toBeDeleted; + std::vector toBeDeleted; toBeDeleted.push_back(index1); toBeDeleted.push_back(index2); removeStrokes(toBeDeleted, true, false); @@ -2493,7 +2493,7 @@ int TVectorImage::ungroup(int fromIndex) m_imp->m_insideGroup = TGroupId(); assert(m_imp->m_strokes[fromIndex]->m_groupId.isGrouped() != 0); - vector changedStrokes; + std::vector changedStrokes; int toIndex = fromIndex + 1; @@ -2516,7 +2516,7 @@ int TVectorImage::ungroup(int fromIndex) changedStrokes.push_back(i); } - notifyChangedStrokes(changedStrokes, vector(), false); + notifyChangedStrokes(changedStrokes, std::vector(), false); return toIndex - fromIndex + 1; } @@ -2578,7 +2578,7 @@ void TVectorImage::group(int fromIndex, int count) { int i; assert(count >= 0); - vector changedStroke; + std::vector changedStroke; TGroupId parent = TGroupId(this, false); @@ -2591,7 +2591,7 @@ void TVectorImage::group(int fromIndex, int count) m_imp->regroupGhosts(changedStroke); - notifyChangedStrokes(changedStroke, vector(), false); + notifyChangedStrokes(changedStroke, std::vector(), false); #ifdef _DEBUG m_imp->checkGroups(); @@ -2814,8 +2814,8 @@ TGroupId::TGroupId(TVectorImage *vi, bool isGhost) void TVectorImage::Imp::checkGroups() { TGroupId currGroupId; - set groupSet; - set::iterator it; + std::set groupSet; + std::set::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.h index a1b2a9a..faf64d6 100644 --- a/toonz/sources/common/tvectorimage/tvectorimageP.h +++ b/toonz/sources/common/tvectorimage/tvectorimageP.h @@ -21,7 +21,7 @@ class TGroupId { public: - vector m_id; //m_id[i-1] e' parent di m_id[i] + std::vector m_id; //m_id[i-1] e' parent di m_id[i] TGroupId() : m_id() {} @@ -64,7 +64,7 @@ public: TStroke *m_s; bool m_isPoint; bool m_isNewForFill; - list m_edgeList; + std::list m_edgeList; TGroupId m_groupId; VIStroke(TStroke *s, const TGroupId &StrokeId) @@ -76,7 +76,7 @@ public: { delete m_s; - list::iterator it, it_b = m_edgeList.begin(), it_e = m_edgeList.end(); + std::list::iterator it, it_b = m_edgeList.begin(), it_e = m_edgeList.end(); for (it = it_b; it != it_e; ++it) if ((*it)->m_toBeDeleted) delete *it; @@ -86,7 +86,7 @@ public: bool inline removeEdge(TEdge *e) { - list::iterator it = m_edgeList.begin(); + std::list::iterator it = m_edgeList.begin(); while (it != m_edgeList.end() && *it != e) it++; if (*it == e) { @@ -137,10 +137,10 @@ public: bool m_notIntersectingStrokes, m_computeRegions; TGroupId m_insideGroup; - vector m_strokes; + std::vector m_strokes; double m_autocloseTolerance; IntersectionData *m_intersectionData; - vector m_regions; + std::vector m_regions; TThread::Mutex *m_mutex; Imp(TVectorImage *vi); ~Imp(); @@ -157,7 +157,7 @@ public: int computeRegions(); void reindexEdges(UINT strokeIndex); - void reindexEdges(const vector &indexes, bool areAdded); + void reindexEdges(const std::vector &indexes, bool areAdded); void checkRegionDbConsistency(); void cloneRegions(TVectorImage::Imp &out, bool doComputeRegions = true); @@ -165,7 +165,7 @@ public: void eraseIntersection(int index); UINT getFillData(std::unique_ptr& v); void setFillData(std::unique_ptr const& v, UINT branchCount, bool doComputeRegions = true); - void notifyChangedStrokes(const vector &strokeIndexArray, const vector &oldVectorStrokeArray, bool areFlipped); + void notifyChangedStrokes(const std::vector &strokeIndexArray, const std::vector &oldVectorStrokeArray, bool areFlipped); void insertStrokeAt(VIStroke *stroke, int strokeIndex, bool recomputeRegions = true); void moveStroke(int fromIndex, int toIndex); void autoFill(int styleId, bool oddLevel); @@ -176,9 +176,9 @@ public: VIStroke *joinStrokeSmoothly(int index1, int index2, int cpIndex1, int cpIndex2); VIStroke *extendStroke(int index, const TThickPoint &p, int cpIndex); VIStroke *extendStrokeSmoothly(int index, const TThickPoint &p, int cpIndex); - void removeStrokes(const vector &toBeRemoved, bool deleteThem, bool recomputeRegions); + void removeStrokes(const std::vector &toBeRemoved, bool deleteThem, bool recomputeRegions); TStroke *removeStroke(int index, bool doComputeRegions); - void splitStroke(int strokeIndex, const vector &sortedWRanges); + void splitStroke(int strokeIndex, const std::vector &sortedWRanges); void moveStrokes(int fromIndex, int count, int moveBefore, bool regroup); TStroke *removeEndpoints(int strokeIndex); @@ -188,13 +188,13 @@ public: void rearrangeMultiGroup(); void reindexGroups(Imp &img); void addRegion(TRegion *region); - void regroupGhosts(vector &changedStrokes); + void regroupGhosts(std::vector &changedStrokes); bool inCurrentGroup(int strokeIndex) const; bool canMoveStrokes(int strokeIndex, int count, int moveBefore) const; #ifdef _DEBUG void checkIntersections(); - void checkRegions(const vector ®ions); - void printStrokes(ofstream &os); + void checkRegions(const std::vector ®ions); + void printStrokes(std::ofstream &os); void checkGroups(); #endif @@ -214,9 +214,9 @@ private: //Imp & operator=(const TVectorImage::Imp &); void eraseDeadIntersections(); IntersectedStroke *eraseBranch(Intersection *in, IntersectedStroke *is); - void doEraseIntersection(int index, vector *toBeDeleted = 0); + void doEraseIntersection(int index, std::vector *toBeDeleted = 0); void eraseEdgeFromStroke(IntersectedStroke *is); - bool areWholeGroups(const vector &indexes) const; + bool areWholeGroups(const std::vector &indexes) const; //accorpa tutti i gruppi ghost adiacenti in uno solo, e rinomina gruppi ghost separati con lo stesso id; si usa questa funzione dopo ula creazione di un gruppo o il move di strokes //--------------------NUOVO CALCOLO REGIONI------------------------------------------------ @@ -225,7 +225,7 @@ public: #ifdef LEVO vector existingRegions; TRegion *findRegionFromStroke(const IntersectStroke &stroke, const TPointD &p); - bool findNextStrokes(const TEdge &currEdge, multimap &nextEdges); + bool findNextStrokes(const TEdge &currEdge, std::multimap &nextEdges); bool addNextEdge(TEdge &edge, TRegion ®ion, TRegion *&existingRegion, bool isStartingEdge = false); bool addNextEdge(TAutocloseEdge &edge, TRegion ®ion, TRegion *&existingRegion); bool storeRegion(TRegion *region, const TPointD &p); @@ -233,8 +233,8 @@ public: bool exploreAndAddNextEdge(TEdge &edge, TEdge &nextEdge, TRegion ®ion, TRegion *&existingRegion); bool addNextAutocloseEdge(TEdge &edge, TAutocloseEdge &nextEdge, TRegion ®ion, TRegion *&existingRegion); bool addNextAutocloseEdge(TAutocloseEdge &edge, TEdge &nextEdge, TRegion ®ion, TRegion *&existingRegion); - void computeAutocloseSegments(const TEdge &currEdge, int strokeIndex, multimap &segments); - void computeAutocloseSegmentsSameStroke(const TEdge &currEdge, multimap &segments); + void computeAutocloseSegments(const TEdge &currEdge, int strokeIndex, std::multimap &segments); + void computeAutocloseSegmentsSameStroke(const TEdge &currEdge, std::multimap &segments); #endif //-------------------------------------------------------------------------------------- @@ -245,7 +245,7 @@ private: Imp &operator=(const Imp &); }; -void addRegion(vector ®ionArray, TRegion *region); +void addRegion(std::vector ®ionArray, TRegion *region); //============================================================================= #endif diff --git a/toonz/sources/common/tvrender/tcolorstyles.cpp b/toonz/sources/common/tvrender/tcolorstyles.cpp index ffdad0b..c9fbafb 100644 --- a/toonz/sources/common/tvrender/tcolorstyles.cpp +++ b/toonz/sources/common/tvrender/tcolorstyles.cpp @@ -206,7 +206,7 @@ void TColorStyle::makeIcon(const TDimension &d) img->setPalette(tmpPalette.getPointer()); checkErrorsByGL; - vector points(3); + std::vector points(3); if (isRegionStyle() && !isStrokeStyle()) { points[0] = TThickPoint(-55, -50, 1); @@ -401,7 +401,7 @@ public: throw TException("Duplicate color style declaration. id = " + toString(id)); } m_table.insert(std::make_pair(id, Item(style))); - vector ids; + std::vector ids; style->getObsoleteTagIds(ids); for (std::vector::iterator it = ids.begin(); it != ids.end(); ++it) { if (m_table.find(*it) != m_table.end()) { @@ -422,7 +422,7 @@ public: return it->second.m_style->clone(); } - void getAllTags(vector &tags) + void getAllTags(std::vector &tags) { tags.clear(); tags.reserve(m_table.size()); @@ -487,7 +487,7 @@ void TColorStyle::drawStroke(TFlash &flash, const TStroke *s) const { bool isCenterline = false; double minThickness, maxThickness = 0; - wstring quality = flash.getLineQuality(); + std::wstring quality = flash.getLineQuality(); double thickness = computeAverageThickness(s, minThickness, maxThickness); if (minThickness == maxThickness && minThickness == 0) return; @@ -530,13 +530,13 @@ void TColorStyle::drawStroke(TFlash &flash, const TStroke *s) const // (*): In such case, the flag is mandatory. void TColorStyle::save(TOutputStreamInterface &os) const { - wstring name = getName(); + std::wstring name = getName(); bool numberedName = !name.empty() && ('0' <= name[0] && name[0] <= '9' || name[0] == '_'); if (m_flags > 0 || (name.length() == 1 && numberedName)) os << ("_" + QString::number(m_flags)).toStdString(); - wstring gname = getGlobalName(); - wstring origName = getOriginalName(); + std::wstring gname = getGlobalName(); + std::wstring origName = getOriginalName(); if (gname != L"") { os << toString(L"|" + gname); @@ -559,9 +559,9 @@ void TColorStyle::save(TOutputStreamInterface &os) const TColorStyle *TColorStyle::load(TInputStreamInterface &is) { - string name; - wstring gname; - wstring origName; + std::string name; + std::wstring gname; + std::wstring origName; bool isEdited = false; is >> name; @@ -620,7 +620,7 @@ TColorStyle *TColorStyle::create(int tagId) //------------------------------------------------------------------- -void TColorStyle::getAllTags(vector &tags) +void TColorStyle::getAllTags(std::vector &tags) { ColorStyleList::instance()->getAllTags(tags); } diff --git a/toonz/sources/common/tvrender/tflash.cpp b/toonz/sources/common/tvrender/tflash.cpp index bb5d752..acc38a9 100644 --- a/toonz/sources/common/tvrender/tflash.cpp +++ b/toonz/sources/common/tvrender/tflash.cpp @@ -47,12 +47,12 @@ bool areTwEqual(TPointD p0, TPointD p1) } //------------------------------------------------------------------- -const wstring TFlash::ConstantLines = L"Low: Constant Thickness"; -const wstring TFlash::MixedLines = L"Medium: Mixed Thickness"; -const wstring TFlash::VariableLines = L"High: Variable Thickness"; +const std::wstring TFlash::ConstantLines = L"Low: Constant Thickness"; +const std::wstring TFlash::MixedLines = L"Medium: Mixed Thickness"; +const std::wstring TFlash::VariableLines = L"High: Variable Thickness"; Tiio::SwfWriterProperties::SwfWriterProperties() - : m_lineQuality("Curve Quality"), m_isCompressed("File Compression", true), m_autoplay("Autoplay", true), m_looping("Looping", true), m_jpgQuality("Jpg Quality", 0, 100, 90), m_url("URL", wstring()), m_preloader("Insert Preloader", false) + : m_lineQuality("Curve Quality"), m_isCompressed("File Compression", true), m_autoplay("Autoplay", true), m_looping("Looping", true), m_jpgQuality("Jpg Quality", 0, 100, 90), m_url("URL", std::wstring()), m_preloader("Insert Preloader", false) { m_lineQuality.addValue(TFlash::MixedLines); m_lineQuality.addValue(TFlash::ConstantLines); @@ -102,7 +102,7 @@ public: bool m_skip; bool m_toBeDeleted; bool m_isPoint; - vector m_quads; + std::vector m_quads; PolyStyle m_fillStyle1; PolyStyle m_fillStyle2; PolyStyle m_lineStyle; @@ -180,7 +180,7 @@ double computeAverageThickness(const TStroke *s) return resThick / (s->getControlPointCount() - 4); } -void putquads(const TStroke *s, double w0, double w1, vector &quads) +void putquads(const TStroke *s, double w0, double w1, std::vector &quads) { int chunkIndex0, chunkIndex1, i; double dummy; @@ -198,18 +198,18 @@ void putquads(const TStroke *s, double w0, double w1, vector &quad //------------------------------------------------------------------- -void computeOutlineBoundary(vector &outlines, list &polylinesArray, const TPixel &color) +void computeOutlineBoundary(std::vector &outlines, std::list &polylinesArray, const TPixel &color) { UINT size = polylinesArray.size(); - vector> quads; + std::vector> quads; computeSweepBoundary(outlines, quads); outlines.clear(); std::list::iterator it = polylinesArray.begin(); std::advance(it, size); for (int i = 0; i < (int)quads.size(); i++) { - vector &q = quads[i]; + std::vector &q = quads[i]; polylinesArray.push_back(FlashPolyline()); polylinesArray.back().m_quads = quads[i]; @@ -224,11 +224,11 @@ void computeOutlineBoundary(vector &outlines, list &po // TFlash::drawSegments and TFlash::drawquads cannot be inline defined // since size of TSegment and TQuadratic are unkown in the header -void TFlash::drawSegments(const vector segmentArray, bool isGradientColor) +void TFlash::drawSegments(const std::vector segmentArray, bool isGradientColor) { } -void TFlash::drawquads(const vector quadsArray) +void TFlash::drawquads(const std::vector quadsArray) { } @@ -295,7 +295,7 @@ bool PolyStyle::operator<(const PolyStyle &p) const //------------------------------------------------------------------- void computeQuadChain(const TEdge &e, - vector &quadArray, vector &toBeDeleted) + std::vector &quadArray, std::vector &toBeDeleted) { int chunk_b, chunk_e, chunk = -1; double t_b, t_e, w0, w1; diff --git a/toonz/sources/common/tvrender/tfont_proxy.cpp b/toonz/sources/common/tvrender/tfont_proxy.cpp index b2727cb..68b6e36 100644 --- a/toonz/sources/common/tvrender/tfont_proxy.cpp +++ b/toonz/sources/common/tvrender/tfont_proxy.cpp @@ -124,7 +124,7 @@ void TFontManager::loadFontNames() //!\note Throws TFontCreationError if the font could not be created, and //!leaves the old font as current. -void TFontManager::setFamily(const wstring family) +void TFontManager::setFamily(const std::wstring family) { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); @@ -141,7 +141,7 @@ void TFontManager::setFamily(const wstring family) //!\note Throws TFontCreationError if the font could not be created, and //!leaves the old font as current. -void TFontManager::setTypeface(const wstring typeface) +void TFontManager::setTypeface(const std::wstring typeface) { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); @@ -159,7 +159,7 @@ void TFontManager::setTypeface(const wstring typeface) //-------------------------------------------------------------- -wstring TFontManager::getCurrentFamily() const +std::wstring TFontManager::getCurrentFamily() const { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); @@ -178,7 +178,7 @@ wstring TFontManager::getCurrentFamily() const //-------------------------------------------------------------- -wstring TFontManager::getCurrentTypeface() const +std::wstring TFontManager::getCurrentTypeface() const { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); @@ -197,7 +197,7 @@ wstring TFontManager::getCurrentTypeface() const //-------------------------------------------------------------- -void TFontManager::getAllFamilies(vector &families) const +void TFontManager::getAllFamilies(std::vector &families) const { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); @@ -214,7 +214,7 @@ void TFontManager::getAllFamilies(vector &families) const //-------------------------------------------------------------- -void TFontManager::getAllTypefaces(vector &typefaces) const +void TFontManager::getAllTypefaces(std::vector &typefaces) const { QLocalSocket socket; tipc::startSlaveConnection(&socket, t32bitsrv::srvName(), -1, t32bitsrv::srvCmdline()); diff --git a/toonz/sources/common/tvrender/tinbetween.cpp b/toonz/sources/common/tvrender/tinbetween.cpp index 4dcf7bd..7972d22 100644 --- a/toonz/sources/common/tvrender/tinbetween.cpp +++ b/toonz/sources/common/tvrender/tinbetween.cpp @@ -376,7 +376,7 @@ void findBestSolution(const TStroke *stroke1, const TStroke *stroke2, if (r == partialAngles1Size) { UINT j; - vector> angles1; + std::vector> angles1; std::list>::iterator it = partialSolution.begin(); @@ -388,8 +388,8 @@ void findBestSolution(const TStroke *stroke1, const TStroke *stroke2, } UINT angles1Size = angles1.size(); - vector rationAngles(angles1Size), ratioLength(angles1Size + 1); - vector ratioX, ratioY; + std::vector rationAngles(angles1Size), ratioLength(angles1Size + 1); + std::vector ratioX, ratioY; for (j = 0; j < angles1Size; j++) { rationAngles[j] = fabs(angles1[j].second - angles2[j].second) / (angles1[j].second + angles2[j].second); @@ -533,7 +533,7 @@ void findBestSolution(const TStroke *stroke1, const TStroke *stroke2, { assert(angles1.size() > angles2.size()); - list> partialSolution; + std::list> partialSolution; findBestSolution(stroke1, stroke2, &(angles1[0]), angles1.size(), @@ -625,7 +625,7 @@ TStroke *extract(const TStroke *source, UINT firstQuad, UINT lastQuad) UINT cpIndex0 = firstQuad * 2; UINT cpIndex1 = lastQuad * 2 + 2; - vector points(cpIndex1 - cpIndex0 + 1); + std::vector points(cpIndex1 - cpIndex0 + 1); UINT count = 0; for (UINT j = cpIndex0; j <= cpIndex1; j++) { points[count++] = source->getControlPoint(j); @@ -636,7 +636,7 @@ TStroke *extract(const TStroke *source, UINT firstQuad, UINT lastQuad) //-------------------------------------------------------------------------------------- -void sample(const TStroke *stroke, int samplingSize, vector &sampledPoint) +void sample(const TStroke *stroke, int samplingSize, std::vector &sampledPoint) { double samplingFrequency = 1.0 / (double)samplingSize; sampledPoint.resize(samplingSize); @@ -676,8 +676,8 @@ public: //saved for optimization TAffine m_inverse; - vector m_firstStrokeCornerIndexes; - vector m_secondStrokeCornerIndexes; + std::vector m_firstStrokeCornerIndexes; + std::vector m_secondStrokeCornerIndexes; }; //---------------------- @@ -722,9 +722,9 @@ void TInbetween::Imp::computeTransformation() double cs, sn, totalLen1, totalLen2, constK, constQ, constB, constD, constA; UINT cpCount1, cpCount2; TPointD stroke1Centroid, stroke2Centroid, stroke1Begin, stroke2Begin, stroke1End, stroke2End, versor1, versor2; - vector samplingPoint1(samplingPointNumber), samplingPoint2(samplingPointNumber); + std::vector samplingPoint1(samplingPointNumber), samplingPoint2(samplingPointNumber); TStroke *stroke1, *stroke2; - vector ratioSampling, weigths, subStrokeXScaling, subStrokeYScaling; + std::vector ratioSampling, weigths, subStrokeXScaling, subStrokeYScaling; UINT strokeCount1 = m_firstImage->getStrokeCount(); UINT strokeCount2 = m_lastImage->getStrokeCount(); @@ -784,7 +784,7 @@ void TInbetween::Imp::computeTransformation() } else { const double startMinAngle = 30.0; - vector> angles1, angles2; + std::vector> angles1, angles2; transform.m_type = StrokeTransform::GENERAL; @@ -834,7 +834,7 @@ void TInbetween::Imp::computeTransformation() if ((int)(angles1.size() + angles2.size()) < lastAngle - firstAngle + 1) { double tempAngle; - vector sortedAngles1, sortedAngles2; + std::vector sortedAngles1, sortedAngles2; sortedAngles1.reserve(angles1.size()); sortedAngles2.reserve(angles2.size()); for (j = 0; j < angles1.size(); j++) { @@ -847,7 +847,7 @@ void TInbetween::Imp::computeTransformation() if (tempAngle >= firstAngle && tempAngle <= lastAngle) sortedAngles2.push_back(tempAngle); } - vector sortedAngles(sortedAngles1.size() + sortedAngles2.size()); + std::vector sortedAngles(sortedAngles1.size() + sortedAngles2.size()); std::sort(sortedAngles1.begin(), sortedAngles1.end()); std::sort(sortedAngles2.begin(), sortedAngles2.end()); @@ -1235,7 +1235,7 @@ void TInbetween::Imp::computeTransformation() ///////////////////////////////////////// compute centre of Rotation and Scaling - vector vpOld(cornerSize), vpNew(cornerSize); + std::vector vpOld(cornerSize), vpNew(cornerSize); TPointD pOld, pNew; for (j = 0; j < cornerSize - 1; j++) { @@ -1356,7 +1356,7 @@ TVectorImageP TInbetween::Imp::tween(double t) const assert(m_transformation.size() == strokeCount1); double totalLen1, totalLen2, len1, len2, step1, step2; - vector points; + std::vector points; TStroke *stroke1, *stroke2, *subStroke1, *subStroke2, *stroke; TAffine mt, invMatrix; diff --git a/toonz/sources/common/tvrender/tpalette.cpp b/toonz/sources/common/tvrender/tpalette.cpp index 3ff2167..ab23024 100644 --- a/toonz/sources/common/tvrender/tpalette.cpp +++ b/toonz/sources/common/tvrender/tpalette.cpp @@ -39,7 +39,7 @@ const int maxStyleIndex = 32765; // //------------------------------------------------------------------- -TPalette::Page::Page(wstring name) +TPalette::Page::Page(std::wstring name) : m_name(name), m_index(-1), m_palette(0) { } @@ -189,7 +189,7 @@ TPalette::TPalette() : m_version(0), m_isCleanupPalette(false), m_currentFrame(-1), m_dirtyFlag(false), m_mutex(QMutex::Recursive), m_isLocked(false), m_askOverwriteFlag(false) { QString tempName(QObject::tr("colors")); - wstring pageName = tempName.toStdWString(); + std::wstring pageName = tempName.toStdWString(); Page *page = addPage(pageName); page->addStyle(TPixel32(255, 255, 255, 0)); page->addStyle(TPixel32(0, 0, 0, 255)); @@ -353,7 +353,7 @@ const TPalette::Page *TPalette::getPage(int pageIndex) const //------------------------------------------------------------------- -TPalette::Page *TPalette::addPage(wstring name) +TPalette::Page *TPalette::addPage(std::wstring name) { Page *page = new Page(name); page->m_index = getPageCount(); @@ -486,7 +486,7 @@ public: m_os << x; return *this; }; - TOutputStreamInterface &operator<<(string x) + TOutputStreamInterface &operator<<(std::string x) { m_os << x; return *this; @@ -510,7 +510,7 @@ public: { assert(m_rootDir != TFilePath()); - string name = "texture_" + toString(m_index); + std::string name = "texture_" + toString(m_index); m_os << name; TFilePath filename = ((m_rootDir + "textures") + name).withType("bmp"); @@ -552,7 +552,7 @@ public: m_is >> x; return *this; } - virtual TInputStreamInterface &operator>>(string &x) + virtual TInputStreamInterface &operator>>(std::string &x) { m_is >> x; return *this; @@ -574,7 +574,7 @@ public: virtual TInputStreamInterface &operator>>(TRaster32P &x) { assert(m_rootDir != TFilePath()); - string name; + std::string name; m_is >> name; TFilePath filename = ((m_rootDir + "textures") + name).withType("bmp"); @@ -666,7 +666,7 @@ void TPalette::saveData(TOStream &os) int styleId = sat->first; StyleAnimation &animation = sat->second; - std::map attributes; + std::map attributes; attributes["id"] = toString(styleId); os.openChild("style", attributes); @@ -729,7 +729,7 @@ void TPalette::loadData(TIStream &is) VersionNumber version = is.getVersion(); - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "version") { is >> version.first >> version.second; @@ -754,7 +754,7 @@ void TPalette::loadData(TIStream &is) if (!is.openChild(tagName) || tagName != "page") throw TException("palette, expected tag "); { - wstring pageName; + std::wstring pageName; if (!is.openChild(tagName) || tagName != "name") throw TException("palette, expected tag "); @@ -947,7 +947,7 @@ void TPalette::merge(const TPalette *src, bool isFromStudioPalette) int pageCount = src->getPageCount(); for (i = 0; i < pageCount; i++) { const Page *srcPage = src->getPage(i); - wstring pageName = srcPage->getName(); + std::wstring pageName = srcPage->getName(); if (pageName == L"colors" && src->getPaletteName() != L"") pageName = src->getPaletteName(); Page *dstPage = addPage(pageName); //; diff --git a/toonz/sources/common/tvrender/tpaletteutil.cpp b/toonz/sources/common/tvrender/tpaletteutil.cpp index 01d5025..0960957 100644 --- a/toonz/sources/common/tvrender/tpaletteutil.cpp +++ b/toonz/sources/common/tvrender/tpaletteutil.cpp @@ -20,7 +20,7 @@ void mergePalette(const TPaletteP &targetPalette, std::map &indexTable assert(srcStyle); TPalette::Page *page = sourcePalette->getStylePage(srcStyleId); if (page) { - wstring pageName = page->getName(); + std::wstring pageName = page->getName(); int j = 0; for (j = 0; j < targetPalette->getPageCount(); j++) { if (targetPalette->getPage(j)->getName() != pageName) diff --git a/toonz/sources/common/tvrender/tregionprop.cpp b/toonz/sources/common/tvrender/tregionprop.cpp index 9fe775a..6ede1af 100644 --- a/toonz/sources/common/tvrender/tregionprop.cpp +++ b/toonz/sources/common/tvrender/tregionprop.cpp @@ -41,8 +41,8 @@ bool computeOutline(const TRegion *region, bool doAntialiasing = false; polyline.clear(); - vector polyline2d; - vector indices; + std::vector polyline2d; + std::vector indices; int i, edgeSize = region->getEdgeCount(), oldSize = 0; for (i = 0; i < edgeSize; i++) { diff --git a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp b/toonz/sources/common/tvrender/tsimplecolorstyles.cpp index dfb8b1f..f5731df 100644 --- a/toonz/sources/common/tvrender/tsimplecolorstyles.cpp +++ b/toonz/sources/common/tvrender/tsimplecolorstyles.cpp @@ -133,10 +133,10 @@ public: //---------------------------------------------- struct Key { - string m_name; + std::string m_name; TFrameId m_fid; T_hGlContext m_glContext; - Key(string name, TFrameId fid, T_hGlContext glContext) + Key(std::string name, TFrameId fid, T_hGlContext glContext) : m_name(name), m_fid(fid), m_glContext(glContext) {} }; @@ -234,7 +234,7 @@ public: } //-------------------------------------------- - GLuint getDisplayListId(TVectorImage *image, string name, TFrameId fid, const TVectorRenderData &rd) + GLuint getDisplayListId(TVectorImage *image, std::string name, TFrameId fid, const TVectorRenderData &rd) { QMutexLocker sl(&m_mutex); TColorFunction::Parameters parameters; @@ -649,7 +649,7 @@ void TCenterLineStrokeStyle::drawStroke(const TColorFunction *cf, const TStroke double s = 0; double length = stroke->getLength(); TPointD pos1, pos4; - vector pv; + std::vector pv; width = width / 2.; while (s <= length) { double step = 1.0; @@ -811,7 +811,7 @@ TRasterImagePatternStrokeStyle::TRasterImagePatternStrokeStyle() //----------------------------------------------------------------------------- -TRasterImagePatternStrokeStyle::TRasterImagePatternStrokeStyle(const string &patternName) +TRasterImagePatternStrokeStyle::TRasterImagePatternStrokeStyle(const std::string &patternName) : m_level(), m_name(patternName), m_space(20), m_rotation(0) { if (m_name != "") @@ -935,7 +935,7 @@ void TRasterImagePatternStrokeStyle::setParamValue(int index, double value) // // carico il pattern 'patternName' dalla directory dei custom styles // -void TRasterImagePatternStrokeStyle::loadLevel(const string &patternName) +void TRasterImagePatternStrokeStyle::loadLevel(const std::string &patternName) { struct locals { static TAffine getAffine(const TDimension &srcSize, const TDimension &dstSize) @@ -1027,7 +1027,7 @@ void TRasterImagePatternStrokeStyle::loadLevel(const string &patternName) //-------------------------------------------------------------------------------------------------- -void TRasterImagePatternStrokeStyle::computeTransformations(vector &transformations, const TStroke *stroke) const +void TRasterImagePatternStrokeStyle::computeTransformations(std::vector &transformations, const TStroke *stroke) const { const int frameCount = m_level->getFrameCount(); if (frameCount == 0) @@ -1070,7 +1070,7 @@ void TRasterImagePatternStrokeStyle::computeTransformations(vector &tra void TRasterImagePatternStrokeStyle::drawStroke( const TVectorRenderData &rd, - const vector &transformations, + const std::vector &transformations, const TStroke *stroke) const { TStopWatch sw; @@ -1175,7 +1175,7 @@ void TRasterImagePatternStrokeStyle::drawStroke(TFlash &flash, const TStroke *st return; } - vector transformations; + std::vector transformations; computeTransformations(transformations, stroke); assert(m_level->begin() != m_level->end()); TLevel::Iterator lit = m_level->begin(); @@ -1198,7 +1198,7 @@ void TRasterImagePatternStrokeStyle::loadData(TInputStreamInterface &is) { m_level = TLevelP(); m_name = ""; - string name; + std::string name; is >> name >> m_space >> m_rotation; if (name != "") { try { @@ -1217,7 +1217,7 @@ void TRasterImagePatternStrokeStyle::loadData(int ids, TInputStreamInterface &is m_level = TLevelP(); m_name = ""; - string name; + std::string name; is >> name; if (name != "") { try { @@ -1250,7 +1250,7 @@ TStrokeProp *TRasterImagePatternStrokeStyle::makeStrokeProp(const TStroke *strok //----------------------------------------------------------------------------- -void TRasterImagePatternStrokeStyle::getObsoleteTagIds(vector &ids) const +void TRasterImagePatternStrokeStyle::getObsoleteTagIds(std::vector &ids) const { ids.push_back(100); } @@ -1266,7 +1266,7 @@ TVectorImagePatternStrokeStyle::TVectorImagePatternStrokeStyle() //----------------------------------------------------------------------------- -TVectorImagePatternStrokeStyle::TVectorImagePatternStrokeStyle(const string &patternName) +TVectorImagePatternStrokeStyle::TVectorImagePatternStrokeStyle(const std::string &patternName) : m_level(), m_name(patternName), m_space(20), m_rotation(0) { loadLevel(patternName); @@ -1398,7 +1398,7 @@ void TVectorImagePatternStrokeStyle::setParamValue(int index, double value) //----------------------------------------------------------------------------- -void TVectorImagePatternStrokeStyle::loadLevel(const string &patternName) +void TVectorImagePatternStrokeStyle::loadLevel(const std::string &patternName) { m_level = TLevelP(); m_name = patternName; @@ -1407,7 +1407,7 @@ void TVectorImagePatternStrokeStyle::loadLevel(const string &patternName) TLevelReaderP lr(fp); m_level = lr->loadInfo(); TLevel::Iterator frameIt; - map colors; + std::map colors; for (frameIt = m_level->begin(); frameIt != m_level->end(); ++frameIt) { TVectorImageP img = lr->getFrameReader(frameIt->first)->load(); if (img) @@ -1417,7 +1417,7 @@ void TVectorImagePatternStrokeStyle::loadLevel(const string &patternName) //-------------------------------------------------------------------------------------------------- -void TVectorImagePatternStrokeStyle::computeTransformations(vector &transformations, const TStroke *stroke) const +void TVectorImagePatternStrokeStyle::computeTransformations(std::vector &transformations, const TStroke *stroke) const { const int frameCount = m_level->getFrameCount(); if (frameCount == 0) @@ -1469,7 +1469,7 @@ void TVectorImagePatternStrokeStyle::clearGlDisplayLists() //-------------------------------------------------------------------------------------------------- -void TVectorImagePatternStrokeStyle::drawStroke(const TVectorRenderData &rd, const vector &transformations, const TStroke *stroke) const +void TVectorImagePatternStrokeStyle::drawStroke(const TVectorRenderData &rd, const std::vector &transformations, const TStroke *stroke) const { const int frameCount = m_level->getFrameCount(); if (frameCount == 0) @@ -1700,7 +1700,7 @@ void TVectorImagePatternStrokeStyle::loadData(TInputStreamInterface &is) { m_level = TLevelP(); m_name = ""; - string name; + std::string name; is >> name >> m_space >> m_rotation; if (name != "") { try { @@ -1719,7 +1719,7 @@ void TVectorImagePatternStrokeStyle::loadData(int ids, TInputStreamInterface &is m_level = TLevelP(); m_name = ""; - string name; + std::string name; is >> name; if (name != "") { try { @@ -1752,7 +1752,7 @@ TStrokeProp *TVectorImagePatternStrokeStyle::makeStrokeProp(const TStroke *strok //----------------------------------------------------------------------------- -void TVectorImagePatternStrokeStyle::getObsoleteTagIds(vector &ids) const +void TVectorImagePatternStrokeStyle::getObsoleteTagIds(std::vector &ids) const { //ids.push_back(100); } diff --git a/toonz/sources/common/tvrender/tstrokeutil.cpp b/toonz/sources/common/tvrender/tstrokeutil.cpp index 99b68d2..ef3bbf4 100644 --- a/toonz/sources/common/tvrender/tstrokeutil.cpp +++ b/toonz/sources/common/tvrender/tstrokeutil.cpp @@ -26,8 +26,8 @@ namespace { -typedef vector TThickCubicArray; -typedef vector QuadStrokeChunkArray; +typedef std::vector TThickCubicArray; +typedef std::vector QuadStrokeChunkArray; //--------------------------------------------------------------------------- @@ -166,7 +166,7 @@ computeIncrement(double strokeLength, //----------------------------------------------------------------------------- -void detectEdges(const vector &pointArray, vector &edgeIndexArray) +void detectEdges(const std::vector &pointArray, std::vector &edgeIndexArray) { // ASSUNZIONE: sharpPointArray non contiene punti coincidenti adiacenti @@ -187,7 +187,7 @@ void detectEdges(const vector &pointArray, vector &edgeIndexArray const double alphaMax = 2.4; // ( 137.5°) const double dMin2 = dMin * dMin; const double dMax2 = dMax * dMax; - vector sharpnessArray; + std::vector sharpnessArray; sharpnessArray.push_back(TConsts::pi); // il primo punto e' un corner int nodeCount; for (nodeCount = 1; nodeCount < size - 1; ++nodeCount) { // scorre la sharpPointArray escludendo gli estremi @@ -380,7 +380,7 @@ void modifyControlPoints(TStroke &stroke, //----------------------------------------------------------------------------- void modifyControlPoints(TStroke &stroke, - const TStrokeDeformation &deformer, vector &controlPointLen) + const TStrokeDeformation &deformer, std::vector &controlPointLen) { UINT cpCount = stroke.getControlPointCount(); @@ -402,7 +402,7 @@ void modifyControlPoints(TStroke &stroke, //----------------------------------------------------------------------------- void modifyThickness(TStroke &stroke, const TStrokeDeformation &deformer, - vector &controlPointLen, bool exponentially) + std::vector &controlPointLen, bool exponentially) { UINT cpCount = stroke.getControlPointCount(); assert(controlPointLen.size() == cpCount); diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cpp index d91ada3..52ee5c1 100644 --- a/toonz/sources/common/tvrender/ttessellator.cpp +++ b/toonz/sources/common/tvrender/ttessellator.cpp @@ -307,7 +307,7 @@ void TglTessellator::tessellate(const TColorFunction *cf, const bool antiAliasin tglEnableLineSmooth(); for (TRegionOutline::Boundary::iterator poly_it = outline.m_exterior.begin(); poly_it != outline.m_exterior.end(); ++poly_it) { - vector v; + std::vector v; if (poly_it->size() == 0) continue; v.resize(poly_it->size() * 2); @@ -326,7 +326,7 @@ void TglTessellator::tessellate(const TColorFunction *cf, const bool antiAliasin } for (TRegionOutline::Boundary::iterator poly_it = outline.m_interior.begin(); poly_it != outline.m_interior.end(); ++poly_it) { - vector v; + std::vector v; v.resize(poly_it->size() * 2); int i = 0; for (TRegionOutline::PointVector::iterator it = poly_it->begin(); it != poly_it->end(); ++it) { diff --git a/toonz/sources/image/3gp/tiio_3gp.h b/toonz/sources/image/3gp/tiio_3gp.h index 7607a38..9b4f219 100644 --- a/toonz/sources/image/3gp/tiio_3gp.h +++ b/toonz/sources/image/3gp/tiio_3gp.h @@ -101,7 +101,7 @@ private: short m_resId; Track m_track; long m_depth; - vector currentTimes; + std::vector currentTimes; int m_lx, m_ly; public: diff --git a/toonz/sources/image/3gp/tiio_3gpW.cpp b/toonz/sources/image/3gp/tiio_3gpW.cpp index 9516220..9354d3a 100644 --- a/toonz/sources/image/3gp/tiio_3gpW.cpp +++ b/toonz/sources/image/3gp/tiio_3gpW.cpp @@ -197,8 +197,8 @@ string long2fourchar(TINT32 fcc) return s; } -const string CodecNamesId = "PU_CodecName"; -const string CodecQualityId = "PU_CodecQuality"; +const std::string CodecNamesId = "PU_CodecName"; +const std::string CodecQualityId = "PU_CodecQuality"; } //namespace diff --git a/toonz/sources/image/avi/tiio_avi.cpp b/toonz/sources/image/avi/tiio_avi.cpp index 9fae64e..6ce9fe5 100644 --- a/toonz/sources/image/avi/tiio_avi.cpp +++ b/toonz/sources/image/avi/tiio_avi.cpp @@ -36,7 +36,7 @@ void WideChar2Char(LPCWSTR wideCharStr, char *str, int strBuffSize) //------------------------------------------------------------------------------ -string buildAVIExceptionString(int rc) +std::string buildAVIExceptionString(int rc) { switch (rc) { CASE AVIERR_BADFORMAT : return "The file couldn't be read, indicating a corrupt file or an unrecognized format."; @@ -56,9 +56,9 @@ string buildAVIExceptionString(int rc) //------------------------------------------------------------------------------ -string SplitFourCC(DWORD fcc) +std::string SplitFourCC(DWORD fcc) { - string s; + std::string s; s += (char((fcc & 0x000000ff) >> 0)); s += (char((fcc & 0x0000ff00) >> 8)); s += (char((fcc & 0x00ff0000) >> 16)); @@ -246,7 +246,7 @@ void TLevelWriterAvi::searchForCodec() TEnumProperty *p = (TEnumProperty *)m_properties->getProperty("Codec"); assert(p); - wstring codecName = p->getValue(); + std::wstring codecName = p->getValue(); //-------- // cerco compressorName fra i codec @@ -276,8 +276,8 @@ void TLevelWriterAvi::searchForCodec() WideChar2Char(icinfo.szDescription, descr, sizeof(descr)); WideChar2Char(icinfo.szName, name, sizeof(name)); - string compressorName; - compressorName = string(name) + " '" + toString(bpp) + "' " + string(descr); + std::string compressorName; + compressorName = std::string(name) + " '" + toString(bpp) + "' " + std::string(descr); if (hic) { if (ICCompressQuery(hic, &inFmt, NULL) != ICERR_OK) { @@ -746,8 +746,8 @@ TLevelReaderAvi::TLevelReaderAvi(const TFilePath &path) ICGetInfo(m_hic, &icinfo, sizeof(ICINFO)); // Find out the compressor name WideChar2Char(icinfo.szDescription, descr, sizeof(descr)); WideChar2Char(icinfo.szName, name, sizeof(name)); - string compressorName; - compressorName = string(name) + " '" + toString(m_dstBitmapInfo->bmiHeader.biBitCount) + "' " + string(descr); + std::string compressorName; + compressorName = std::string(name) + " '" + toString(m_dstBitmapInfo->bmiHeader.biBitCount) + "' " + std::string(descr); TEnumProperty *p = (TEnumProperty *)m_info->m_properties->getProperty("Codec"); p->setValue(toWideString(compressorName)); m_decompressedBuffer = _aligned_malloc(m_dstBitmapInfo->bmiHeader.biSizeImage, 128); @@ -1087,10 +1087,10 @@ Tiio::AviWriterProperties::AviWriterProperties() continue; } - string compressorName; - compressorName = string(name) + " '" + toString(bpp) + "' " + string(descr); + std::string compressorName; + compressorName = std::string(name) + " '" + toString(bpp) + "' " + std::string(descr); - if (string(compressorName).find("Indeo") != -1) // per il momento togliamo i codec indeo + if (std::string(compressorName).find("Indeo") != -1) // per il momento togliamo i codec indeo { ICClose(hic); continue; diff --git a/toonz/sources/image/mov/tiio_mov.h b/toonz/sources/image/mov/tiio_mov.h index 312aa95..2162368 100644 --- a/toonz/sources/image/mov/tiio_mov.h +++ b/toonz/sources/image/mov/tiio_mov.h @@ -119,7 +119,7 @@ class DVAPI TLevelReaderMov : public TLevelReader Track m_track; MediaHandler m_timecodeHandler; long m_depth; - map currentTimes; + std::map currentTimes; int m_lx, m_ly; int m_hh, m_mm, m_ss, m_ff; TThread::Mutex m_mutex; diff --git a/toonz/sources/image/mov/tiio_movW.cpp b/toonz/sources/image/mov/tiio_movW.cpp index f41e612..b2a1e76 100644 --- a/toonz/sources/image/mov/tiio_movW.cpp +++ b/toonz/sources/image/mov/tiio_movW.cpp @@ -21,7 +21,7 @@ namespace { -const string firstFrameKey = "frst"; // First frame atom id +const std::string firstFrameKey = "frst"; // First frame atom id const int firstFrameKeySize = 4 * sizeof(char); // //------------------------------------------------------------------------------ @@ -212,8 +212,8 @@ TimeScale frameRateToTimeScale(double frameRate) //------------------------------------------------------------------------------- -//const string CodecNamesId = "PU_CodecName"; -//const string CodecQualityId = "PU_CodecQuality"; +//const std::string CodecNamesId = "PU_CodecName"; +//const std::string CodecQualityId = "PU_CodecQuality"; } //namespace @@ -290,7 +290,7 @@ void copy(TRasterP rin, PixelXRGB *bufout, int lx, int ly) //----------------------------------------------------------- /* -TWriterInfo *TWriterInfoMov::create(const string &) +TWriterInfo *TWriterInfoMov::create(const std::string &) { return new TWriterInfoMov(); } diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cpp index ca493bd..770e997 100644 --- a/toonz/sources/image/pli/pli_io.cpp +++ b/toonz/sources/image/pli/pli_io.cpp @@ -125,7 +125,7 @@ public: return *this; } MyOfstream &operator<<(const TRaster32P &r); - MyOfstream &operator<<(const string &r); + MyOfstream &operator<<(const std::string &r); MyOfstream &writeBuf(void *un, UINT s) { write((char *)un, s); @@ -150,7 +150,7 @@ MyOfstream &MyOfstream::operator<<(const TRaster32P &r) /*=====================================================================*/ -MyOfstream &MyOfstream::operator<<(const string &s) +MyOfstream &MyOfstream::operator<<(const std::string &s) { (*this) << (USHORT)s.size(); @@ -1282,7 +1282,7 @@ PliTag *ParsedPliImp::readColorTag() PliTag *ParsedPliImp::readStyleTag() { - vector paramArray; + std::vector paramArray; TUINT32 bufOffs = 0; int lenght = m_tagLength; UINT i; @@ -2006,7 +2006,7 @@ TUINT32 ParsedPliImp::writeGroupTag(GroupTag *tag) TUINT32 offset, tagLength; int maxval = 0, minval = 100000; - vector objectOffset(tag->m_numObjects); + std::vector objectOffset(tag->m_numObjects); unsigned int i; diff --git a/toonz/sources/image/pli/pli_io.h b/toonz/sources/image/pli/pli_io.h index 0e2fc2c..b82248f 100644 --- a/toonz/sources/image/pli/pli_io.h +++ b/toonz/sources/image/pli/pli_io.h @@ -108,7 +108,7 @@ public: Type m_type; double m_numericVal; TRaster32P m_r; - string m_string; + std::string m_string; TStyleParam() : m_type(SP_NONE), m_numericVal(0), m_r(), m_string() @@ -142,7 +142,7 @@ public: { } - TStyleParam(const string &x) + TStyleParam(const std::string &x) : m_type(SP_STRING), m_numericVal(0), m_r(), m_string(x) { } @@ -180,11 +180,11 @@ the description in the PLI specific document class TextTag : public PliObjectTag { public: - string m_text; + std::string m_text; TextTag(); TextTag(const TextTag &textTag); - TextTag(const string &text); + TextTag(const std::string &text); }; //===================================================================== @@ -506,7 +506,7 @@ public: //aggiuti questi 2 membri per salvare la paletta globale //vector m_idWrittenColorsArray; - vector m_palette_tags; + std::vector m_palette_tags; // these two functions are used to browse the tag list, // code example: for (PliTag *tag = getFirstTag(); tag; tag = getNextTag()) {} diff --git a/toonz/sources/image/pli/tags.cpp b/toonz/sources/image/pli/tags.cpp index c2d1d62..e64f14d 100644 --- a/toonz/sources/image/pli/tags.cpp +++ b/toonz/sources/image/pli/tags.cpp @@ -75,7 +75,7 @@ TextTag::TextTag(const TextTag &textTag) /*=====================================================================*/ -TextTag::TextTag(const string &text) +TextTag::TextTag(const std::string &text) : PliObjectTag(PliTag::TEXT), m_text(text) { } diff --git a/toonz/sources/image/pli/tiio_pli.cpp b/toonz/sources/image/pli/tiio_pli.cpp index 9900762..b1b41eb 100644 --- a/toonz/sources/image/pli/tiio_pli.cpp +++ b/toonz/sources/image/pli/tiio_pli.cpp @@ -30,10 +30,10 @@ namespace class PliOuputStream : public TOutputStreamInterface { - vector *m_stream; + std::vector *m_stream; public: - PliOuputStream(vector *stream) : m_stream(stream) {} + PliOuputStream(std::vector *stream) : m_stream(stream) {} TOutputStreamInterface &operator<<(double x) { m_stream->push_back(TStyleParam(x)); @@ -44,7 +44,7 @@ public: m_stream->push_back(TStyleParam(x)); return *this; } - TOutputStreamInterface &operator<<(string x) + TOutputStreamInterface &operator<<(std::string x) { m_stream->push_back(TStyleParam(x)); return *this; @@ -70,12 +70,12 @@ public: class PliInputStream : public TInputStreamInterface { - vector *m_stream; + std::vector *m_stream; VersionNumber m_version; int m_count; public: - PliInputStream(vector *stream, + PliInputStream(std::vector *stream, int majorVersion, int minorVersion) : m_stream(stream), m_version(majorVersion, minorVersion), m_count(0) {} @@ -91,7 +91,7 @@ public: x = (int)(*m_stream)[m_count++].m_numericVal; return *this; } - TInputStreamInterface &operator>>(string &x) + TInputStreamInterface &operator>>(std::string &x) { if ((*m_stream)[m_count].m_type == TStyleParam::SP_INT) x = toString((int)(*m_stream)[m_count++].m_numericVal); @@ -141,7 +141,7 @@ TPixel32 getColor(const TStroke *stroke) Crea la palette dei colori, in funzione di quelli trovati dalla funzione findColor */ -UINT findColor(const TPixel32 &color, const vector &colorArray) +UINT findColor(const TPixel32 &color, const std::vector &colorArray) { for (UINT i = 0; i < colorArray.size(); i++) if (colorArray[i] == color) @@ -177,7 +177,7 @@ void buildPalette(ParsedPli *pli, const TImageP img) //ilcampo m_id viene usato anche per mettere il frameIndex(per multi palette) assert(vPalette->getPageCount()); - vector pageNames(vPalette->getPageCount()); + std::vector pageNames(vPalette->getPageCount()); for (i = 0; i < pageNames.size(); i++) pageNames[i] = TStyleParam(toString(vPalette->getPage(i)->getName())); StyleTag *pageNamesTag = new StyleTag(0, 0, pageNames.size(), pageNames.data()); @@ -200,7 +200,7 @@ void buildPalette(ParsedPli *pli, const TImageP img) pageIndex = page->getIndex(); // TColorStyle*style = tempVecImg->getPalette()->getStyle(styleId); - vector stream; + std::vector stream; PliOuputStream chan(&stream); style->save(chan); //viene riempito lo stream; @@ -232,7 +232,7 @@ void buildPalette(ParsedPli *pli, const TImageP img) pageIndex = page->getIndex(); // TColorStyle*style = tempVecImg->getPalette()->getStyle(styleId); - vector stream; + std::vector stream; PliOuputStream chan(&stream); style->save(chan); //viene riempito lo stream; @@ -314,7 +314,7 @@ struct CreateStrokeData { void createStroke(ThickQuadraticChainTag *quadTag, TVectorImage *outVectImage, const CreateStrokeData &data) { - vector chunks(quadTag->m_numCurves); + std::vector chunks(quadTag->m_numCurves); for (UINT k = 0; k < quadTag->m_numCurves; k++) chunks[k] = &quadTag->m_curve[k]; @@ -457,13 +457,13 @@ TImageWriterPli::TImageWriterPli( //----------------------------------------------------------------------------- -void putStroke(TStroke *stroke, int &currStyleId, vector &tags) +void putStroke(TStroke *stroke, int &currStyleId, std::vector &tags) { double maxThickness = 0; assert(stroke); int chunkCount = stroke->getChunkCount(); - vector strokeChain(chunkCount); + std::vector strokeChain(chunkCount); int styleId = stroke->getStyle(); assert(styleId >= 0); @@ -535,8 +535,8 @@ void TImageWriterPli::save(const TImageP &img) pli->setFrameCount(m_lwp->m_frameNumber); // alloco la struttura che conterra' i tag per la vector image corrente - vector tags; - //tags = new vector; + std::vector tags; + //tags = new std::vector; //Store the precision scale to be used in saving the quadratics { @@ -704,7 +704,7 @@ TPalette *readPalette(GroupTag *paletteTag, int majorVersion, int minorVersion) } else continue; // i pli prima salvavano pure i colori non usati...evito di caricarli! - vector params(styleTag->m_numParams); + std::vector params(styleTag->m_numParams); for (int j = 0; j < styleTag->m_numParams; j++) params[j] = styleTag->m_param[j]; @@ -807,7 +807,7 @@ TImageReaderPli::TImageReaderPli( GroupTag *makeGroup(TVectorImageP &vi, int &currStyleId, int &index, int currDepth) { - vector tags; + std::vector tags; int i = index; while (i < (UINT)vi->getStrokeCount() && vi->getCommonGroupDepth(i, index) >= currDepth) { int strokeDepth = vi->getGroupDepth(i); diff --git a/toonz/sources/image/pli/tiio_pli.h b/toonz/sources/image/pli/tiio_pli.h index 36cab36..fac2456 100644 --- a/toonz/sources/image/pli/tiio_pli.h +++ b/toonz/sources/image/pli/tiio_pli.h @@ -16,7 +16,7 @@ class TWriterInfoPli : public TWriterInfo { public: ~TWriterInfoPli() {} - static TWriterInfo *create(const string &ext) { return new TWriterInfoPli(); } + static TWriterInfo *create(const std::string &ext) { return new TWriterInfoPli(); } TWriterInfo *clone() const { return new TWriterInfoPli(*this); } @@ -39,7 +39,7 @@ class TLevelWriterPli : public TLevelWriter UINT m_frameNumber; // vettore da utilizzare per il calcolo della palette - vector m_colorArray; + std::vector m_colorArray; public: TLevelWriterPli(const TFilePath &path, TPropertyGroup *winfo); diff --git a/toonz/sources/image/png/tiio_png.cpp b/toonz/sources/image/png/tiio_png.cpp index 1e4038f..2ae8eef 100644 --- a/toonz/sources/image/png/tiio_png.cpp +++ b/toonz/sources/image/png/tiio_png.cpp @@ -689,7 +689,7 @@ class PngWriter : public Tiio::Writer png_infop m_info_ptr; FILE *m_chan; bool m_matte; - vector *m_colormap; + std::vector *m_colormap; public: PngWriter(); diff --git a/toonz/sources/image/psd/tiio_psd.h b/toonz/sources/image/psd/tiio_psd.h index f46a94a..e1969a8 100644 --- a/toonz/sources/image/psd/tiio_psd.h +++ b/toonz/sources/image/psd/tiio_psd.h @@ -31,7 +31,7 @@ private: int m_layersCount; TPSDReader *m_psdreader; int m_layerId; - map m_frameTable; // frameID, layerId + std::map m_frameTable; // frameID, layerId public: static TLevelReader *create(const TFilePath &f); TThread::Mutex m_mutex; diff --git a/toonz/sources/image/quantel/tiio_quantel.cpp b/toonz/sources/image/quantel/tiio_quantel.cpp index b3fb944..7851697 100644 --- a/toonz/sources/image/quantel/tiio_quantel.cpp +++ b/toonz/sources/image/quantel/tiio_quantel.cpp @@ -10,7 +10,7 @@ //------------------------------------------------------------ namespace { - int getTypeFromExt(const string &ext) + int getTypeFromExt(const std::string &ext) { if (ext == "qnt") return QNT_FORMAT; diff --git a/toonz/sources/image/sgi/filesgi.cpp b/toonz/sources/image/sgi/filesgi.cpp index f5abd4b..e202b66 100644 --- a/toonz/sources/image/sgi/filesgi.cpp +++ b/toonz/sources/image/sgi/filesgi.cpp @@ -975,7 +975,7 @@ void SgiReader::readLine(short *buffer, int x0, int x1, int shrink) { // 64 -> 32 TPixel64 *pix = (TPixel64 *)buffer; - vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); + std::vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); if (m_header->zsize == 4) { new_getrow(m_header, &rbuf[0], m_currentY, 0); new_getrow(m_header, &gbuf[0], m_currentY, 1); @@ -1020,7 +1020,7 @@ void SgiReader::readLine(char *buffer, int x0, int x1, int shrink) if (BPP(m_header->type) == 1) //32 -> 32 { TPixel32 *pix = (TPixel32 *)buffer; - vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); + std::vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); if (m_header->zsize == 4) { new_getrow(m_header, &rbuf[0], m_currentY, 0); new_getrow(m_header, &gbuf[0], m_currentY, 1); @@ -1057,7 +1057,7 @@ void SgiReader::readLine(char *buffer, int x0, int x1, int shrink) } } else { // 64 -> 32 TPixel32 *pix = (TPixel32 *)buffer; - vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); + std::vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); if (m_header->zsize == 4) { new_getrow(m_header, &rbuf[0], m_currentY, 0); new_getrow(m_header, &gbuf[0], m_currentY, 1); @@ -1212,7 +1212,7 @@ void SgiWriter::writeLine(char *buffer) { new_putrow(m_header, buffer, m_currentY, 0); } else { - vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); + std::vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); TPixelRGBM32 *pix = (TPixelRGBM32 *)buffer; for (int i = 0; i < m_info.m_lx; ++i) { rbuf[i] = pix->r; @@ -1239,7 +1239,7 @@ void SgiWriter::writeLine(short *buffer) { if (m_header->dim < 3) { - vector tmp(m_info.m_lx); + std::vector tmp(m_info.m_lx); TPixelRGBM64 *pix = (TPixelRGBM64 *)buffer; for (int i = 0; i < m_info.m_lx; ++i) { tmp[i] = TPixelGR16::from(*pix).value; @@ -1247,7 +1247,7 @@ void SgiWriter::writeLine(short *buffer) } new_putrow(m_header, &tmp[0], m_currentY, 0); } else { - vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); + std::vector rbuf(m_info.m_lx), gbuf(m_info.m_lx), bbuf(m_info.m_lx), mbuf(m_info.m_lx); TPixelRGBM64 *pix = (TPixelRGBM64 *)buffer; for (int i = 0; i < m_info.m_lx; ++i) { rbuf[i] = pix->r; diff --git a/toonz/sources/image/svg/tiio_svg.cpp b/toonz/sources/image/svg/tiio_svg.cpp index 44a74e4..cc66413 100644 --- a/toonz/sources/image/svg/tiio_svg.cpp +++ b/toonz/sources/image/svg/tiio_svg.cpp @@ -1972,7 +1972,7 @@ void writeRegion(TRegion *r, TPalette *plt, QTextStream &out, double ly) { if (r->getEdgeCount() == 0) return; - vector quadsOutline; + std::vector quadsOutline; for (int i = 0; i < (int)r->getEdgeCount(); i++) { TEdge *e = r->getEdge(i); @@ -2038,7 +2038,7 @@ void writeOutlineStroke(TStroke *s, TPalette *plt, QTextStream &out, double ly, if (s->getMaxThickness() == 0) return; - vector quadsOutline; + std::vector quadsOutline; computeOutlines(s, 0, s->getChunkCount() - 1, quadsOutline, quality); if (quadsOutline.empty()) return; @@ -2192,12 +2192,12 @@ TStroke *buildStroke(NSVGpath *path, float width) assert((path->npts - 1) % 3 == 0); TThickPoint p0 = TThickPoint(path->pts[0], -path->pts[1], width); - vector points; + std::vector points; points.push_back(p0); for (int i = 1; i < path->npts; i += 3) { - vector chunkArray; + std::vector chunkArray; computeQuadraticsFromCubic(p0, TThickPoint(path->pts[2 * i], -path->pts[2 * i + 1], width), @@ -2289,7 +2289,7 @@ TImageP TImageReaderSvg::load() if (paintIndex!=-1) for (int i=0; i<(int)vapp->getRegionCount(); i++) vapp->getRegion(i)->setStyle(paintIndex); - vector indexes(vapp->getStrokeCount()); + std::vector indexes(vapp->getStrokeCount()); for (int i=0; i<(int)vapp->getStrokeCount() ;i++) indexes[i] = vimage->getStrokeCount()+i; vimage->insertImage(vapp, indexes);*/ diff --git a/toonz/sources/image/svg/tiio_svg.h b/toonz/sources/image/svg/tiio_svg.h index 1f500ff..138ef0c 100644 --- a/toonz/sources/image/svg/tiio_svg.h +++ b/toonz/sources/image/svg/tiio_svg.h @@ -55,7 +55,7 @@ class TLevelWriterSvg : public TLevelWriter // UINT m_frameNumber; // vettore da utilizzare per il calcolo della palette - // vector m_colorArray; + // std::vector m_colorArray; public: TLevelWriterSvg(const TFilePath &path, TPropertyGroup *winfo); diff --git a/toonz/sources/image/tga/tiio_tga.cpp b/toonz/sources/image/tga/tiio_tga.cpp index a9b3070..741bace 100644 --- a/toonz/sources/image/tga/tiio_tga.cpp +++ b/toonz/sources/image/tga/tiio_tga.cpp @@ -600,7 +600,7 @@ public: m_header.Width = m_info.m_lx; m_header.Height = m_info.m_ly; - wstring pixelSizeW = ((TEnumProperty *)(m_properties->getProperty("Bits Per Pixel")))->getValue().substr(0, 2); + std::wstring pixelSizeW = ((TEnumProperty *)(m_properties->getProperty("Bits Per Pixel")))->getValue().substr(0, 2); if (pixelSizeW == L"16") { m_header.ImagePixelSize = 16; m_writeLineProc = compressed diff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cpp index 1bfa09c..521dd2b 100644 --- a/toonz/sources/image/tif/tiio_tif.cpp +++ b/toonz/sources/image/tif/tiio_tif.cpp @@ -103,7 +103,7 @@ void TifReader::open(FILE *file) m_tiff = TIFFFdOpen(dup(fd), "", "rb"); #endif if (!m_tiff) { - string str("Tiff file closed"); + std::string str("Tiff file closed"); throw(str); } @@ -534,7 +534,7 @@ void TifReader::readLine(short *buffer, int x0, int x1, int shrink) void TifReader::readLine(char *buffer, int x0, int x1, int shrink) { if (this->m_info.m_bitsPerSample == 16 && this->m_info.m_samplePerPixel >= 3) { - vector app(4 * (m_info.m_lx)); + std::vector app(4 * (m_info.m_lx)); readLine(&app[0], x0, x1, shrink); TPixel64 *pixin = (TPixel64 *)&app[0]; @@ -758,12 +758,12 @@ TifWriter::~TifWriter() void TifWriter::open(FILE *file, const TImageInfo &info) { m_info = info; - string mode = "w"; + std::string mode = "w"; if (!m_properties) m_properties = new Tiio::TifWriterProperties(); - wstring byteOrdering = ((TEnumProperty *)(m_properties->getProperty("Byte Ordering")))->getValue(); + std::wstring byteOrdering = ((TEnumProperty *)(m_properties->getProperty("Byte Ordering")))->getValue(); if (byteOrdering == L"IBM PC") mode += "l"; else @@ -771,7 +771,7 @@ void TifWriter::open(FILE *file, const TImageInfo &info) TEnumProperty *p = (TEnumProperty *)(m_properties->getProperty("Bits Per Pixel")); assert(p); - string str = toString(p->getValue()); + std::string str = toString(p->getValue()); //const char* str = toString(p->getValue()).c_str(); m_bpp = atoi(str.c_str()); assert(m_bpp == 1 || m_bpp == 8 || m_bpp == 16 || m_bpp == 24 || m_bpp == 32 || m_bpp == 48 || m_bpp == 64); @@ -785,7 +785,7 @@ void TifWriter::open(FILE *file, const TImageInfo &info) if (!m_tiff) return; - wstring worientation = ((TEnumProperty *)(m_properties->getProperty("Orientation")))->getValue(); + std::wstring worientation = ((TEnumProperty *)(m_properties->getProperty("Orientation")))->getValue(); int orientation; if (worientation == TNZ_INFO_ORIENT_TOPLEFT) @@ -853,7 +853,7 @@ void TifWriter::open(FILE *file, const TImageInfo &info) if (m_bpp == 1) TIFFSetField(m_tiff, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); else { - wstring compressionType = ((TEnumProperty *)(m_properties->getProperty("Compression Type")))->getValue(); + std::wstring compressionType = ((TEnumProperty *)(m_properties->getProperty("Compression Type")))->getValue(); if (compressionType == TNZ_INFO_COMPRESS_LZW) TIFFSetField(m_tiff, TIFFTAG_COMPRESSION, COMPRESSION_LZW); else if (compressionType == TNZ_INFO_COMPRESS_PACKBITS) @@ -1010,11 +1010,11 @@ extern "C" { static void MyWarningHandler(const char *module, const char *fmt, va_list ap) { - string outMsg; + std::string outMsg; char msg[2048]; msg[0] = 0; if (module != NULL) - outMsg = string(module); + outMsg = std::string(module); outMsg += "Warning, "; _vsnprintf(msg, 2048, fmt, ap); @@ -1027,11 +1027,11 @@ MyWarningHandler(const char *module, const char *fmt, va_list ap) static void MyErrorHandler(const char *module, const char *fmt, va_list ap) { - string outMsg; + std::string outMsg; char msg[2048]; msg[0] = 0; if (module != NULL) - outMsg = string(module); + outMsg = std::string(module); //outMsg += "Warning, "; _vsnprintf(msg, 2048, fmt, ap); diff --git a/toonz/sources/image/tzl/tiio_tzl.cpp b/toonz/sources/image/tzl/tiio_tzl.cpp index 62fbbb9..7d577ff 100644 --- a/toonz/sources/image/tzl/tiio_tzl.cpp +++ b/toonz/sources/image/tzl/tiio_tzl.cpp @@ -143,15 +143,15 @@ bool readVersion(FILE *chan, int &version) char magic[8]; memset(magic, 0, sizeof(magic)); fread(&magic, sizeof(char), 8, chan); - if (string(magic).substr(0, 5) == "TLV10") + if (std::string(magic).substr(0, 5) == "TLV10") version = 10; - else if (string(magic, 5) == "TLV11") + else if (std::string(magic, 5) == "TLV11") version = 11; - else if (string(magic, 5) == "TLV12") + else if (std::string(magic, 5) == "TLV12") version = 12; - else if (string(magic, 5) == "TLV13") + else if (std::string(magic, 5) == "TLV13") version = 13; - else if (string(magic, 5) == "TLV14") + else if (std::string(magic, 5) == "TLV14") version = 14; else { fclose(chan); @@ -414,7 +414,7 @@ public: //------------------------------------------------------------------- -TWriterInfo *TWriterInfoTzl::create(const string &ext) +TWriterInfo *TWriterInfoTzl::create(const std::string &ext) { return new TWriterInfoTzl(); } @@ -633,7 +633,7 @@ TLevelWriterTzl::~TLevelWriterTzl() TFilePath historyFp = m_path.withNoFrame().withType("hst"); FILE *historyChan = fopen(historyFp, "w"); if (historyChan) { - string historyData = m_contentHistory->serialize().toStdString(); + std::string historyData = m_contentHistory->serialize().toStdString(); fwrite(&historyData[0], 1, historyData.length(), historyChan); fclose(historyChan); } @@ -1484,7 +1484,7 @@ TLevelReaderTzl::TLevelReaderTzl(const TFilePath &path) fseek(historyChan, 0, SEEK_END); long lSize = ftell(historyChan); rewind(historyChan); - string historyData(lSize, '\0'); + std::string historyData(lSize, '\0'); fread(&historyData[0], 1, lSize, historyChan); fclose(historyChan); diff --git a/toonz/sources/image/tzp/tiio_plt.cpp b/toonz/sources/image/tzp/tiio_plt.cpp index a10beb6..f06ce75 100644 --- a/toonz/sources/image/tzp/tiio_plt.cpp +++ b/toonz/sources/image/tzp/tiio_plt.cpp @@ -31,12 +31,12 @@ class PltReader : public Tiio::Reader UCHAR *m_stripBuffer; int m_x, m_y, m_lx, m_ly; bool m_isCmap24; - string m_history; + std::string m_history; int m_pltType; //[1..4] int m_nColor; int m_nPencil; std::vector m_infoRow; - map> m_pltNames; // colorIndex(<256: paint) , pageName, colorName + std::map> m_pltNames; // colorIndex(<256: paint) , pageName, colorName public: PltReader(); ~PltReader(); @@ -51,7 +51,7 @@ public: int skipLines(int lineCount); void readLine(char *buffer, int x0, int x1, int shrink); - void getTzpPaletteColorNames(map> &pltColorNames) const; + void getTzpPaletteColorNames(std::map> &pltColorNames) const; }; //------------------------------------------------------------ @@ -96,7 +96,7 @@ int decode_group_name( return 1; } -void PltReader::getTzpPaletteColorNames(map> &pltColorNames) const +void PltReader::getTzpPaletteColorNames(std::map> &pltColorNames) const { pltColorNames = m_pltNames; } @@ -104,7 +104,7 @@ void PltReader::getTzpPaletteColorNames(map> &pltColor //-------------------------------------------------------------------------------------- namespace { -bool isDefaultName(const string &_name) + bool isDefaultName(const std::string &_name) { int i; QString name = QString::fromStdString(_name); @@ -216,7 +216,7 @@ void PltReader::open(FILE *file) m_nColor = palette[10]; m_nPencil = palette[11]; - string colorNames; + std::string colorNames; if (TIFFGetField(m_tiff, TIFFTAG_TOONZCOLORNAMES, &count, &data)) colorNames = data; @@ -246,17 +246,17 @@ void PltReader::open(FILE *file) while (isdigit(item->name[0])) //in toonz colors cannot begin with digits item->name++; - map>::iterator it; + std::map>::iterator it; if ((it = m_pltNames.find(i)) == m_pltNames.end() || isDefaultName(it->second.second)) - m_pltNames[i] = pair(pageName, item->name); + m_pltNames[i] = std::pair(pageName, item->name); if (sisterIndex != -1) { int comboindex = (i < 256) ? (sisterIndex >> 16) + 256 : sisterIndex >> 8; if (i >= 256) ComboInkIndex[i - 256] = comboindex; - map>::iterator it; + std::map>::iterator it; if ((it = m_pltNames.find(comboindex)) == m_pltNames.end() || isDefaultName(it->second.second)) { - m_pltNames[comboindex] = pair(pageName, item->name); + m_pltNames[comboindex] = std::pair(pageName, item->name); if (comboindex < m_nColor) m_infoRow[comboindex].r = m_infoRow[comboindex].g = 255; } diff --git a/toonz/sources/image/tzp/tiio_tzp.cpp b/toonz/sources/image/tzp/tiio_tzp.cpp index 84d9c4a..38e1220 100644 --- a/toonz/sources/image/tzp/tiio_tzp.cpp +++ b/toonz/sources/image/tzp/tiio_tzp.cpp @@ -30,7 +30,7 @@ class TzpReader : public Tiio::Reader UCHAR *m_stripBuffer; int m_x, m_y, m_lx, m_ly; bool m_isCmap24; - string m_history; + std::string m_history; int m_nColor; int m_nPencil; bool m_isBigEndian; @@ -152,7 +152,7 @@ void TzpReader::open(FILE *file) char *data; uint32 count; TIFFGetField(m_tiff, TIFFTAG_TOONZHISTORY, &count, &data); - string history(data); + std::string history(data); uint16 planarconfig; TIFFGetField(m_tiff, TIFFTAG_PLANARCONFIG, &planarconfig); @@ -186,7 +186,7 @@ void TzpReader::readLine(char *buffer, int x0, int x1, int shrink) if (m_isCmap24) { if (m_y <= y && y < m_y + m_ly) { - vector line(m_lx); + std::vector line(m_lx); TIFFReadScanline(m_tiff, (char *)&line[0], y - m_y, 0); if (m_isFirstLineRead) { m_isFirstLineRead = false; @@ -214,7 +214,7 @@ void TzpReader::readLine(char *buffer, int x0, int x1, int shrink) } } else { if (m_y <= y && y < m_y + m_ly) { - vector line(m_lx); + std::vector line(m_lx); TIFFReadScanline(m_tiff, (char *)&line[0], y - m_y, 0); pix += m_x; static std::set table; diff --git a/toonz/sources/image/zcc/tfile.h b/toonz/sources/image/zcc/tfile.h index 09715be..ea17a5b 100644 --- a/toonz/sources/image/zcc/tfile.h +++ b/toonz/sources/image/zcc/tfile.h @@ -69,7 +69,7 @@ public: TINT64 tell(); bool isOpen(); - string getLastError(); + std::string getLastError(); protected: bool open_internal(const TFilePath &fname, /* const wchar_t *pwszFilename, */ uint32 flags); diff --git a/toonz/sources/include/avicodecrestrictions.h b/toonz/sources/include/avicodecrestrictions.h index 9438928..212592c 100644 --- a/toonz/sources/include/avicodecrestrictions.h +++ b/toonz/sources/include/avicodecrestrictions.h @@ -23,15 +23,15 @@ namespace AviCodecRestrictions { //! Returns a text specifing resolution restricions for the given codec name. -void DVAPI getRestrictions(const wstring &codecName, QString &restrictions); +void DVAPI getRestrictions(const std::wstring &codecName, QString &restrictions); //! Returns true if the ginven codec can work in the given resolution. -bool DVAPI canWriteMovie(const wstring &codecName, const TDimension &resolution); +bool DVAPI canWriteMovie(const std::wstring &codecName, const TDimension &resolution); //! Return a mapping containing the same codecs in \b codecNames, specifing which codec can work in the given resolution. -QMap DVAPI getUsableCodecs(const TDimension &resolution); +QMap DVAPI getUsableCodecs(const TDimension &resolution); //! Returns true if the specifiedcodec can be configured. -bool DVAPI canBeConfigured(const wstring &codecName); +bool DVAPI canBeConfigured(const std::wstring &codecName); //! Oopen the configuration popup for the specified codec -void DVAPI openConfiguration(const wstring &codecName, void *winId); +void DVAPI openConfiguration(const std::wstring &codecName, void *winId); } #endif; //AVI_CODEC_RESTRICTIONS diff --git a/toonz/sources/include/convert2tlv.h b/toonz/sources/include/convert2tlv.h index 1272fa6..0d09c54 100644 --- a/toonz/sources/include/convert2tlv.h +++ b/toonz/sources/include/convert2tlv.h @@ -27,7 +27,7 @@ private: TLevelReaderP m_lr1; TLevelReaderP m_lr2; TLevelWriterP m_lw; - map m_colorMap; + std::map m_colorMap; TDimension m_size; int m_count; int m_from, m_to; @@ -42,7 +42,7 @@ private: void buildToonzRaster(TRasterCM32P &rout, const TRasterP &rin1, const TRasterP &rin2); void doFill(TRasterCM32P &rout, const TRaster32P &rin); void buildInksFromGrayTones(TRasterCM32P &rout, const TRasterP &rin); - map::const_iterator findNearestColor(const TPixel &color); + std::map::const_iterator findNearestColor(const TPixel &color); void buildInks(TRasterCM32P &rout, const TRaster32P &rin); TPalette *buildPalette(); void removeAntialias(TRasterCM32P &r); @@ -62,10 +62,10 @@ public: int from, int to, bool doAutoclose, const TFilePath &palettePath, int colorTolerance, int antialiasType, int antialiasValue, bool isUnpaintedFromNAA); - bool init(string &errorMessage); + bool init(std::string &errorMessage); int getFramesToConvertCount(); bool abort(); - bool convertNext(string &errorMessage); + bool convertNext(std::string &errorMessage); }; // gmt, 3/1/2013; making raster>toonzraster conversion available to scripts diff --git a/toonz/sources/include/drawutil.h b/toonz/sources/include/drawutil.h index e5533fb..6f3d98a 100644 --- a/toonz/sources/include/drawutil.h +++ b/toonz/sources/include/drawutil.h @@ -62,14 +62,14 @@ DVAPI void drawStrokeCenterline(const TStroke &stroke, double from = 0.0, double to = 1.0); -DVAPI void stroke2polyline(vector &pnts, +DVAPI void stroke2polyline(std::vector &pnts, const TStroke &stroke, double pixelSize, double w0 = 0.0, double w1 = 1.0, bool lastRepeatable = false); -DVAPI void region2polyline(vector &pnts, +DVAPI void region2polyline(std::vector &pnts, const TRegion *region, double pixeSize); diff --git a/toonz/sources/include/tbezier.h b/toonz/sources/include/tbezier.h index c34c4d4..249ef80 100644 --- a/toonz/sources/include/tbezier.h +++ b/toonz/sources/include/tbezier.h @@ -14,8 +14,8 @@ */ template void forwardDifferences( - const vector &coeff, - vector &diffs) + const std::vector &coeff, + std::vector &diffs) { diffs.clear(); @@ -41,8 +41,8 @@ void forwardDifferences( \note coeffs are ordered from smaller b[0] to greater b[size-1] . */ template -void bezier2poly(const vector &bez, - vector &coeff) +void bezier2poly(const std::vector &bez, + std::vector &coeff) { forwardDifferences(bez, coeff); // compute forward differences // and store them in coeff. @@ -72,8 +72,8 @@ void bezier2poly(const vector &bez, \note coeffs are ordered from smaller b[0] to greater b[size-1]. */ template -void poly2bezier(const vector &poly, - vector &bez) +void poly2bezier(const std::vector &poly, + std::vector &bez) { UINT n = poly.size(); diff --git a/toonz/sources/include/tbigmemorymanager.h b/toonz/sources/include/tbigmemorymanager.h index f20c00b..9a32ded 100644 --- a/toonz/sources/include/tbigmemorymanager.h +++ b/toonz/sources/include/tbigmemorymanager.h @@ -23,11 +23,11 @@ class DVAPI TBigMemoryManager { TThread::Mutex m_mutex; UCHAR *m_theMemory; - map m_chunks; + std::map m_chunks; UCHAR *allocate(UINT &size); TUINT32 m_availableMemory, m_allocatedMemory; - map::iterator shiftBlock(const map::iterator &it, TUINT32 offset); + std::map::iterator shiftBlock(const std::map::iterator &it, TUINT32 offset); TRaster *findRaster(TRaster *ras); void checkConsistency(); UCHAR *remap(TUINT32 RequestedSize); diff --git a/toonz/sources/include/tcacheresource.h b/toonz/sources/include/tcacheresource.h index bb87616..30e27bf 100644 --- a/toonz/sources/include/tcacheresource.h +++ b/toonz/sources/include/tcacheresource.h @@ -218,7 +218,7 @@ The TCacheResourceP is a specialized smart pointer-like class that references TC instances. \n \n In order to retrieve a Cache resource, it is sufficient to know the resource name and invoke the -\c TCacheResourceP(const string&, bool) constructor. The bool optionally specified as second +\c TCacheResourceP(const std::string&, bool) constructor. The bool optionally specified as second argument specifies whether the resource has to be created if none is found with passed name. \sa TCacheResource, TSmartPointer classes. diff --git a/toonz/sources/include/tcli.h b/toonz/sources/include/tcli.h index e46fcf8..e1f60da 100644 --- a/toonz/sources/include/tcli.h +++ b/toonz/sources/include/tcli.h @@ -29,7 +29,7 @@ namespace TCli //========================================================= -inline bool fromStr(int &value, string s) +inline bool fromStr(int &value, std::string s) { if (isInt(s)) { value = toInt(s); @@ -37,7 +37,7 @@ inline bool fromStr(int &value, string s) } else return false; } -inline bool fromStr(double &value, string s) +inline bool fromStr(double &value, std::string s) { if (isDouble(s)) { value = toDouble(s); @@ -45,12 +45,12 @@ inline bool fromStr(double &value, string s) } else return false; } -inline bool fromStr(string &value, string s) +inline bool fromStr(std::string &value, std::string s) { value = s; return true; } -inline bool fromStr(TFilePath &value, string s) +inline bool fromStr(TFilePath &value, std::string s) { value = TFilePath(s); return true; @@ -60,12 +60,12 @@ inline bool fromStr(TFilePath &value, string s) class UsageError { - string m_msg; + std::string m_msg; public: - UsageError(string msg) : m_msg(msg){}; + UsageError(std::string msg) : m_msg(msg){}; ~UsageError(){}; - string getError() const { return m_msg; }; + std::string getError() const { return m_msg; }; }; //========================================================= @@ -73,13 +73,13 @@ public: class DVAPI UsageElement { protected: - string m_name, m_help; + std::string m_name, m_help; bool m_selected; public: - UsageElement(string name, string help); + UsageElement(std::string name, std::string help); virtual ~UsageElement(){}; - string getName() const { return m_name; }; + std::string getName() const { return m_name; }; bool isSelected() const { return m_selected; }; void select() { m_selected = true; }; @@ -87,11 +87,11 @@ public: virtual bool isSwitcher() const { return false; }; virtual bool isArgument() const { return false; }; virtual bool isMultiArgument() const { return false; }; - void setHelp(string help) { m_help = help; }; + void setHelp(std::string help) { m_help = help; }; - virtual void print(ostream &out) const; - virtual void printHelpLine(ostream &out) const; - virtual void dumpValue(ostream &out) const = 0; + virtual void print(std::ostream &out) const; + virtual void printHelpLine(std::ostream &out) const; + virtual void dumpValue(std::ostream &out) const = 0; virtual void resetValue() = 0; private: @@ -108,7 +108,7 @@ protected: bool m_switcher; public: - Qualifier(string name, string help) + Qualifier(std::string name, std::string help) : UsageElement(name, help), m_switcher(false){}; ~Qualifier(){}; @@ -117,7 +117,7 @@ public: operator bool() const { return isSelected(); }; virtual void fetch(int index, int &argc, char *argv[]) = 0; - virtual void print(ostream &out) const; + virtual void print(std::ostream &out) const; }; //--------------------------------------------------------- @@ -125,11 +125,11 @@ public: class DVAPI SimpleQualifier : public Qualifier { public: - SimpleQualifier(string name, string help) + SimpleQualifier(std::string name, std::string help) : Qualifier(name, help){}; ~SimpleQualifier(){}; void fetch(int index, int &argc, char *argv[]); - void dumpValue(ostream &out) const; + void dumpValue(std::ostream &out) const; void resetValue(); }; @@ -138,7 +138,7 @@ public: class DVAPI Switcher : public SimpleQualifier { public: - Switcher(string name, string help) + Switcher(std::string name, std::string help) : SimpleQualifier(name, help) { m_switcher = true; }; ~Switcher(){}; }; @@ -151,7 +151,7 @@ class QualifierT : public Qualifier T m_value; public: - QualifierT(string name, string help) + QualifierT(std::string name, std::string help) : Qualifier(name, help), m_value(){}; ~QualifierT(){}; @@ -163,13 +163,13 @@ public: throw UsageError("missing argument"); if (!fromStr(m_value, argv[index + 1])) throw UsageError( - m_name + ": bad argument type /" + string(argv[index + 1]) + "/"); + m_name + ": bad argument type /" + std::string(argv[index + 1]) + "/"); for (int i = index; i < argc - 1; i++) argv[i] = argv[i + 2]; argc -= 2; }; - void dumpValue(ostream &out) const + void dumpValue(std::ostream &out) const { out << m_name << " = " << (isSelected() ? "on" : "off") << " : " << m_value << "\n"; @@ -187,7 +187,7 @@ public: class DVAPI Argument : public UsageElement { public: - Argument(string name, string help) + Argument(std::string name, std::string help) : UsageElement(name, help){}; ~Argument(){}; virtual void fetch(int index, int &argc, char *argv[]); @@ -203,13 +203,13 @@ class ArgumentT : public Argument T m_value; public: - ArgumentT(string name, string help) : Argument(name, help){}; + ArgumentT(std::string name, std::string help) : Argument(name, help){}; ~ArgumentT(){}; operator T() const { return m_value; }; T getValue() const { return m_value; }; bool assign(char *src) { return fromStr(m_value, src); }; - void dumpValue(ostream &out) const + void dumpValue(std::ostream &out) const { out << m_name << " = " << m_value << "\n"; }; @@ -228,7 +228,7 @@ protected: int m_count, m_index; public: - MultiArgument(string name, string help) + MultiArgument(std::string name, std::string help) : Argument(name, help), m_count(0), m_index(0){}; ~MultiArgument(){}; int getCount() const { return m_count; }; @@ -245,7 +245,7 @@ class MultiArgumentT : public MultiArgument std::unique_ptr m_values; public: - MultiArgumentT(string name, string help) + MultiArgumentT(std::string name, std::string help) : MultiArgument(name, help) {} T operator[](int index) { @@ -258,7 +258,7 @@ public: return fromStr(m_values[m_index], src); }; - void dumpValue(ostream &out) const + void dumpValue(std::ostream &out) const { out << m_name << " = {"; for (int i = 0; i < m_count; i++) @@ -336,15 +336,15 @@ class DVAPI Usage std::unique_ptr m_imp; public: - Usage(string progName); + Usage(std::string progName); ~Usage(); void add(const UsageLine &); - void print(ostream &out) const; - void dumpValues(ostream &out) const; // per debug + void print(std::ostream &out) const; + void dumpValues(std::ostream &out) const; // per debug - bool parse(int argc, char *argv[], ostream &err = std::cerr); - bool parse(const char *argvString, ostream &err = std::cerr); + bool parse(int argc, char *argv[], std::ostream &err = std::cerr); + bool parse(const char *argvString, std::ostream &err = std::cerr); void clear(); // per debug private: @@ -357,16 +357,16 @@ private: typedef QualifierT IntQualifier; typedef QualifierT DoubleQualifier; -typedef QualifierT StringQualifier; +typedef QualifierT StringQualifier; typedef ArgumentT IntArgument; typedef ArgumentT DoubleArgument; -typedef ArgumentT StringArgument; +typedef ArgumentT StringArgument; typedef ArgumentT FilePathArgument; typedef MultiArgumentT IntMultiArgument; typedef MultiArgumentT DoubleMultiArgument; -typedef MultiArgumentT StringMultiArgument; +typedef MultiArgumentT StringMultiArgument; typedef MultiArgumentT FilePathMultiArgument; //========================================================= @@ -386,7 +386,7 @@ public: return m_from <= frame && frame <= m_to; }; void fetch(int index, int &argc, char *argv[]); - void dumpValue(ostream &out) const; + void dumpValue(std::ostream &out) const; void resetValue(); }; diff --git a/toonz/sources/include/tcodec.h b/toonz/sources/include/tcodec.h index 55000db..26e3c25 100644 --- a/toonz/sources/include/tcodec.h +++ b/toonz/sources/include/tcodec.h @@ -20,7 +20,7 @@ class DVAPI TRasterCodec { public: - TRasterCodec(const string &name) : m_name(name) {} + TRasterCodec(const std::string &name) : m_name(name) {} virtual ~TRasterCodec() {} //virtual int getMaxCompressionSize(int size) = 0; @@ -30,10 +30,10 @@ public: //virtual int getHeaderSize() = 0; //virtual UCHAR *removeHeader(const UCHAR* inData, TINT32 inDataSize, TINT32 &outDataSize, int &lx, int &ly) = 0; - static TRasterCodec *create(const string &name); + static TRasterCodec *create(const std::string &name); private: - string m_name; + std::string m_name; }; //------------------------------------------------------------------------------ @@ -42,7 +42,7 @@ class DVAPI TRasterCodecDummy : public TRasterCodec { public: - TRasterCodecDummy(const string &name) : TRasterCodec(name) {} + TRasterCodecDummy(const std::string &name) : TRasterCodec(name) {} ~TRasterCodecDummy() {} //int getMaxCompressionSize(int size); @@ -53,7 +53,7 @@ public: //UCHAR *removeHeader(const UCHAR* inData, TINT32 inDataSize, TINT32 &outDataSize, int &lx, int &ly); - //static TRasterCodec *create(const string &name); + //static TRasterCodec *create(const std::string &name); }; //------------------------------------------------------------------------------ @@ -62,7 +62,7 @@ class DVAPI TRasterCodecQTL : public TRasterCodec { public: - TRasterCodecQTL(const string &name) : TRasterCodec(name) {} + TRasterCodecQTL(const std::string &name) : TRasterCodec(name) {} ~TRasterCodecQTL() {} //int getMaxCompressionSize(int size); @@ -73,7 +73,7 @@ public: //int getHeaderSize(); - //static TRasterCodec *create(const string &name); + //static TRasterCodec *create(const std::string &name); }; //------------------------------------------------------------------------------ @@ -82,7 +82,7 @@ public: { public: - TRasterCodecSnappy(const string &name, bool useCache); + TRasterCodecSnappy(const std::string &name, bool useCache); ~TRasterCodecSnappy(); TRasterP compress(const TRasterP &inRas, int allocUnit, TINT32 &outDataSize); @@ -107,7 +107,7 @@ private: class DVAPI TRasterCodecLz4 : public TRasterCodec { public: - TRasterCodecLz4(const string &name, bool useCache); + TRasterCodecLz4(const std::string &name, bool useCache); ~TRasterCodecLz4(); TRasterP compress(const TRasterP &inRas, int allocUnit, TINT32 &outDataSize); @@ -123,7 +123,7 @@ public: private: TRasterGR8P m_raster; - string m_cacheId; + std::string m_cacheId; bool m_useCache; private: @@ -135,7 +135,7 @@ private: class DVAPI TRasterCodecLZO : public TRasterCodec { public: - TRasterCodecLZO(const string &name, bool useCache); + TRasterCodecLZO(const std::string &name, bool useCache); ~TRasterCodecLZO(); TRasterP compress(const TRasterP &inRas, int allocUnit, TINT32 &outDataSize); @@ -151,7 +151,7 @@ public: private: TRasterGR8P m_raster; - string m_cacheId; + std::string m_cacheId; bool m_useCache; private: diff --git a/toonz/sources/include/tcolorstyles.h b/toonz/sources/include/tcolorstyles.h index 7aa65fe..d58703f 100644 --- a/toonz/sources/include/tcolorstyles.h +++ b/toonz/sources/include/tcolorstyles.h @@ -170,17 +170,17 @@ public: // General functions - void setName(wstring name) { m_name = name; } //!< Sets the style's user-defined name. - wstring getName() const { return m_name; } //!< Returns the style's user-defined name. + void setName(std::wstring name) { m_name = name; } //!< Sets the style's user-defined name. + std::wstring getName() const { return m_name; } //!< Returns the style's user-defined name. /*! \detail The \a global name contains information about palette id. */ - void setGlobalName(wstring name) { m_globalName = name; } //!< Sets the global name of the style. - wstring getGlobalName() const { return m_globalName; } //!< Returns the global name of the style. + void setGlobalName(std::wstring name) { m_globalName = name; } //!< Sets the global name of the style. + std::wstring getGlobalName() const { return m_globalName; } //!< Returns the global name of the style. - void setOriginalName(wstring name) { m_originalName = name; } //!< If the style is originally copied from studio palette, set this. - wstring getOriginalName() const { return m_originalName; } //!< Returns the original name of the style. + void setOriginalName(std::wstring name) { m_originalName = name; } //!< If the style is originally copied from studio palette, set this. + std::wstring getOriginalName() const { return m_originalName; } //!< Returns the original name of the style. void setIsEditedFlag(bool edited) { m_isEditedFromOriginal = edited; } // &) const {}; //!< \deprecated + virtual void getObsoleteTagIds(std::vector &) const {}; //!< \deprecated void save(TOutputStreamInterface &) const; //!< Calls the local implementation of saveData() passing it also the name and the tagId of the style. static TColorStyle *load(TInputStreamInterface &); //!< Loads the style from disk. Calls the local implementation of loadData(). @@ -331,7 +331,7 @@ public: static TColorStyle *create(int tagId); //!< Creates a new style with identifier equal to \a tagId. static void declare(TColorStyle *style); //!< Puts the style in the table of actual styles. - static void getAllTags(vector &tags); + static void getAllTags(std::vector &tags); // Misc functions diff --git a/toonz/sources/include/tcommon.h b/toonz/sources/include/tcommon.h index b55efa0..a9a8139 100644 --- a/toonz/sources/include/tcommon.h +++ b/toonz/sources/include/tcommon.h @@ -30,54 +30,11 @@ #include #include -using std::string; -/* -#if defined(MACOSX) -#warning "using dummy wstring class" -class wstring { - string m_str; - public: - typedef int size_type; - typedef wchar_t* iterator; - static const size_type npos = static_cast(-1); - - wstring() {} - wstring(const wchar_t*wstr) { m_str=reinterpret_cast(wstr); } - wstring(const wchar_t*wstr, int len) { m_str.assign(reinterpret_cast(wstr), len*sizeof(wchar_t)); } - //wstring(const char*str) { m_str = str; } - int length() const {return m_str.length()/sizeof(wchar_t); } - int size() const {return m_str.size()/sizeof(wchar_t); } - wstring substr(size_type pos, size_type n = npos) { - size_type _n = (n==npos)? npos : n*sizeof(wchar_t); - wstring ret; - ret.m_str = m_str.substr(pos*sizeof(wchar_t), _n); - return ret; - } - //iterator begin() { return } - const wchar_t* c_str() { return reinterpret_cast(m_str.c_str()); } - wstring& operator=(const wstring& w) { m_str = w.m_str; return *this; } - bool operator !=(const wchar_t* wstr) const { const char* str = reinterpret_cast(wstr); return m_str != str; } - bool operator ==(const wchar_t* wstr) const { const char* str = reinterpret_cast(wstr); return m_str == str; } - bool operator ==(const wstring& wstr) const { return m_str == wstr.m_str; } -}; -#endif -#else -*/ -using std::wstring; -//#endif -using std::ostream; -using std::istream; -using std::iostream; -using std::ostrstream; -using std::istrstream; -using std::fstream; - #if 0 && defined(__GNUC__) // typedef seems strong on GCC and breaks code with TException.. -#define TString wstring +#define TString std::wstring #else -typedef wstring TString; -//typedef string TString; +typedef std::wstring TString; #endif // STL @@ -107,14 +64,6 @@ int nanosleep(struct timespec *, int); #include // .. and so on -// idem - -using std::list; -using std::vector; -using std::string; -using std::map; -using std::pair; - /* the value of pi defined in IRIX-math.h is not defined neither in WIN32-math.h nor elsewhere */ namespace TConsts { @@ -284,6 +233,6 @@ inline std::ostream &operator<<(std::ostream &out, const std::string &s) #define tArrayCount(ARRAY) (sizeof(ARRAY) / sizeof(ARRAY[0])) -const string mySettingsFileName = "mysettings.ini"; +const std::string mySettingsFileName = "mysettings.ini"; #endif //__T_COMMON_INCLUDED diff --git a/toonz/sources/include/tconvert.h b/toonz/sources/include/tconvert.h index dc9344a..cee87b7 100644 --- a/toonz/sources/include/tconvert.h +++ b/toonz/sources/include/tconvert.h @@ -25,7 +25,7 @@ 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(std::wstring s); DVAPI std::string toString(const TFilePath &fp); DVAPI std::string toString(void *p); diff --git a/toonz/sources/include/tcurves.h b/toonz/sources/include/tcurves.h index e95f2e5..1d5a3ee 100644 --- a/toonz/sources/include/tcurves.h +++ b/toonz/sources/include/tcurves.h @@ -96,7 +96,7 @@ public: //----------------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TSegment &segment); +DVAPI std::ostream &operator<<(std::ostream &out, const TSegment &segment); //----------------------------------------------------------------------------- @@ -246,11 +246,11 @@ inline TQuadratic operator*(const TAffine &aff, const TQuadratic &curve) //----------------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TQuadratic &curve); +DVAPI std::ostream &operator<<(std::ostream &out, const TQuadratic &curve); //----------------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TQuadratic *curve) +inline std::ostream &operator<<(std::ostream &out, const TQuadratic *curve) { assert(curve); return out << *curve; @@ -371,11 +371,11 @@ inline TCubic operator*(const TAffine &aff, const TCubic &curve) //----------------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TCubic &curve); +DVAPI std::ostream &operator<<(std::ostream &out, const TCubic &curve); //----------------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TCubic *curve) +inline std::ostream &operator<<(std::ostream &out, const TCubic *curve) { assert(curve); return out << *curve; @@ -461,11 +461,11 @@ inline TThickSegment operator*(const TAffine &aff, const TThickSegment &ts) //----------------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TThickSegment &segment); +DVAPI std::ostream &operator<<(std::ostream &out, const TThickSegment &segment); //----------------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TThickSegment *segment) +inline std::ostream &operator<<(std::ostream &out, const TThickSegment *segment) { assert(segment); return out << *segment; @@ -553,11 +553,11 @@ inline TThickQuadratic transformQuad(const TAffine &aff, const TThickQuadratic & //--------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TThickQuadratic &tq); +DVAPI std::ostream &operator<<(std::ostream &out, const TThickQuadratic &tq); //--------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TThickQuadratic *tq) +inline std::ostream &operator<<(std::ostream &out, const TThickQuadratic *tq) { assert(tq); return out << *tq; @@ -641,11 +641,11 @@ inline TThickCubic operator*(const TAffine &aff, const TThickCubic &tc) //--------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TThickCubic &tc); +DVAPI std::ostream &operator<<(std::ostream &out, const TThickCubic &tc); //--------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TThickCubic *tc) +inline std::ostream &operator<<(std::ostream &out, const TThickCubic *tc) { assert(tc); return out << *tc; diff --git a/toonz/sources/include/tcurveutil.h b/toonz/sources/include/tcurveutil.h index 529d2e0..ec49b19 100644 --- a/toonz/sources/include/tcurveutil.h +++ b/toonz/sources/include/tcurveutil.h @@ -92,7 +92,7 @@ inline int intersect(const TSegment &s, template void split(const T &tq, - const vector &pars, + const std::vector &pars, std::vector &v) { if (pars.empty()) diff --git a/toonz/sources/include/tdata.h b/toonz/sources/include/tdata.h index d34d8f9..cc5ddae 100644 --- a/toonz/sources/include/tdata.h +++ b/toonz/sources/include/tdata.h @@ -46,7 +46,7 @@ class DVAPI TTextData : public TData public: TTextData(TString text) : m_text(text) {} - TTextData(string text); + TTextData(std::string text); TDataP clone() const; @@ -62,10 +62,10 @@ public: class DVAPI TFilePathListData : public TData { - vector m_filePaths; + std::vector m_filePaths; public: - TFilePathListData(const vector &filePaths) : m_filePaths(filePaths) {} + TFilePathListData(const std::vector &filePaths) : m_filePaths(filePaths) {} TDataP clone() const; int getFilePathCount() const { return m_filePaths.size(); } diff --git a/toonz/sources/include/tdebugmessage.h b/toonz/sources/include/tdebugmessage.h index e1c499f..77d28bd 100644 --- a/toonz/sources/include/tdebugmessage.h +++ b/toonz/sources/include/tdebugmessage.h @@ -23,13 +23,13 @@ namespace TDebugMessage class Manager { public: - virtual ostream &getStream() = 0; + virtual std::ostream &getStream() = 0; virtual void flush(int code = 0) = 0; virtual ~Manager() {} }; DVAPI void setManager(Manager *manager); -DVAPI ostream &getStream(); +DVAPI std::ostream &getStream(); DVAPI void flush(int code = 0); } // namespace diff --git a/toonz/sources/include/tdoublekeyframe.h b/toonz/sources/include/tdoublekeyframe.h index 02ca041..f569855 100644 --- a/toonz/sources/include/tdoublekeyframe.h +++ b/toonz/sources/include/tdoublekeyframe.h @@ -59,9 +59,9 @@ public: TPointD m_speedIn, m_speedOut; bool m_linkedHandles; - string m_expressionText; + std::string m_expressionText; FileParams m_fileParams; - string m_unitName; // file/expression only + std::string m_unitName; // file/expression only double m_similarShapeOffset; void saveData(TOStream &os) const; diff --git a/toonz/sources/include/tdoubleparam.h b/toonz/sources/include/tdoubleparam.h index c391709..53b59c4 100644 --- a/toonz/sources/include/tdoubleparam.h +++ b/toonz/sources/include/tdoubleparam.h @@ -67,8 +67,8 @@ public: TParam *clone() const { return new TDoubleParam(*this); } void copy(TParam *src); - string getMeasureName() const; - void setMeasureName(string name); + std::string getMeasureName() const; + void setMeasureName(std::string name); TMeasure *getMeasure() const; void setValueRange(double min, double max, double step = 1.0); @@ -147,9 +147,9 @@ public: void loadData(TIStream &is); void saveData(TOStream &os); - string getStreamTag() const; + std::string getStreamTag() const; - string getValueAlias(double frame, int precision); + std::string getValueAlias(double frame, int precision); }; //--------------------------------------------------------- diff --git a/toonz/sources/include/tenv.h b/toonz/sources/include/tenv.h index 1e1cd2c..78eee79 100644 --- a/toonz/sources/include/tenv.h +++ b/toonz/sources/include/tenv.h @@ -32,21 +32,21 @@ public: Imp *m_imp; public: - Variable(string name, string defaultValue); - Variable(string name); + Variable(std::string name, std::string defaultValue); + Variable(std::string name); virtual ~Variable(); - string getName() const; - string getValue() const; + std::string getName() const; + std::string getValue() const; - void assignValue(string str); + void assignValue(std::string str); }; class DVAPI IntVar : public Variable { public: - IntVar(string name, int defValue); - IntVar(string name); + IntVar(std::string name, int defValue); + IntVar(std::string name); operator int() const; void operator=(int v); }; @@ -54,8 +54,8 @@ public: class DVAPI DoubleVar : public Variable { public: - DoubleVar(string name, double defValue); - DoubleVar(string name); + DoubleVar(std::string name, double defValue); + DoubleVar(std::string name); operator double() const; void operator=(double v); }; @@ -63,17 +63,17 @@ public: class DVAPI StringVar : public Variable { public: - StringVar(string name, const string &defValue); - StringVar(string name); - operator string() const; - void operator=(const string &v); + StringVar(std::string name, const std::string &defValue); + StringVar(std::string name); + operator std::string() const; + void operator=(const std::string &v); }; class DVAPI FilePathVar : public Variable { public: - FilePathVar(string name, const TFilePath &defValue); - FilePathVar(string name); + FilePathVar(std::string name, const TFilePath &defValue); + FilePathVar(std::string name); operator TFilePath() const; void operator=(const TFilePath &v); }; @@ -81,8 +81,8 @@ public: class DVAPI RectVar : public Variable { public: - RectVar(string name, const TRect &defValue); - RectVar(string name); + RectVar(std::string name, const TRect &defValue); + RectVar(std::string name); operator TRect() const; void operator=(const TRect &v); }; @@ -95,30 +95,30 @@ public: // // es.: TEnv::setApplication("Toonz","5.0"); // -DVAPI void setApplication(string applicationName, string applicationVersion); +DVAPI void setApplication(std::string applicationName, std::string applicationVersion); -DVAPI string getApplicationName(); -DVAPI string getApplicationVersion(); +DVAPI std::string getApplicationName(); +DVAPI std::string getApplicationVersion(); // es.: TEnv::setModuleFullName("Toonz 5.0.1 Harlequin"); // (default: " ") -DVAPI void setApplicationFullName(string applicationFullName); -DVAPI string getApplicationFullName(); +DVAPI void setApplicationFullName(std::string applicationFullName); +DVAPI std::string getApplicationFullName(); // es.: TEnv::setModuleName("inknpaint") // (default: "") -DVAPI void setModuleName(string moduleName); -DVAPI string getModuleName(); +DVAPI void setModuleName(std::string moduleName); +DVAPI std::string getModuleName(); // es.: TEnv::setRootVarName("TABROOT"); // (default: toUpper( + "ROOT")) -DVAPI string getRootVarName(); -DVAPI void setRootVarName(string varName); +DVAPI std::string getRootVarName(); +DVAPI void setRootVarName(std::string varName); // es.: TEnv::setRootVarName("Toonz"); // (default: ) -DVAPI void setSystemVarPrefix(string prefix); -DVAPI string getSystemVarPrefix(); +DVAPI void setSystemVarPrefix(std::string prefix); +DVAPI std::string getSystemVarPrefix(); // su Windows ritorna // 'SOFTWARE\Digital Video\\\' @@ -128,9 +128,9 @@ DVAPI TFilePath getRootVarPath(); // restituisce il valore della variabile di sistema varName // (su window aggiunge "SOFTWARE\Digital Video\....." all'inizio) -DVAPI string getSystemVarStringValue(string varName); -DVAPI TFilePath getSystemVarPathValue(string varName); -DVAPI TFilePathSet getSystemVarPathSetValue(string varName); +DVAPI std::string getSystemVarStringValue(std::string varName); +DVAPI TFilePath getSystemVarPathValue(std::string varName); +DVAPI TFilePathSet getSystemVarPathSetValue(std::string varName); DVAPI TFilePath getStuffDir(); DVAPI TFilePath getConfigDir(); diff --git a/toonz/sources/include/texception.h b/toonz/sources/include/texception.h index da0dbbd..4bfde63 100644 --- a/toonz/sources/include/texception.h +++ b/toonz/sources/include/texception.h @@ -20,8 +20,8 @@ class DVAPI TException TString m_msg; public: - explicit TException(const string &msg = "Toonz Exception"); - explicit TException(const wstring &msg) : m_msg(msg) {} + explicit TException(const std::string &msg = "Toonz Exception"); + explicit TException(const std::wstring &msg) : m_msg(msg) {} virtual ~TException() {} virtual TString getMessage() const { return m_msg; } }; diff --git a/toonz/sources/include/texpression.h b/toonz/sources/include/texpression.h index c29fb36..5926d0d 100644 --- a/toonz/sources/include/texpression.h +++ b/toonz/sources/include/texpression.h @@ -65,7 +65,7 @@ public: and grammar-recognized patterns that is able to calculate the expression's value at a given frame. */ - void setText(string text); + void setText(std::string text); std::string getText() const; TSyntax::Calculator *getCalculator(); diff --git a/toonz/sources/include/texternfx.h b/toonz/sources/include/texternfx.h index d4cb523..a65f5c0 100644 --- a/toonz/sources/include/texternfx.h +++ b/toonz/sources/include/texternfx.h @@ -26,8 +26,8 @@ public: setName(L"ExternFx"); } - static TExternFx *create(string name); - void getNames(vector &names); + static TExternFx *create(std::string name); + void getNames(std::vector &names); }; //--------------------------------------------------------- @@ -40,29 +40,29 @@ class DVAPI TExternalProgramFx : public TExternFx class Port { public: - string m_name; + std::string m_name; TRasterFxPort *m_port; // n.b. la porta di output ha m_port=0 - string m_ext; // estensione del file in cui si legge/scrive l'immagine + std::string m_ext; // estensione del file in cui si legge/scrive l'immagine Port() : m_name(), m_port(0), m_ext() {} - Port(string name, string ext, TRasterFxPort *port) + Port(std::string name, std::string ext, TRasterFxPort *port) : m_name(name), m_port(port), m_ext(ext) {} }; - std::map m_ports; - // std::map m_params; + std::map m_ports; + // std::map m_params; std::vector m_params; TFilePath m_executablePath; - string m_args; - string m_externFxName; + std::string m_args; + std::string m_externFxName; public: - TExternalProgramFx(string name); + TExternalProgramFx(std::string name); TExternalProgramFx(); ~TExternalProgramFx(); - void initialize(string name); + void initialize(std::string name); virtual TFx *clone(bool recursive = true) const; @@ -71,20 +71,20 @@ public: bool canHandle(const TRenderSettings &info, double frame) { return false; } - void setExecutable(TFilePath fp, string args) + void setExecutable(TFilePath fp, std::string args) { m_executablePath = fp; m_args = args; } - void addPort(string portName, string ext, bool isInput); + void addPort(std::string portName, std::string ext, bool isInput); // void addParam(string paramName, const TParamP ¶m); void loadData(TIStream &is); void saveData(TOStream &os); - void setExternFxName(string name) { m_externFxName = name; } - string getExternFxName() const { return m_externFxName; }; + void setExternFxName(std::string name) { m_externFxName = name; } + std::string getExternFxName() const { return m_externFxName; }; private: // not implemented diff --git a/toonz/sources/include/tfarmserver.h b/toonz/sources/include/tfarmserver.h index 9e57f89..581be4c 100644 --- a/toonz/sources/include/tfarmserver.h +++ b/toonz/sources/include/tfarmserver.h @@ -48,7 +48,7 @@ public: virtual int addTask(const QString &taskid, const QString &cmdline) = 0; virtual int terminateTask(const QString &taskid) = 0; - virtual int getTasks(vector &tasks) = 0; + virtual int getTasks(std::vector &tasks) = 0; virtual void queryHwInfo(HwInfo &hwInfo) = 0; diff --git a/toonz/sources/include/tfilepath.h b/toonz/sources/include/tfilepath.h index 6c24c0b..4e8b491 100644 --- a/toonz/sources/include/tfilepath.h +++ b/toonz/sources/include/tfilepath.h @@ -66,7 +66,7 @@ public: bool isNoFrame() const { return m_frame == NO_FRAME; }; //operator string() const; - string expand(FrameFormat format = FOUR_ZEROS) const; + std::string expand(FrameFormat format = FOUR_ZEROS) const; int getNumber() const { return m_frame; }; char getLetter() const { return m_letter; }; }; @@ -74,7 +74,7 @@ public: //----------------------------------------------------------------------------- /*! \relates TFrameId*/ -inline ostream &operator<<(ostream &out, const TFrameId &f) +inline std::ostream &operator<<(std::ostream &out, const TFrameId &f) { if (f.isNoFrame()) out << ""; @@ -92,8 +92,8 @@ inline ostream &operator<<(ostream &out, const TFrameId &f) class DVAPI TFilePath { static bool m_underscoreFormatAllowed; - wstring m_path; - void setPath(wstring path); + std::wstring m_path; + void setPath(std::wstring path); public: /*! this static method allows correct reading of levels in the form pippo_0001.tif (represented always as pippo..tif) */ @@ -105,7 +105,7 @@ public: If the path is ":" a slash will be added*/ explicit TFilePath(const char *path = ""); - explicit TFilePath(const string &path); + explicit TFilePath(const std::string &path); explicit TFilePath(const std::wstring &path); explicit TFilePath(const QString &path); @@ -128,28 +128,28 @@ public: a. "" if there is no filename extension b. "." if there is a filename extension but no frame c.".." if there are both filename extension and frame */ - string getDots() const; // ritorna ""(no estensione), "."(estensione, no frame) o ".."(estensione e frame) + std::string getDots() const; // ritorna ""(no estensione), "."(estensione, no frame) o ".."(estensione e frame) /*!Returns the filename extension, including leading period (.). Returns "" if there is no filename extension.*/ - string getDottedType() const; // ritorna l'estensione con il PUNTO (se non c'e' estensione ritorna "") + std::string getDottedType() const; // ritorna l'estensione con il PUNTO (se non c'e' estensione ritorna "") /*!Returns the filename extension, escluding leading period (.). Returns "" if there is no filename extension.*/ - string getUndottedType() const; // ritorna l'estensione senza PUNTO + std::string getUndottedType() const; // ritorna l'estensione senza PUNTO /*!It is equal to getUndottedType(): Returns the filename extension, excluding leading period (.). Returns "" if there is no filename extension.*/ - string getType() const { return getUndottedType(); }; // ritorna l'estensione SENZA PUNTO + std::string getType() const { return getUndottedType(); }; // ritorna l'estensione SENZA PUNTO /*!Returns the base filename (no extension, no dots, no slash)*/ - string getName() const; // noDot! noSlash! - wstring getWideName() const; // noDot! noSlash! + std::string getName() const; // noDot! noSlash! + std::wstring getWideName() const; // noDot! noSlash! /*!Returns the filename (with extension, escluding in case the frame number). ex.: TFilePath("/pippo/pluto.0001.gif").getLevelName() == "pluto..gif" */ - string getLevelName() const; // es. TFilePath("/pippo/pluto.0001.gif").getLevelName() == "pluto..gif" + std::string getLevelName() const; // es. TFilePath("/pippo/pluto.0001.gif").getLevelName() == "pluto..gif" std::wstring getLevelNameW() const; // es. TFilePath("/pippo/pluto.0001.gif").getLevelName() == "pluto..gif" /*!Returns the parent directory escluding the eventual final slash.*/ @@ -164,9 +164,9 @@ public: /*!Return a TFilePath with extension type. type is a string that indicate the filename extension(ex:. bmp or .bmp)*/ - TFilePath withType(const string &type) const; + TFilePath withType(const std::string &type) const; /*!Return a TFilePath with filename "name".*/ - TFilePath withName(const string &name) const; + TFilePath withName(const std::string &name) const; /*!Return a TFilePath with filename "name". Unicode*/ TFilePath withName(const std::wstring &name) const; /*!Return a TFilePath with parent directory "dir".*/ @@ -186,11 +186,11 @@ public: TFilePath operator+(const TFilePath &fp) const; TFilePath &operator+=(const TFilePath &fp) /*{*this=*this+fp;return *this;}*/; - inline TFilePath operator+(const string &s) const + inline TFilePath operator+(const std::string &s) const { return operator+(TFilePath(s)); }; - inline TFilePath &operator+=(const string &s) + inline TFilePath &operator+=(const std::string &s) { return operator+=(TFilePath(s)); }; @@ -210,7 +210,7 @@ public: bool match(const TFilePath &fp) const; // sono uguali a meno del numero di digits del frame // '/a/b/c.txt' => head='a' tail='b/c.txt' - void split(wstring &head, TFilePath &tail) const; + void split(std::wstring &head, TFilePath &tail) const; }; //----------------------------------------------------------------------------- @@ -218,7 +218,7 @@ public: class TMalformedFrameException : public TException { public: - TMalformedFrameException(const TFilePath &fp, const wstring &msg = wstring()) + TMalformedFrameException(const TFilePath &fp, const std::wstring &msg = std::wstring()) : TException(fp.getWideName() + L":" + msg) { } @@ -229,8 +229,8 @@ private: //----------------------------------------------------------------------------- -DVAPI ostream &operator<<(ostream &out, const TFilePath &path); +DVAPI std::ostream &operator<<(std::ostream &out, const TFilePath &path); -typedef list TFilePathSet; +typedef std::list TFilePathSet; #endif //T_FILEPATH_INCLUDED diff --git a/toonz/sources/include/tfilepath_io.h b/toonz/sources/include/tfilepath_io.h index 8cdcfee..4cde6fe 100644 --- a/toonz/sources/include/tfilepath_io.h +++ b/toonz/sources/include/tfilepath_io.h @@ -57,7 +57,7 @@ =========================================================*/ -DVAPI FILE *fopen(const TFilePath &fp, string mode); +DVAPI FILE *fopen(const TFilePath &fp, std::string mode); class DVAPI Tifstream : public std::ifstream { diff --git a/toonz/sources/include/tfiletype.h b/toonz/sources/include/tfiletype.h index 909b146..e1112ae 100644 --- a/toonz/sources/include/tfiletype.h +++ b/toonz/sources/include/tfiletype.h @@ -61,10 +61,10 @@ DVAPI Type getInfo(const TFilePath &fp); * e.g. 'tif' => RASTER_IMAGE, 'mov' => RASTER_LEVEL, 'tlv' => CMAPPED_LEVEL, etc. */ //! -DVAPI Type getInfoFromExtension(const string &ext); +DVAPI Type getInfoFromExtension(const std::string &ext); DVAPI Type getInfoFromExtension(const QString &ext); -DVAPI void declare(string extension, Type type); +DVAPI void declare(std::string extension, Type type); inline bool isResource(Type type) { return (type != UNKNOW_FILE); } inline bool isViewable(Type type) { return (type & VIEWABLE) != 0; } @@ -73,7 +73,7 @@ inline bool isScene(Type type) { return (type & SCENE) != 0; } inline bool isFullColor(Type type) { return (type & RASTER_IMAGE) != 0; } inline bool isVector(Type type) { return (type & VECTOR_IMAGE) != 0; } -inline bool isLevelExtension(const string &fileExtension) { return (getInfoFromExtension(fileExtension) & LEVEL) != 0; } +inline bool isLevelExtension(const std::string &fileExtension) { return (getInfoFromExtension(fileExtension) & LEVEL) != 0; } inline bool isLevelExtension(const QString &fileExtension) { return (getInfoFromExtension(fileExtension) & LEVEL) != 0; } inline bool isLevelFilePath(const TFilePath &fp) { return (getInfo(fp) & LEVEL) != 0; } diff --git a/toonz/sources/include/tflash.h b/toonz/sources/include/tflash.h index 911647c..8d8fa75 100644 --- a/toonz/sources/include/tflash.h +++ b/toonz/sources/include/tflash.h @@ -54,9 +54,9 @@ public: class DVAPI TFlash { public: - static const wstring ConstantLines; - static const wstring MixedLines; - static const wstring VariableLines; + static const std::wstring ConstantLines; + static const std::wstring MixedLines; + static const std::wstring VariableLines; TFlash(int lx, int ly, int frameCount, int frameRate, TPropertyGroup *properties, bool keepImages = true) {} ~TFlash() {} @@ -70,19 +70,19 @@ public: void setFillStyleMatrix(const TAffine &aff) {} void setGradientFill(bool isLinear, const TPixel &color1, const TPixel &color2, double smooth) {} void drawLine(const TPointD &a, const TPointD &b) {} - void drawPolygon(vector> &quads, int clippedShapes = 0) {} + void drawPolygon(std::vector> &quads, int clippedShapes = 0) {} int drawRaster(TRaster32P r) { return 0; } void drawRegion(const TRegion &r, int clippedShapes = 0) {} void drawCenterline(const TStroke *s, bool drawAll) {} bool drawOutline(TStroke *s) { return false; } - void drawSegments(const vector segmentArray, bool isGradientColor); - void drawquads(const vector quadsArray); + void drawSegments(const std::vector segmentArray, bool isGradientColor); + void drawquads(const std::vector quadsArray); USHORT buildImage(const TImageP img, bool isMask) { return 0; } void draw(const TImageP vi, const TColorFunction *cf) {} void beginFrame(int frameIndex) {} int endFrame(bool isLast, int frameCountLoader, bool lastScene) { return 0; } int drawRectangle(const TRectD &rect) { return 0; } - int drawPolyline(vector &poly) { return 0; } + int drawPolyline(std::vector &poly) { return 0; } int drawEllipse(const TPointD ¢er, double radiusX, double radiusY) { return 0; } void drawDot(const TPointD ¢er, double radius) {} void pushMatrix() {} @@ -90,8 +90,8 @@ public: void multMatrix(const TAffine &aff) {} void putSound(TSoundTrackP st, int offset) {} void writeMovie(FILE *fp) {} - void drawPolygon(const list &poly, bool isOutline) {} - wstring getLineQuality() { return nullptr; } + void drawPolygon(const std::list &poly, bool isOutline) {} + std::wstring getLineQuality() { return nullptr; } void cleanCachedImages() {} void enableMask() {} void disableMask() {} diff --git a/toonz/sources/include/tfont.h b/toonz/sources/include/tfont.h index 6487c36..0f0d377 100644 --- a/toonz/sources/include/tfont.h +++ b/toonz/sources/include/tfont.h @@ -78,8 +78,8 @@ public: int getLineAscender() const; int getLineDescender() const; bool hasVertical() const; - wstring getFamily() const; - wstring getTypeface() const; + std::wstring getFamily() const; + std::wstring getTypeface() const; //bool isValidCode( wchar_t code ) const; private: @@ -132,15 +132,15 @@ public: void loadFontNames(); //! if can not create font, throws TFontCreationError and leave as current the old one - void setFamily(const wstring family); + void setFamily(const std::wstring family); //!if can not create font, throws TFontCreationError and leave as current the old one - void setTypeface(const wstring typeface); + void setTypeface(const std::wstring typeface); - wstring getCurrentFamily() const; - wstring getCurrentTypeface() const; - void getAllFamilies(vector &families) const; - void getAllTypefaces(vector &typefaces) const; + std::wstring getCurrentFamily() const; + std::wstring getCurrentTypeface() const; + void getAllFamilies(std::vector &families) const; + void getAllTypefaces(std::vector &typefaces) const; void setVertical(bool vertical); void setSize(int size); diff --git a/toonz/sources/include/tfx.h b/toonz/sources/include/tfx.h index dc6807d..fbb39cd 100644 --- a/toonz/sources/include/tfx.h +++ b/toonz/sources/include/tfx.h @@ -380,10 +380,10 @@ public: TFx(); virtual ~TFx(); - virtual wstring getName() const; - void setName(wstring name); - wstring getFxId() const; - void setFxId(wstring id); + virtual std::wstring getName() const; + void setName(std::wstring name); + std::wstring getFxId() const; + void setFxId(std::wstring id); TParamContainer *getParams(); const TParamContainer *getParams() const; @@ -404,7 +404,7 @@ public: //! returns false on duplicate names. Ownership is transferred to the group. bool removeInputPort(const std::string &name); //!< Removes the port with given name, returns false if not found. - bool renamePort(const string &oldName, const string &newName); + bool renamePort(const std::string &oldName, const std::string &newName); bool connect(const std::string &name, TFx *other); //!< Equivalent to getInputPort(name)->setFx(other). bool disconnect(const std::string &name); //!< Equivalent to getInputPort(name)->setFx(0). @@ -457,10 +457,10 @@ public: params = 0, length = 0; } - inline string getFxType() const; - virtual string getPluginId() const = 0; + inline std::string getFxType() const; + virtual std::string getPluginId() const = 0; - static TFx *create(string name); + static TFx *create(std::string name); // TParamObserver-related methods void onChange(const TParamChange &c); @@ -481,7 +481,7 @@ public: TFxAttributes *getAttributes() const; - virtual string getAlias(double frame, const TRenderSettings &info) const { return ""; } + virtual std::string getAlias(double frame, const TRenderSettings &info) const { return ""; } //! Compatibility function - used to translate a port name from older Toonz //! versions into its current form. @@ -533,7 +533,7 @@ public: //------------------------------------------------------------------- -inline string TFx::getFxType() const +inline std::string TFx::getFxType() const { return getDeclaration()->getId(); } diff --git a/toonz/sources/include/tfxattributes.h b/toonz/sources/include/tfxattributes.h index 7a4c0d7..8d74c5a 100644 --- a/toonz/sources/include/tfxattributes.h +++ b/toonz/sources/include/tfxattributes.h @@ -26,7 +26,7 @@ class DVAPI TFxAttributes TPointD m_speed; //A stack is used to manage subgroups. QStack m_groupId; - QStack m_groupName; + QStack m_groupName; int m_passiveCacheDataIdx; int m_groupSelector; @@ -78,9 +78,9 @@ public: bool isGrouped(); bool isContainedInGroup(int groupId); - void setGroupName(const wstring &name, int position = -1); - wstring getGroupName(bool fromEditor); - QStack getGroupNameStack(); + void setGroupName(const std::wstring &name, int position = -1); + std::wstring getGroupName(bool fromEditor); + QStack getGroupNameStack(); int removeGroupName(bool fromEditor); void removeGroupName(int position = -1); @@ -88,7 +88,7 @@ public: bool isGroupEditing(); void closeEditingGroup(int groupId); int getEditingGroupId(); - wstring getEditingGroupName(); + std::wstring getEditingGroupName(); void closeAllGroups(); }; diff --git a/toonz/sources/include/tfxcachemanager.h b/toonz/sources/include/tfxcachemanager.h index e2ae865..ec0b857 100644 --- a/toonz/sources/include/tfxcachemanager.h +++ b/toonz/sources/include/tfxcachemanager.h @@ -70,12 +70,12 @@ protected: virtual bool download(TCacheResourceP &resource) = 0; public: - ResourceBuilder(const string &resourceName, + ResourceBuilder(const std::string &resourceName, const TFxP &fx, double frame, const TRenderSettings &rs); virtual ~ResourceBuilder() {} static void declareResource( - const string &alias, const TFxP &fx, + const std::string &alias, const TFxP &fx, const TRectD &rect, double frame, const TRenderSettings &rs, bool subtileable = true); @@ -203,11 +203,11 @@ private: friend class ResourceBuilder; void declareResource( - const string &alias, const TFxP &fx, + const std::string &alias, const TFxP &fx, const TRectD &rect, double frame, const TRenderSettings &rs, bool subtileable); - ResourceData getResource(const string &resourceName, + ResourceData getResource(const std::string &resourceName, const TFxP &fx, double frame, const TRenderSettings &rs); /*void notifyResourceUpload(const TCacheResourceP& resource, const TRect& rect); @@ -247,7 +247,7 @@ public: TFxCacheManagerDelegate() {} virtual void getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) = 0; diff --git a/toonz/sources/include/tfxparam.h b/toonz/sources/include/tfxparam.h index 16d0fc3..8e3359c 100644 --- a/toonz/sources/include/tfxparam.h +++ b/toonz/sources/include/tfxparam.h @@ -9,7 +9,7 @@ #include "tparamcontainer.h" template -void bindParam(TFx *fx, string name, T &var, bool hidden = false) +void bindParam(TFx *fx, std::string name, T &var, bool hidden = false) { fx->getParams()->add(new TParamVarT(name, var, hidden)); var->addObserver(fx); diff --git a/toonz/sources/include/tfxutil.h b/toonz/sources/include/tfxutil.h index 7780c89..9437049 100644 --- a/toonz/sources/include/tfxutil.h +++ b/toonz/sources/include/tfxutil.h @@ -10,8 +10,8 @@ class TImage; namespace TFxUtil { -DVAPI void setParam(const TFxP &fx, string paramName, double value); -DVAPI void setParam(const TFxP &fx, string paramName, TPixel32 value); +DVAPI void setParam(const TFxP &fx, std::string paramName, double value); +DVAPI void setParam(const TFxP &fx, std::string paramName, TPixel32 value); DVAPI TFxP makeColorCard(TPixel32 color); diff --git a/toonz/sources/include/tgeometry.h b/toonz/sources/include/tgeometry.h index 28ac4a6..44b9d92 100644 --- a/toonz/sources/include/tgeometry.h +++ b/toonz/sources/include/tgeometry.h @@ -4,7 +4,7 @@ #define T_GEOMETRY_INCLUDED #include "tutil.h" -#include +#include #undef DVAPI #undef DVVAR @@ -95,7 +95,7 @@ inline T operator*(const TPointT &a, const TPointT &b) //----------------------------------------------------------------------------- template -inline ostream &operator<<(ostream &out, const TPointT &p) +inline std::ostream &operator<<(std::ostream &out, const TPointT &p) { return out << "(" << p.x << ", " << p.y << ")"; } @@ -168,7 +168,7 @@ This helper function returns the absolute value of the specified point */ inline double norm(const TPointD &p) { - return sqrt(norm2(p)); + return std::sqrt(norm2(p)); } /*! @@ -322,7 +322,7 @@ public: //============================================================================= template -inline ostream &operator<<(ostream &out, const T3DPointT &p) +inline std::ostream &operator<<(std::ostream &out, const T3DPointT &p) { return out << "(" << p.x << ", " << p.y << ", " << p.z << ")"; } @@ -367,7 +367,7 @@ inline T norm2(const T3DPointT &p) template inline T norm(const T3DPointT &p) { - return sqrt(norm2(p)); + return std::sqrt(norm2(p)); } /*! @@ -533,7 +533,7 @@ inline double tdistance(const TThickPoint &p1, const TThickPoint &p2) return norm(convert(p2 - p1)); } -inline ostream &operator<<(ostream &out, const TThickPoint &p) +inline std::ostream &operator<<(std::ostream &out, const TThickPoint &p) { return out << "(" << p.x << ", " << p.y << ", " << p.thick << ")"; } @@ -613,7 +613,7 @@ typedef TDimensionT TDimensionD; //============================================================================= template -inline ostream &operator<<(ostream &out, const TDimensionT &p) +inline std::ostream &operator<<(std::ostream &out, const TDimensionT &p) { return out << "(" << p.lx << ", " << p.ly << ")"; } @@ -932,7 +932,7 @@ inline TRectD operator/(const TRectD &rect, double factor) //----------------------------------------------------------------------------- template -inline ostream &operator<<(ostream &out, const TRectT &r) +inline std::ostream &operator<<(std::ostream &out, const TRectT &r) { return out << "(" << r.x0 << "," << r.y0 << ";" << r.x1 << "," << r.y1 << ")"; @@ -1316,7 +1316,7 @@ inline TAffine inv(const TAffine &a) //----------------------------------------------------------------------------- -inline ostream &operator<<(ostream &out, const TAffine &a) +inline std::ostream &operator<<(std::ostream &out, const TAffine &a) { return out << "(" << a.a11 << ", " << a.a12 << ", " << a.a13 << ";" << a.a21 << ", " << a.a22 << ", " << a.a23 << ")"; diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h index 6f3e3cc..71c0424 100644 --- a/toonz/sources/include/tgl.h +++ b/toonz/sources/include/tgl.h @@ -101,12 +101,12 @@ DVAPI double tglGetPixelSize2(); //! Draw text in string s at position p. -DVAPI void tglDrawText(const TPointD &p, const string &s, void *font = GLUT_STROKE_ROMAN); -DVAPI void tglDrawText(const TPointD &p, const wstring &s, void *font = GLUT_STROKE_ROMAN); +DVAPI void tglDrawText(const TPointD &p, const std::string &s, void *font = GLUT_STROKE_ROMAN); +DVAPI void tglDrawText(const TPointD &p, const std::wstring &s, void *font = GLUT_STROKE_ROMAN); //! Returns text width -DVAPI double tglGetTextWidth(const string &s, void *font = GLUT_STROKE_ROMAN); +DVAPI double tglGetTextWidth(const std::string &s, void *font = GLUT_STROKE_ROMAN); /*! Draw circle of radius r with center c. diff --git a/toonz/sources/include/tgrammar.h b/toonz/sources/include/tgrammar.h index bf91dff..4c164e9 100644 --- a/toonz/sources/include/tgrammar.h +++ b/toonz/sources/include/tgrammar.h @@ -166,13 +166,13 @@ enum TokenType { class DVAPI Pattern { - string m_description; + std::string m_description; public: Pattern() {} virtual ~Pattern() {} - virtual string getFirstKeyword() const { return ""; } + virtual std::string getFirstKeyword() const { return ""; } virtual void getAcceptableKeywords(std::vector &keywords) const {} virtual int getPriority() const { return 0; } virtual bool expressionExpected(const std::vector &previousTokens) const { return false; } @@ -186,8 +186,8 @@ public: std::vector &stack, const std::vector &tokens) const = 0; - string getDescription() const { return m_description; } - void setDescription(string description) { m_description = description; } + std::string getDescription() const { return m_description; } + void setDescription(std::string description) { m_description = description; } // helper methods CalculatorNode *popNode(std::vector &stack) const; @@ -213,7 +213,7 @@ public: const Pattern *getPattern(Position position, const Token &token) const; // returns matching - typedef std::vector> Suggestions; + typedef std::vector> Suggestions; void getSuggestions(Suggestions &suggetsions, Position position) const; private: diff --git a/toonz/sources/include/tiio.h b/toonz/sources/include/tiio.h index 5abbefc..b0adfb4 100644 --- a/toonz/sources/include/tiio.h +++ b/toonz/sources/include/tiio.h @@ -73,7 +73,7 @@ public: virtual void enable16BitRead(bool) {} - virtual void getTzpPaletteColorNames(map> &pltColorNames) const { assert(false); } + virtual void getTzpPaletteColorNames(std::map> &pltColorNames) const { assert(false); } private: // not implemented diff --git a/toonz/sources/include/tiio_jpg.h b/toonz/sources/include/tiio_jpg.h index 8773555..586ebb7 100644 --- a/toonz/sources/include/tiio_jpg.h +++ b/toonz/sources/include/tiio_jpg.h @@ -56,7 +56,7 @@ public: TIntProperty m_quality; TIntProperty m_smoothing; - static const string QUALITY; + static const std::string QUALITY; JpgWriterProperties() : m_quality(QUALITY, 0, 100, 90), m_smoothing("Smoothing", 0, 100, 0) diff --git a/toonz/sources/include/timage_io.h b/toonz/sources/include/timage_io.h index ac80f00..4a6c830 100644 --- a/toonz/sources/include/timage_io.h +++ b/toonz/sources/include/timage_io.h @@ -40,7 +40,7 @@ class DVAPI TImageException : public TException TFilePath m_fp; public: - TImageException(const TFilePath &fp, const string &msg); + TImageException(const TFilePath &fp, const std::string &msg); ~TImageException() {} TString getMessage() const; @@ -176,7 +176,7 @@ public: */ TRect getRegion() const { return m_region; } - void getTzpPaletteColorNames(map> &pltColorNames); //colorindex(<256: paint), pagename, colorname + void getTzpPaletteColorNames(std::map> &pltColorNames); //colorindex(<256: paint), pagename, colorname }; //----------------------------------------------------------- diff --git a/toonz/sources/include/timagecache.h b/toonz/sources/include/timagecache.h index a9f8f94..7028e36 100644 --- a/toonz/sources/include/timagecache.h +++ b/toonz/sources/include/timagecache.h @@ -60,7 +60,7 @@ class DVAPI TImageCache public: static TImageCache *instance(); - string getUniqueId(); + std::string getUniqueId(); //! Enables or disables the image cache on current thread. //! When the cache is disabled, images can't be added to the cache. @@ -74,17 +74,17 @@ public: //! Adds the passed image to the cache, under the specified id. The optional \b overwrite parameter //! may be specified in case an image with the same id has already been cached. - void add(const string &id, const TImageP &img, bool overwrite = true); + void add(const std::string &id, const TImageP &img, bool overwrite = true); //! Removes from the image cache the image associated to passed id. - void remove(const string &id); + void remove(const std::string &id); //! Rebinds the association between a previously cached image and its id. - void remap(const string &dstId, const string &srcId); + void remap(const std::string &dstId, const std::string &srcId); // provvisorio? Bisogna ripensarci // l'idea e' rimappare tutte gli id della forma srcId:xxxxx - void remapIcons(const string &dstId, const string &srcId); + void remapIcons(const std::string &dstId, const std::string &srcId); //! Clears the image cache. After calling this method, every image in the cache //! is released - and optionally the cache swap folder is deleted. @@ -97,13 +97,13 @@ public: void clearSceneImages(); //! Returns true or false whether an image under the passed id is found in the cache. - bool isCached(const string &id) const; + bool isCached(const std::string &id) const; //! Returns the subsampling level of the image under the specified id. - bool getSubsampling(const string &id, int &subs) const; + bool getSubsampling(const std::string &id, int &subs) const; //! Retrieves the image associated to input \b id. Returns an empty pointer if no image was found. - TImageP get(const string &id, bool toBeModified) const; + TImageP get(const std::string &id, bool toBeModified) const; //! Returns the RAM memory size (KB) occupied by the image cache. UINT getMemUsage() const; @@ -111,20 +111,20 @@ public: //! \n \n \b{NOTE:} This function is not implemented yet! UINT getDiskUsage() const; - UINT getUncompressedMemUsage(const string &id) const; + UINT getUncompressedMemUsage(const std::string &id) const; //! Returns the RAM memory size (KB) of the image associated to passed id. - UINT getMemUsage(const string &id) const; - UINT getDiskUsage(const string &id) const; + UINT getMemUsage(const std::string &id) const; + UINT getDiskUsage(const std::string &id) const; - void dump(ostream &os) const; // per debug + void dump(std::ostream &os) const; // per debug UCHAR *compressAndMalloc(TUINT32 requestedSize); // compress in the cache till it can allocate the requested memory //for debug - void outputMap(UINT chunkRequested, string filename); + void outputMap(UINT chunkRequested, std::string filename); - bool hasBeenModified(const string &id, bool reset) const; + bool hasBeenModified(const std::string &id, bool reset) const; #ifndef TNZCORE_LIGHT void add(const QString &id, const TImageP &img, bool overwrite = true); @@ -133,7 +133,7 @@ public: #endif // compress id (in memory) - void compress(const string &id); + void compress(const std::string &id); private: TImageCache(); diff --git a/toonz/sources/include/tlevel.h b/toonz/sources/include/tlevel.h index 80d7ade..b601cec 100644 --- a/toonz/sources/include/tlevel.h +++ b/toonz/sources/include/tlevel.h @@ -28,7 +28,7 @@ public: typedef Table::iterator Iterator; private: - string m_name; + std::string m_name; Table *m_table; TPalette *m_palette; @@ -43,8 +43,8 @@ private: public: // nome - string getName() const; - void setName(string name); + std::string getName() const; + void setName(std::string name); // frames int getFrameCount() const { return (int)m_table->size(); }; diff --git a/toonz/sources/include/tlevel_io.h b/toonz/sources/include/tlevel_io.h index 034a141..5544c5a 100644 --- a/toonz/sources/include/tlevel_io.h +++ b/toonz/sources/include/tlevel_io.h @@ -90,7 +90,7 @@ public: VectorLevel }; - static FormatType getFormatType(string extension); + static FormatType getFormatType(std::string extension); static void define( QString extension, @@ -133,7 +133,7 @@ class TPropertyGroup; typedef TLevelWriter *TLevelWriterCreateProc(const TFilePath &path, TPropertyGroup *); -typedef TPropertyGroup *TWriterInfoCreateProc(const string &ext); +typedef TPropertyGroup *TWriterInfoCreateProc(const std::string &ext); //----------------------------------------------------------- @@ -238,7 +238,7 @@ public: // Some useful utility inlines -inline bool isMovieType(string type) +inline bool isMovieType(std::string type) { return (type == "mov" || type == "avi" || type == "3gp"); } @@ -247,7 +247,7 @@ inline bool isMovieType(string type) inline bool isMovieType(const TFilePath &fp) { - string type(fp.getType()); + std::string type(fp.getType()); return isMovieType(type); } diff --git a/toonz/sources/include/tlogger.h b/toonz/sources/include/tlogger.h index 7932ec1..d5d874f 100644 --- a/toonz/sources/include/tlogger.h +++ b/toonz/sources/include/tlogger.h @@ -53,14 +53,14 @@ public: class DVAPI Message { MessageType m_type; - string m_timestamp; - string m_text; + std::string m_timestamp; + std::string m_text; public: - Message(MessageType type, string text); + Message(MessageType type, std::string text); MessageType getType() const { return m_type; } - string getTimestamp() const { return m_timestamp; } - string getText() const { return m_text; } + std::string getTimestamp() const { return m_timestamp; } + std::string getText() const { return m_text; } }; class Listener @@ -81,13 +81,13 @@ public: class DVAPI Stream { MessageType m_type; - string m_text; + std::string m_text; public: Stream(MessageType type); ~Stream(); - Stream &operator<<(string v); + Stream &operator<<(std::string v); Stream &operator<<(int v); Stream &operator<<(double v); Stream &operator<<(const TFilePath &v); @@ -99,7 +99,7 @@ public: NullStream() {} ~NullStream() {} - NullStream &operator<<(string) { return *this; } + NullStream &operator<<(std::string) { return *this; } NullStream &operator<<(int) { return *this; } NullStream &operator<<(double) { return *this; } NullStream &operator<<(const TFilePath &) { return *this; } diff --git a/toonz/sources/include/tmacrofx.h b/toonz/sources/include/tmacrofx.h index 23f4496..09b5308 100644 --- a/toonz/sources/include/tmacrofx.h +++ b/toonz/sources/include/tmacrofx.h @@ -27,20 +27,20 @@ class DVAPI TMacroFx : public TRasterFx FX_DECLARATION(TMacroFx) TRasterFxP m_root; - vector m_fxs; + std::vector m_fxs; bool m_isEditing; bool isaLeaf(TFx *fx) const; public: - static bool analyze(const vector &fxs, + static bool analyze(const std::vector &fxs, TFxP &root, - vector &roots, - vector &leafs); + std::vector &roots, + std::vector &leafs); - static bool analyze(const vector &fxs); + static bool analyze(const std::vector &fxs); - static TMacroFx *create(const vector &fxs); + static TMacroFx *create(const std::vector &fxs); TMacroFx(); ~TMacroFx(); @@ -55,22 +55,22 @@ public: TFxTimeRegion getTimeRegion() const; - string getPluginId() const; + std::string getPluginId() const; void setRoot(TFx *root); TFx *getRoot() const; //!Returns the Fx identified by \b id. //!Returns 0 if the macro does not contains an Fx with fxId equals ti \b id. - TFx *getFxById(const wstring &id) const; + TFx *getFxById(const std::wstring &id) const; // restituisce un riferimento al vettore contenente gli effetti contenuti nel macroFx - const vector &getFxs() const; + const std::vector &getFxs() const; - string getMacroFxType() const; + std::string getMacroFxType() const; bool canHandle(const TRenderSettings &info, double frame); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; void loadData(TIStream &is); void saveData(TOStream &os); diff --git a/toonz/sources/include/tmathutil.h b/toonz/sources/include/tmathutil.h index ec6ef42..b6ccab6 100644 --- a/toonz/sources/include/tmathutil.h +++ b/toonz/sources/include/tmathutil.h @@ -35,7 +35,7 @@ class DVAPI TMathException : public TException TString m_msg; public: - TMathException(string msg); + TMathException(std::string msg); virtual ~TMathException() {} virtual TString getMessage() const { return m_msg; } }; @@ -125,8 +125,7 @@ DVAPI double tdet(double *LUa, int n, double d); \par poly is a vector with coeff of polynomious in crescent order. \ret sol is the vector of solution and contain real found solution. */ -DVAPI int rootFinding(const vector &poly, - vector &sol); +DVAPI int rootFinding(const std::vector &poly, std::vector &sol); //----------------------------------------------------------------------------- diff --git a/toonz/sources/include/tnotanimatableparam.h b/toonz/sources/include/tnotanimatableparam.h index d44b5c2..b924acd 100644 --- a/toonz/sources/include/tnotanimatableparam.h +++ b/toonz/sources/include/tnotanimatableparam.h @@ -169,7 +169,7 @@ public: const TSmartPointerT &, double, bool) {} - string getValueAlias(double, int) + std::string getValueAlias(double, int) { return toString(getValue()); } @@ -285,14 +285,14 @@ class DVAPI TStringParam : public TNotAnimatableParam PERSIST_DECLARATION(TStringParam); public: - TStringParam(wstring v = L"") : TNotAnimatableParam(v) {} - TStringParam(const TStringParam &src) : TNotAnimatableParam(src) {} + TStringParam(std::wstring v = L"") : TNotAnimatableParam(v) {} + TStringParam(const TStringParam &src) : TNotAnimatableParam(src) {} TParam *clone() const { return new TStringParam(*this); } void loadData(TIStream &is); void saveData(TOStream &os); }; -DEFINE_PARAM_SMARTPOINTER(TStringParam, wstring) +DEFINE_PARAM_SMARTPOINTER(TStringParam, std::wstring) //========================================================= // @@ -308,7 +308,7 @@ class DVAPI TEnumParam : public TNotAnimatableParam PERSIST_DECLARATION(TEnumParam) public: - TEnumParam(const int &v, const string &caption); + TEnumParam(const int &v, const std::string &caption); TEnumParam(); @@ -319,12 +319,12 @@ public: void copy(TParam *src); void setValue(int v, bool undoing = false); - void setValue(const string &caption, bool undoing = false); + void setValue(const std::string &caption, bool undoing = false); - void addItem(const int &item, const string &caption); + void addItem(const int &item, const std::string &caption); int getItemCount() const; - void getItem(int i, int &item, string &caption) const; + void getItem(int i, int &item, std::string &caption) const; // TPersist methods void loadData(TIStream &is); @@ -344,7 +344,7 @@ class DVAPI TIntEnumParamP : public TDerivedSmartPointerT { public: TIntEnumParamP(TIntEnumParam *p = 0) : DerivedSmartPointer(p) {} - TIntEnumParamP(int v, const string &caption) : DerivedSmartPointer(new TEnumParam(v, caption)) {} + TIntEnumParamP(int v, const std::string &caption) : DerivedSmartPointer(new TEnumParam(v, caption)) {} TIntEnumParamP(TParamP &p) : DerivedSmartPointer(p) {} TIntEnumParamP(const TParamP &p) : DerivedSmartPointer(p) {} operator TParamP() const { return TParamP(m_pointer); } diff --git a/toonz/sources/include/tools/rasterselection.h b/toonz/sources/include/tools/rasterselection.h index a57a65e..590ef4d 100644 --- a/toonz/sources/include/tools/rasterselection.h +++ b/toonz/sources/include/tools/rasterselection.h @@ -45,8 +45,8 @@ class DVAPI RasterSelection : public TSelection TPaletteP m_oldPalette; TRectD m_selectionBbox; - vector m_strokes; - vector m_originalStrokes; + std::vector m_strokes; + std::vector m_originalStrokes; TAffine m_affine; TPoint m_startPosition; TRasterP m_floatingSelection; @@ -73,9 +73,9 @@ public: m_currentImage = img, m_currentImageCell = imageCell; } - void setStrokes(const vector &strokes) { m_strokes = strokes; } - vector getStrokes() const { return m_strokes; } - vector getOriginalStrokes() const { return m_originalStrokes; } + void setStrokes(const std::vector &strokes) { m_strokes = strokes; } + std::vector getStrokes() const { return m_strokes; } + std::vector getOriginalStrokes() const { return m_originalStrokes; } void setTransformation(const TAffine &affine) { m_affine = affine; } TAffine getTransformation() const { return m_affine; } diff --git a/toonz/sources/include/tools/tool.h b/toonz/sources/include/tools/tool.h index 0918e05..4902020 100644 --- a/toonz/sources/include/tools/tool.h +++ b/toonz/sources/include/tools/tool.h @@ -240,7 +240,7 @@ public: }; public: - static TTool *getTool(string toolName, ToolTargetType targetType); + static TTool *getTool(std::string toolName, ToolTargetType targetType); static TApplication *getApplication(); static void setApplication(TApplication *application) @@ -275,7 +275,7 @@ public: //! every tool (invoking updateTranslation() for each). public: - TTool(string toolName); + TTool(std::string toolName); virtual ~TTool() {} virtual ToolType getToolType() const = 0; @@ -284,7 +284,7 @@ public: return (ToolTargetType)m_targetType; } - string getName() const { return m_name; } + std::string getName() const { return m_name; } /*! \details The default returns a generic box containing the options for property group 0). @@ -331,7 +331,7 @@ public: //! For keycodes list, \see keycodes.h. virtual bool keyDown(int, TUINT32, const TPoint &) { return false; } - virtual bool keyDown(int, wstring, TUINT32, const TPoint &) { return false; } + virtual bool keyDown(int, std::wstring, TUINT32, const TPoint &) { return false; } virtual void onInputText(std::wstring, std::wstring, int, int){}; @@ -363,7 +363,7 @@ public: /*! Does the tasks associated to changes in \p propertyName and returns \p true; */ - virtual bool onPropertyChanged(string propertyName) + virtual bool onPropertyChanged(std::string propertyName) { return false; } //!< Does the tasks associated to changes in \p propertyName and @@ -445,7 +445,7 @@ public: static bool m_isFrameCreated; //!< \deprecated Shouldn't expose global static variables. protected: - string m_name; //!< The tool's name. + std::string m_name; //!< The tool's name. Viewer *m_viewer; //!< Tool's current viewer. TAffine m_matrix; //!< World-to-window reference change affine. @@ -504,7 +504,7 @@ public: //! return the column index of the drawing intersecting point \b p //! (window coordinate, pixels, bottom-left origin) virtual int posToColumnIndex(const TPoint &p, double distance, bool includeInvisible = true) const = 0; - virtual void posToColumnIndexes(const TPoint &p, vector &indexes, double distance, bool includeInvisible = true) const = 0; + virtual void posToColumnIndexes(const TPoint &p, std::vector &indexes, double distance, bool includeInvisible = true) const = 0; //! return the row of the drawing intersecting point \b p (used with onionskins) //! (window coordinate, pixels, bottom-left origin) diff --git a/toonz/sources/include/tools/tooloptions.h b/toonz/sources/include/tools/tooloptions.h index bc3cdda..8f66777 100644 --- a/toonz/sources/include/tools/tooloptions.h +++ b/toonz/sources/include/tools/tooloptions.h @@ -119,7 +119,7 @@ public: ToolOptionControl *control(const std::string &controlName) const; QLabel *addLabel(QString name); - void addLabel(string propName, QLabel *label); + void addLabel(std::string propName, QLabel *label); void addSeparator(); }; diff --git a/toonz/sources/include/tools/toolutils.h b/toonz/sources/include/tools/toolutils.h index cab1634..d360cae 100644 --- a/toonz/sources/include/tools/toolutils.h +++ b/toonz/sources/include/tools/toolutils.h @@ -155,7 +155,7 @@ protected: bool m_animationSheetEnabled; std::vector m_cellsData; // represent original frame range when m_animationSheetEnabled, m_createdFrame and !m_isEditingLevel; see tool.cpp TPaletteP m_oldPalette; - string m_imageId; + std::string m_imageId; static int m_idCount; void insertLevelAndFrameIfNeeded() const; @@ -224,14 +224,14 @@ public: void undo() const; private: - vector paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet) const; + std::vector paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet) const; }; //----------------------------------------------------------------------------- class UndoModifyStroke : public TToolUndo { - vector m_before, m_after; + std::vector m_before, m_after; bool m_selfLoopBefore, m_selfLoopAfter; int m_row; @@ -254,7 +254,7 @@ public: class UndoModifyStrokeAndPaint : public UndoModifyStroke { - vector *m_fillInformation; + std::vector *m_fillInformation; TRectD m_oldBBox; public: @@ -276,10 +276,10 @@ public: class UndoModifyListStroke : public TToolUndo { - list m_strokeList; - list::iterator m_beginIt, m_endIt; + std::list m_strokeList; + std::list::iterator m_beginIt, m_endIt; - vector *m_fillInformation; + std::vector *m_fillInformation; TRectD m_oldBBox; public: @@ -304,13 +304,13 @@ class UndoPencil : public TToolUndo { int m_strokeId; TStroke *m_stroke; - vector *m_fillInformation; + std::vector *m_fillInformation; bool m_autogroup; bool m_autofill; public: - UndoPencil(TStroke *stroke, vector *fillInformation, TXshSimpleLevel *level, + UndoPencil(TStroke *stroke, std::vector *fillInformation, TXshSimpleLevel *level, const TFrameId &frameId, bool m_createdFrame, bool m_createdLevel, bool autogroup = false, bool autofill = false); ~UndoPencil(); @@ -337,12 +337,12 @@ protected: bool m_selective, m_filled, m_doAntialias; /*-- HistoryにPrimitive名を表示するため --*/ - string m_primitiveName; + std::string m_primitiveName; public: UndoRasterPencil(TXshSimpleLevel *level, const TFrameId &frameId, TStroke *stroke, bool selective, bool filled, bool doAntialias, bool createdFrame, bool createdLevel, - string primitiveName); + std::string primitiveName); ~UndoRasterPencil(); virtual void redo() const; int getSize() const; @@ -390,7 +390,7 @@ class UndoPath : public TUndo { TStageObjectSpline *m_spline; - vector m_before, m_after; + std::vector m_before, m_after; bool m_selfLoopBefore; //TStroke *m_before; //TStroke *m_after; @@ -518,7 +518,7 @@ TRectD DVAPI interpolateRect(const TRectD &rect1, const TRectD &rect2, double t) //!Returns a TRectD that contains all points in \b points //!If \b maxThickness is not zero, the TRectD is computed using this value. -TRectD DVAPI getBounds(const vector &points, double maxThickness = 0); +TRectD DVAPI getBounds(const std::vector &points, double maxThickness = 0); //!Ritorna un raster uguale a quello dato ma ruotato di 90 gradi //!Il parametro toRight indica se si sta ruotando a destra o a sinistra! diff --git a/toonz/sources/include/toonz/autoclose.h b/toonz/sources/include/toonz/autoclose.h index 3465d50..0962235 100644 --- a/toonz/sources/include/toonz/autoclose.h +++ b/toonz/sources/include/toonz/autoclose.h @@ -28,10 +28,10 @@ public: void exec(); // non modifica il raster. Si limita a calcolare i segmenti - void compute(vector &segments); + void compute(std::vector &segments); // disegna sul raster i segmenti - void draw(const vector &segments); + void draw(const std::vector &segments); private: class Imp; diff --git a/toonz/sources/include/toonz/captureparameters.h b/toonz/sources/include/toonz/captureparameters.h index 2f0934c..3049eb1 100644 --- a/toonz/sources/include/toonz/captureparameters.h +++ b/toonz/sources/include/toonz/captureparameters.h @@ -24,7 +24,7 @@ class TPropertyGroup; class DVAPI CaptureParameters { - wstring m_deviceName; + std::wstring m_deviceName; TDimension m_resolution; int m_brightness; int m_contranst; @@ -34,15 +34,15 @@ class DVAPI CaptureParameters int m_step; TFilePath m_filePath; - string m_format; - std::map m_formatProperties; + std::string m_format; + std::map m_formatProperties; public: CaptureParameters(); ~CaptureParameters() {} - wstring getDeviceName() const { return m_deviceName; } - void setDeviceName(wstring name) { m_deviceName = name; } + std::wstring getDeviceName() const { return m_deviceName; } + void setDeviceName(std::wstring name) { m_deviceName = name; } TDimension getResolution() const { return m_resolution; } void setResolution(TDimension res) { m_resolution = res; } @@ -68,16 +68,16 @@ public: int getStep() const { return m_step; } void setStep(int value) { m_step = value; } - string getFileFormat() const { return m_format; } - void setFileFormat(string value) { m_format = value; } + std::string getFileFormat() const { return m_format; } + void setFileFormat(std::string value) { m_format = value; } - TPropertyGroup *getFileFormatProperties(string ext); + TPropertyGroup *getFileFormatProperties(std::string ext); void assign(const CaptureParameters *params); void saveData(TOStream &os); void loadData(TIStream &is); protected: - void getFileFormatPropertiesExtensions(std::vector &v) const; + void getFileFormatPropertiesExtensions(std::vector &v) const; }; #endif // CAPTUREPARAMETERS_H diff --git a/toonz/sources/include/toonz/cleanupparameters.h b/toonz/sources/include/toonz/cleanupparameters.h index dcef310..f92648b 100644 --- a/toonz/sources/include/toonz/cleanupparameters.h +++ b/toonz/sources/include/toonz/cleanupparameters.h @@ -93,7 +93,7 @@ struct DOT { class FDG_INFO { public: - string m_name; + std::string m_name; int ctr_type; /* ctr_type == TRUE: */ double ctr_x, ctr_y; /* in mm */ @@ -180,8 +180,8 @@ public: const CleanupTypes::FDG_INFO &getFdgInfo(); - string getFdgName() const { return m_fdgInfo.m_name; } - bool setFdgByName(string name); + std::string getFdgName() const { return m_fdgInfo.m_name; } + bool setFdgByName(std::string name); // la scena serve per gestire i default: // internamente il path puo' essere vuoto diff --git a/toonz/sources/include/toonz/fill.h b/toonz/sources/include/toonz/fill.h index 56a4f5c..5f2f8b6 100644 --- a/toonz/sources/include/toonz/fill.h +++ b/toonz/sources/include/toonz/fill.h @@ -21,7 +21,7 @@ class FillParameters { public: int m_styleId; - wstring m_fillType; + std::wstring m_fillType; bool m_emptyOnly, m_segment; int m_minFillDepth; int m_maxFillDepth; diff --git a/toonz/sources/include/toonz/fxcommand.h b/toonz/sources/include/toonz/fxcommand.h index 6d0bf6e..7ce3181 100644 --- a/toonz/sources/include/toonz/fxcommand.h +++ b/toonz/sources/include/toonz/fxcommand.h @@ -83,18 +83,18 @@ DVAPI void connectNodesToXsheet(const std::list &fxs, TXsheetHandle *xshHa DVAPI void deleteSelection(const std::list &fxs, const std::list &links, const std::list &columnIndexes, TXsheetHandle *xshHandle, TFxHandle *fxHandle); -DVAPI void pasteFxs(const std::list &fxs, const map &zeraryFxColumnSize, const std::list &columns, +DVAPI void pasteFxs(const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, const TPointD &pos, TXsheetHandle *xshHandle, TFxHandle *fxHandle); -DVAPI void insertPasteFxs(const Link &link, const std::list &fxs, const map &zeraryFxColumnSize, +DVAPI void insertPasteFxs(const Link &link, const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, TXsheetHandle *xshHandle, TFxHandle *fxHandle); -DVAPI void addPasteFxs(TFx *inFx, const std::list &fxs, const map &zeraryFxColumnSize, +DVAPI void addPasteFxs(TFx *inFx, const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, TXsheetHandle *xshHandle, TFxHandle *fxHandle); -DVAPI void replacePasteFxs(TFx *inFx, const std::list &fxs, const map &zeraryFxColumnSize, +DVAPI void replacePasteFxs(TFx *inFx, const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, TXsheetHandle *xshHandle, TFxHandle *fxHandle); -DVAPI void renameFx(TFx *fx, const wstring &newName, TXsheetHandle *xshHandle); +DVAPI void renameFx(TFx *fx, const std::wstring &newName, TXsheetHandle *xshHandle); DVAPI void groupFxs(const std::list &fxs, TXsheetHandle *xshHandle); DVAPI void ungroupFxs(int groupId, TXsheetHandle *xshHandle); -DVAPI void renameGroup(const std::list &fxs, const wstring &name, bool fromEditor, TXsheetHandle *xshHandle); +DVAPI void renameGroup(const std::list &fxs, const std::wstring &name, bool fromEditor, TXsheetHandle *xshHandle); } // namespace TFxCommand diff --git a/toonz/sources/include/toonz/fxdag.h b/toonz/sources/include/toonz/fxdag.h index c2c1944..b605bca 100644 --- a/toonz/sources/include/toonz/fxdag.h +++ b/toonz/sources/include/toonz/fxdag.h @@ -31,8 +31,8 @@ class DVAPI FxDag TFxSet *m_internalFxs, *m_terminalFxs; TFx *m_xsheetFx; std::vector m_outputFxs; - std::map m_typeTable; - std::map m_idTable; + std::map m_typeTable; + std::map m_idTable; int m_groupIdCount; int m_dagGridDimension; @@ -70,7 +70,7 @@ public: void getFxs(std::vector &fxs) const; - TFx *getFxById(wstring id) const; + TFx *getFxById(std::wstring id) const; void setDagGridDimension(int dim) { m_dagGridDimension = dim; } int getDagGridDimension() const { return m_dagGridDimension; } diff --git a/toonz/sources/include/toonz/imagelocation.h b/toonz/sources/include/toonz/imagelocation.h index cc47e35..288801e 100644 --- a/toonz/sources/include/toonz/imagelocation.h +++ b/toonz/sources/include/toonz/imagelocation.h @@ -55,7 +55,7 @@ public: TImageLocation(int row, int col); // XsheetImage // TImageLocation(const TStageObjectId &pid); // PathImage TImageLocation(TStageObjectSpline *spline); // PathImage - TImageLocation(wstring levelName, const TFrameId &fid); // LevelStripImage + TImageLocation(std::wstring levelName, const TFrameId &fid); // LevelStripImage }; #endif diff --git a/toonz/sources/include/toonz/imagemanager.h b/toonz/sources/include/toonz/imagemanager.h index 94aa6c0..ead2f12 100644 --- a/toonz/sources/include/toonz/imagemanager.h +++ b/toonz/sources/include/toonz/imagemanager.h @@ -120,7 +120,7 @@ public: void clear(); // load icon (and image) data of all frames into cache - void loadAllTlvIconsAndPutInCache(TXshSimpleLevel *, vector, vector, bool); + void loadAllTlvIconsAndPutInCache(TXshSimpleLevel *, std::vector, std::vector, bool); /*! Returns the image built by the object associated with the specified identifier, using the diff --git a/toonz/sources/include/toonz/logger.h b/toonz/sources/include/toonz/logger.h index 05932b5..4952dfb 100644 --- a/toonz/sources/include/toonz/logger.h +++ b/toonz/sources/include/toonz/logger.h @@ -28,16 +28,16 @@ public: private: Logger(); std::vector m_listeners; - std::vector m_rows; + std::vector m_rows; public: static Logger *instance(); - void add(wstring s); + void add(std::wstring s); void clear(); int getRowCount() const; - wstring getRow(int i) const; + std::wstring getRow(int i) const; void addListener(Listener *listener); void removeListener(Listener *listener); diff --git a/toonz/sources/include/toonz/namebuilder.h b/toonz/sources/include/toonz/namebuilder.h index b32c1ed..d10a07d 100644 --- a/toonz/sources/include/toonz/namebuilder.h +++ b/toonz/sources/include/toonz/namebuilder.h @@ -23,9 +23,9 @@ class DVAPI NameBuilder { public: virtual ~NameBuilder() {} - virtual wstring getNext() = 0; + virtual std::wstring getNext() = 0; - static NameBuilder *getBuilder(wstring levelName = L""); + static NameBuilder *getBuilder(std::wstring levelName = L""); // NameBuilder::getBuilder() restituisce un NameCreator // NameBuilder::getBuilder("pippo") restituisce un NameModifier @@ -40,19 +40,19 @@ class DVAPI NameCreator : public NameBuilder public: NameCreator() {} - wstring getNext(); + std::wstring getNext(); }; //------------------------------------------------------------------- class DVAPI NameModifier : public NameBuilder { - wstring m_nameBase; + std::wstring m_nameBase; int m_index; public: - NameModifier(wstring name); - wstring getNext(); + NameModifier(std::wstring name); + std::wstring getNext(); }; //------------------------------------------------------------------- diff --git a/toonz/sources/include/toonz/observer.h b/toonz/sources/include/toonz/observer.h index 927f6ca..248a286 100644 --- a/toonz/sources/include/toonz/observer.h +++ b/toonz/sources/include/toonz/observer.h @@ -328,7 +328,7 @@ typedef TChangeObserverT TFxDagObserver; class DVAPI TNotifier { - vector m_obsList; + std::vector m_obsList; TObserverListT m_globalObs; TObserverListT m_sceneNameObs; TObserverListT m_directoryObs; diff --git a/toonz/sources/include/toonz/palettecmd.h b/toonz/sources/include/toonz/palettecmd.h index 685c69a..9c15146 100644 --- a/toonz/sources/include/toonz/palettecmd.h +++ b/toonz/sources/include/toonz/palettecmd.h @@ -55,7 +55,7 @@ DVAPI void addStyles(TPaletteHandle *paletteHandle, int pageIndex, DVAPI void eraseStyles(const std::set &levels, const std::vector &styleIds); // se name == L"" viene generato un nome univoco ('page N') -DVAPI void addPage(TPaletteHandle *paletteHandle, wstring name = L"", bool withUndo = true); +DVAPI void addPage(TPaletteHandle *paletteHandle, std::wstring name = L"", bool withUndo = true); DVAPI void destroyPage(TPaletteHandle *paletteHandle, int pageIndex); diff --git a/toonz/sources/include/toonz/plasticdeformerfx.h b/toonz/sources/include/toonz/plasticdeformerfx.h index ddaa966..ad98843 100644 --- a/toonz/sources/include/toonz/plasticdeformerfx.h +++ b/toonz/sources/include/toonz/plasticdeformerfx.h @@ -42,13 +42,13 @@ public: bool canHandle(const TRenderSettings &info, double frame); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; bool doGetBBox(double frame, TRectD &bbox, const TRenderSettings &info); void doCompute(TTile &tile, double frame, const TRenderSettings &info); void doDryCompute(TRectD &rect, double frame, const TRenderSettings &info); - string getPluginId() const { return string(); } + std::string getPluginId() const { return std::string(); } private: void buildRenderSettings(double, TRenderSettings &); diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h index 045d1df..e134fcb 100644 --- a/toonz/sources/include/toonz/preferences.h +++ b/toonz/sources/include/toonz/preferences.h @@ -132,10 +132,10 @@ public: QString getStyleSheet(int index) const; int getStyleSheetCount() const; - void setUnits(string s); + void setUnits(std::string s); QString getUnits() const { return m_units; } - void setCameraUnits(string s); + void setCameraUnits(std::string s); QString getCameraUnits() const { return m_cameraUnits; } void enableGeneratedMovieView(bool on); @@ -266,7 +266,7 @@ public: // Drawing tab - void setScanLevelType(string s); + void setScanLevelType(std::string s); QString getScanLevelType() const { return m_scanLevelType; } void setDefLevelType(int levelType); diff --git a/toonz/sources/include/toonz/rasterbrush.h b/toonz/sources/include/toonz/rasterbrush.h index 4a7e46c..26214c0 100644 --- a/toonz/sources/include/toonz/rasterbrush.h +++ b/toonz/sources/include/toonz/rasterbrush.h @@ -24,7 +24,7 @@ continuita' dello stroke percio' il vettore "points" dovra' gia' contenerli. DVAPI void rasterBrush( const TRasterCM32P &raster, - const vector &points, + const std::vector &points, int styleId, bool doAntialias); #endif diff --git a/toonz/sources/include/toonz/rasterstrokegenerator.h b/toonz/sources/include/toonz/rasterstrokegenerator.h index feef2cd..4ceaa20 100644 --- a/toonz/sources/include/toonz/rasterstrokegenerator.h +++ b/toonz/sources/include/toonz/rasterstrokegenerator.h @@ -31,10 +31,10 @@ enum ColorType { class DVAPI RasterStrokeGenerator { - typedef vector::iterator Iterator; + typedef std::vector::iterator Iterator; TRasterCM32P m_raster; //L'immagine raster sulla quale dobbiamo disegnare lo stroke - vector m_points; //Il vettore di punti che rappresentano la spina dorsale dello stroke + std::vector m_points; //Il vettore di punti che rappresentano la spina dorsale dello stroke int m_styleId; //L'ink-style dello stroke bool m_selective; TRect m_boxOfRaster; //Un rettangolo della stessa dimensione di "m_raster" @@ -46,7 +46,7 @@ class DVAPI RasterStrokeGenerator bool m_doAnArc; //Ricalcola i punti in un nuovo sistema di riferimento - void translatePoints(vector &points, const TPoint &newOrigin) const; + void translatePoints(std::vector &points, const TPoint &newOrigin) const; //Effettua la over. void placeOver(const TRasterCM32P &out, const TRasterCM32P &in, const TPoint &p) const; @@ -67,11 +67,11 @@ public: void generateStroke(bool isPencil) const; //Ritorna m_points - vector getPointsSequence() { return m_points; } - void setPointsSequence(const vector &points) { m_points = points; } + std::vector getPointsSequence() { return m_points; } + void setPointsSequence(const std::vector &points) { m_points = points; } //Ritorna il rettangolo contenente i dischi generati con centri in "points" e raggio "points.thick" +2 pixel a bordo - TRect getBBox(const vector &points) const; + TRect getBBox(const std::vector &points) const; TRect getLastRect() const; diff --git a/toonz/sources/include/toonz/sceneproperties.h b/toonz/sources/include/toonz/sceneproperties.h index 10bf22d..eed8fe6 100644 --- a/toonz/sources/include/toonz/sceneproperties.h +++ b/toonz/sources/include/toonz/sceneproperties.h @@ -48,7 +48,7 @@ class CaptureParameters; class DVAPI TSceneProperties { public: - typedef vector Guides; + typedef std::vector Guides; private: Guides m_hGuides, m_vGuides; diff --git a/toonz/sources/include/toonz/sceneresources.h b/toonz/sources/include/toonz/sceneresources.h index aed0fb4..ecbedd1 100644 --- a/toonz/sources/include/toonz/sceneresources.h +++ b/toonz/sources/include/toonz/sceneresources.h @@ -335,8 +335,8 @@ public: bool aborted() const { return m_importStrategy.aborted(); } - static string extractPsdSuffix(TFilePath &path); - static TFilePath buildPsd(const TFilePath &path, const string &suffix); + static std::string extractPsdSuffix(TFilePath &path); + static TFilePath buildPsd(const TFilePath &path, const std::string &suffix); private: ToonzScene *m_scene; diff --git a/toonz/sources/include/toonz/screensavermaker.h b/toonz/sources/include/toonz/screensavermaker.h index 07c8e6e..4c8be6d 100644 --- a/toonz/sources/include/toonz/screensavermaker.h +++ b/toonz/sources/include/toonz/screensavermaker.h @@ -18,7 +18,7 @@ void DVAPI makeScreenSaver( TFilePath scr, TFilePath swf, - string screenSaverName); + std::string screenSaverName); void DVAPI previewScreenSaver( TFilePath scr); diff --git a/toonz/sources/include/toonz/stagevisitor.h b/toonz/sources/include/toonz/stagevisitor.h index 06ebf94..3014dd5 100644 --- a/toonz/sources/include/toonz/stagevisitor.h +++ b/toonz/sources/include/toonz/stagevisitor.h @@ -255,7 +255,7 @@ public: class DVAPI Picker : public Visitor { - vector m_columnIndexes, m_rows; + std::vector m_columnIndexes, m_rows; TPointD m_point; TAffine m_viewAff; double m_minDist2; @@ -272,7 +272,7 @@ public: void disableMask(); int getColumnIndex() const; - void getColumnIndexes(vector &indexes) const; + void getColumnIndexes(std::vector &indexes) const; int getRow() const; }; diff --git a/toonz/sources/include/toonz/studiopalette.h b/toonz/sources/include/toonz/studiopalette.h index 3271987..67b7f64 100644 --- a/toonz/sources/include/toonz/studiopalette.h +++ b/toonz/sources/include/toonz/studiopalette.h @@ -58,12 +58,12 @@ public: // ritorna il nome del folder creato TFilePath createFolder(const TFilePath &parentFolderPath); - void createFolder(const TFilePath &parentFolderPath, wstring name); + void createFolder(const TFilePath &parentFolderPath, std::wstring name); // ritorna il nome della palette creata; // se paletteName != "" prova ad assegnare quel nome. Se esiste gia' // aggiunge un suffisso - TFilePath createPalette(const TFilePath &folderPath, string paletteName = ""); + TFilePath createPalette(const TFilePath &folderPath, std::string paletteName = ""); // DOESN'T get ownership void setPalette(const TFilePath &palettePath, const TPalette *palette, bool notifyPaletteChanged); @@ -85,10 +85,10 @@ public: bool updateLinkedColors(TPalette *palette); void setStylesGlobalNames(TPalette *palette); - TFilePath getPalettePath(wstring paletteId); - TPalette *getPalette(wstring paletteId); + TFilePath getPalettePath(std::wstring paletteId); + TPalette *getPalette(std::wstring paletteId); - TColorStyle *getStyle(wstring styleId); + TColorStyle *getStyle(std::wstring styleId); // se lo stile ha un nome globale restituisce il nome della studio palette e l'indice // dello stile linkato @@ -111,7 +111,7 @@ public: private: StudioPalette(); TFilePath m_root; - std::map m_table; + std::map m_table; std::vector m_listeners; TPalette *load(const TFilePath &path); diff --git a/toonz/sources/include/toonz/studiopalettecmd.h b/toonz/sources/include/toonz/studiopalettecmd.h index 63e5006..8c7f6c9 100644 --- a/toonz/sources/include/toonz/studiopalettecmd.h +++ b/toonz/sources/include/toonz/studiopalettecmd.h @@ -45,7 +45,7 @@ DVAPI void updateAllLinkedStyles(TPaletteHandle *paletteHandle, DVAPI void deletePalette(const TFilePath &fp); DVAPI void movePalette(const TFilePath &dstPath, const TFilePath &srcPath); DVAPI TFilePath createPalette(const TFilePath &folderPath, - string paletteName, + std::string paletteName, const TPalette *palette); DVAPI TFilePath addFolder(const TFilePath &parentFolderPath); diff --git a/toonz/sources/include/toonz/stylemanager.h b/toonz/sources/include/toonz/stylemanager.h index f6d97bd..931d14f 100644 --- a/toonz/sources/include/toonz/stylemanager.h +++ b/toonz/sources/include/toonz/stylemanager.h @@ -38,7 +38,7 @@ class DVAPI CustomStyleManager : public QObject public: struct DVAPI PatternData { QImage *m_image; - string m_patternName; + std::string m_patternName; bool m_isVector; PatternData() : m_image(0), m_patternName(""), m_isVector(false) {} diff --git a/toonz/sources/include/toonz/tcleanupper.h b/toonz/sources/include/toonz/tcleanupper.h index 401f98f..3f3ba21 100644 --- a/toonz/sources/include/toonz/tcleanupper.h +++ b/toonz/sources/include/toonz/tcleanupper.h @@ -33,7 +33,7 @@ class TCamera; class DVAPI CleanupPreprocessedImage { - string m_imgId; + std::string m_imgId; TDimension m_size; public: diff --git a/toonz/sources/include/toonz/tcolumnfx.h b/toonz/sources/include/toonz/tcolumnfx.h index 868cb0f..7a7a1f2 100644 --- a/toonz/sources/include/toonz/tcolumnfx.h +++ b/toonz/sources/include/toonz/tcolumnfx.h @@ -49,8 +49,8 @@ public: TColumnFx() : TRasterFx() {} virtual int getColumnIndex() const = 0; - virtual wstring getColumnName() const = 0; - virtual wstring getColumnId() const = 0; + virtual std::wstring getColumnName() const = 0; + virtual std::wstring getColumnId() const = 0; virtual TXshColumn *getXshColumn() const = 0; int getReferenceColumnIndex() const { return getColumnIndex(); } @@ -80,8 +80,8 @@ public: void setColumn(TXshLevelColumn *column); TXshLevelColumn *getColumn() const { return m_levelColumn; } - wstring getColumnName() const; - wstring getColumnId() const; + std::wstring getColumnName() const; + std::wstring getColumnId() const; int getColumnIndex() const; TXshColumn *getXshColumn() const; @@ -93,7 +93,7 @@ public: TFxTimeRegion getTimeRegion() const; bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; int getMemoryRequirement(const TRectD &rect, double frame, const TRenderSettings &info); void doDryCompute(TRectD &rect, double frame, const TRenderSettings &info); @@ -104,7 +104,7 @@ public: void loadData(TIStream &is); const TPersistDeclaration *getDeclaration() const; - string getPluginId() const; + std::string getPluginId() const; private: void getImageInfo(TImageInfo &imageInfo, TXshSimpleLevel *sl, TFrameId frameId); @@ -139,8 +139,8 @@ public: void setColumn(TXshPaletteColumn *column) { m_paletteColumn = column; } TXshPaletteColumn *getColumn() const { return m_paletteColumn; } - wstring getColumnName() const; - wstring getColumnId() const; + std::wstring getColumnName() const; + std::wstring getColumnId() const; int getColumnIndex() const; TXshColumn *getXshColumn() const; @@ -150,14 +150,14 @@ public: TFxTimeRegion getTimeRegion() const; bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; TAffine getDpiAff(int frame); void doCompute(TTile &tile, double frame, const TRenderSettings &); void compute(TFlash &flash, int frame); const TPersistDeclaration *getDeclaration() const; - string getPluginId() const; + std::string getPluginId() const; private: // not implemented @@ -184,8 +184,8 @@ public: void setColumn(TXshZeraryFxColumn *column); TXshZeraryFxColumn *getColumn() const { return m_zeraryFxColumn; } - wstring getColumnName() const; - wstring getColumnId() const; + std::wstring getColumnName() const; + std::wstring getColumnId() const; int getColumnIndex() const; TXshColumn *getXshColumn() const; @@ -193,7 +193,7 @@ public: TFxTimeRegion getTimeRegion() const; bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; void doCompute(TTile &tile, double frame, const TRenderSettings &); @@ -201,7 +201,7 @@ public: void loadData(TIStream &is); const TPersistDeclaration *getDeclaration() const; - string getPluginId() const; + std::string getPluginId() const; private: // not implemented @@ -224,13 +224,13 @@ public: bool canHandle(const TRenderSettings &info, double frame) { return false; } - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; void doCompute(TTile &tile, double frame, const TRenderSettings &); bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); const TPersistDeclaration *getDeclaration() const; - string getPluginId() const; + std::string getPluginId() const; private: friend class FxDag; @@ -259,7 +259,7 @@ public: void doCompute(TTile &tile, double frame, const TRenderSettings &); const TPersistDeclaration *getDeclaration() const; - string getPluginId() const; + std::string getPluginId() const; private: // not implemented diff --git a/toonz/sources/include/toonz/tlog.h b/toonz/sources/include/toonz/tlog.h index 3f3fc16..24c89ca 100644 --- a/toonz/sources/include/toonz/tlog.h +++ b/toonz/sources/include/toonz/tlog.h @@ -18,10 +18,10 @@ class TFilePath; namespace TSysLog { -void success(const string &msg); -void warning(const string &msg); -void error(const string &msg); -void info(const string &msg); +void success(const std::string &msg); +void warning(const std::string &msg); +void error(const std::string &msg); +void info(const std::string &msg); } //------------------------------------------------------------------------------ @@ -33,9 +33,9 @@ public: TUserLogAppend(const TFilePath &fp); ~TUserLogAppend(); - void warning(const string &msg); - void error(const string &msg); - void info(const string &msg); + void warning(const std::string &msg); + void error(const std::string &msg); + void info(const std::string &msg); private: class Imp; diff --git a/toonz/sources/include/toonz/toonzfolders.h b/toonz/sources/include/toonz/toonzfolders.h index 9ddde41..86e1fc4 100644 --- a/toonz/sources/include/toonz/toonzfolders.h +++ b/toonz/sources/include/toonz/toonzfolders.h @@ -27,7 +27,7 @@ DVAPI TFilePath getMyModuleDir(); // restituisce getMyModuleDir() + filename // o getTemplateModuleDir() + filename DVAPI TFilePath getModuleFile(TFilePath filename); -DVAPI TFilePath getModuleFile(string fn); +DVAPI TFilePath getModuleFile(std::string fn); DVAPI TFilePathSet getProjectsFolders(); DVAPI TFilePath getFirstProjectsFolder(); diff --git a/toonz/sources/include/toonz/toonzimageutils.h b/toonz/sources/include/toonz/toonzimageutils.h index f4c4ce0..6899e07 100644 --- a/toonz/sources/include/toonz/toonzimageutils.h +++ b/toonz/sources/include/toonz/toonzimageutils.h @@ -73,7 +73,7 @@ DVAPI TRect changeColorStroke(const TToonzImageP &ti, const ChangeColorStrokeSet // Se lo styleId!=-1, cancella solo se sono uguali a questo stile DVAPI TRect eraseRect(const TToonzImageP &ti, const TRectD &area, int maskId, bool onInk, bool onPaint); -DVAPI vector paste(const TToonzImageP &ti, const TTileSetCM32 *tileSet); +DVAPI std::vector paste(const TToonzImageP &ti, const TTileSetCM32 *tileSet); //DVAPI void updateRas32(const TToonzImageP &img, TRect clipRect=TRect()); //DVAPI void updateRas32(const TToonzImageP &img, const TTileSetCM32 *tileSet); @@ -82,14 +82,14 @@ const TVectorPalette *getTCheckPalette(); DVAPI TToonzImageP vectorToToonzImage(const TVectorImageP &vi, const TAffine &aff, TPalette *palette, const TPointD &outputPos, const TDimension &outputSize, - const vector *fxs = 0, + const std::vector *fxs = 0, bool transformThickness = false); DVAPI TPalette *loadTzPalette(const TFilePath &pltFile); DVAPI void getUsedStyles(std::set &styles, const TToonzImageP &ti); DVAPI void scrambleStyles(const TToonzImageP &ti, std::map styleTable); -DVAPI string premultiply(const TFilePath &levelPath); +DVAPI std::string premultiply(const TFilePath &levelPath); //DVAPI bool convertToTlv(const TFilePath& levelPathIn); DVAPI void eraseImage(const TToonzImageP &ti, const TRaster32P &image, const TPoint &pos, bool invert, bool eraseInk, bool erasePaint, bool selective, int styleId); diff --git a/toonz/sources/include/toonz/toonzscene.h b/toonz/sources/include/toonz/toonzscene.h index a52381e..f7164e7 100644 --- a/toonz/sources/include/toonz/toonzscene.h +++ b/toonz/sources/include/toonz/toonzscene.h @@ -153,7 +153,7 @@ public: Create a new level with \b type defined in \b txshleveltypes.h and \b levelName. \b wstring \b levelName force an anambiguos name. */ - TXshLevel *createNewLevel(int type, wstring levelName = L"", const TDimension &dim = TDimension(), double dpi = 0, + TXshLevel *createNewLevel(int type, std::wstring levelName = L"", const TDimension &dim = TDimension(), double dpi = 0, TFilePath fp = TFilePath()); /*! @@ -175,7 +175,7 @@ public: Return the default \b TFilePath of a \b levelType level */ - TFilePath getDefaultLevelPath(int levelType, wstring levelName = L"a") const; + TFilePath getDefaultLevelPath(int levelType, std::wstring levelName = L"a") const; /*! Code save path. Es. +drawings/seq1/scena1/a.pli -> +drawings/$savepath/a.pli @@ -197,7 +197,7 @@ public: TCamera *getCurrentPreviewCamera(); /*! - Insert in \b std::vector \b columns all sound column of scene \b scene. + Insert in \b vector \b columns all sound column of scene \b scene. */ void getSoundColumns(std::vector &columns); /*! diff --git a/toonz/sources/include/toonz/tpinnedrangeset.h b/toonz/sources/include/toonz/tpinnedrangeset.h index 5a1edfa..46b5e52 100644 --- a/toonz/sources/include/toonz/tpinnedrangeset.h +++ b/toonz/sources/include/toonz/tpinnedrangeset.h @@ -66,7 +66,7 @@ public: private: TStageObject *m_stageObject; - vector m_ranges; + std::vector m_ranges; TAffine m_placement; int getRangeIndex(int frame) const; }; diff --git a/toonz/sources/include/toonz/tproject.h b/toonz/sources/include/toonz/tproject.h index 7be64a3..eaf8ce8 100644 --- a/toonz/sources/include/toonz/tproject.h +++ b/toonz/sources/include/toonz/tproject.h @@ -24,20 +24,20 @@ class DVAPI TProject : public TSmartObject { TFilePath m_name, m_path; - std::vector m_folderNames; - std::map m_folders; - std::map m_useScenePathFlags; + std::vector m_folderNames; + std::map m_folders; + std::map m_useScenePathFlags; TSceneProperties *m_sprop; public: // default folders names - static const string Inputs; - static const string Drawings; - static const string Scenes; - static const string Extras; - static const string Outputs; - static const string Scripts; - static const string Palettes; + static const std::string Inputs; + static const std::string Drawings; + static const std::string Scenes; + static const std::string Extras; + static const std::string Outputs; + static const std::string Scripts; + static const std::string Palettes; static const TFilePath SandboxProjectName; @@ -49,17 +49,17 @@ public: TFilePath getProjectPath() const { return m_path; } TFilePath getProjectFolder() const { return m_path.getParentDir(); } - void setFolder(string name, TFilePath path); - void setFolder(string name); + void setFolder(std::string name, TFilePath path); + void setFolder(std::string name); int getFolderCount() const; - string getFolderName(int index) const; - int getFolderIndex(string folderName) const; + std::string getFolderName(int index) const; + int getFolderIndex(std::string folderName) const; bool isConstantFolder(int index) const; TFilePath getFolder(int index) const; - TFilePath getFolder(string name) const; + TFilePath getFolder(std::string name) const; TFilePath getScenesPath() const; @@ -74,14 +74,14 @@ public: } //????????????????????????????????????????????? - void setUseScenePath(string folderName, bool on); + void setUseScenePath(std::string folderName, bool on); //????????????????????????????????????????????? - bool getUseScenePath(string folderName) const; + bool getUseScenePath(std::string folderName) const; // nei due metodi seguenti fp e' un path assoluto (possibilmente con $scenepath) //???????????????????????????????????????????????? int getFolderIndexFromPath(const TFilePath &fp); - wstring getFolderNameFromPath(const TFilePath &fp); + std::wstring getFolderNameFromPath(const TFilePath &fp); bool save(const TFilePath &projectPath); bool save(); @@ -153,7 +153,7 @@ public: TFilePath getProjectPathByName(const TFilePath &projectName); TProjectP loadSceneProject(const TFilePath &scenePath); - void getFolderNames(std::vector &names); + void getFolderNames(std::vector &names); void addListener(Listener *listener); void removeListener(Listener *listener); diff --git a/toonz/sources/include/toonz/trasterimageutils.h b/toonz/sources/include/toonz/trasterimageutils.h index 801aca5..4998324 100644 --- a/toonz/sources/include/toonz/trasterimageutils.h +++ b/toonz/sources/include/toonz/trasterimageutils.h @@ -33,13 +33,13 @@ DVAPI TRectD convertRasterToWorld(const TRect &area, const TRasterImageP ri); DVAPI TRasterImageP vectorToFullColorImage(const TVectorImageP &vi, const TAffine &aff, TPalette *palette, const TPointD &outputPos, const TDimension &outputSize, - const vector *fxs = 0, + const std::vector *fxs = 0, bool transformThickness = false); DVAPI TRect eraseRect(const TRasterImageP &ri, const TRectD &area); -DVAPI vector paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet); +DVAPI std::vector paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet); DVAPI void addSceneNumbering(const TRasterImageP &ri, int globalIndex, - const wstring &sceneName, int sceneIndex); -DVAPI void addGlobalNumbering(const TRasterImageP &ri, const wstring &sceneName, int globalIndex); + const std::wstring &sceneName, int sceneIndex); +DVAPI void addGlobalNumbering(const TRasterImageP &ri, const std::wstring &sceneName, int globalIndex); } //namespace -#endif; //TRASTERIMAGE_UTILS_INCLUDED +#endif //TRASTERIMAGE_UTILS_INCLUDED diff --git a/toonz/sources/include/toonz/tstageobject.h b/toonz/sources/include/toonz/tstageobject.h index 12177fc..4de4ffb 100644 --- a/toonz/sources/include/toonz/tstageobject.h +++ b/toonz/sources/include/toonz/tstageobject.h @@ -137,7 +137,7 @@ public: Define a map of int and keyframe necessary to know object keyframe; Its purpose is the indexing of the object's keyframes. */ - typedef map KeyframeMap; + typedef std::map KeyframeMap; public: /*! Initializes a stage object in his \e tree with an unique id. @@ -164,7 +164,7 @@ public: std::string getName() const; //! Returns the id's full name, ie the name of the object with its id appended. - string getFullName() const; + std::string getFullName() const; //! Returns whether this object is already in use. bool isOpened() const { return m_isOpened; } @@ -359,7 +359,7 @@ public: //! Returns whether the object has children. bool hasChildren() const { return !m_children.empty(); } - const list &getChildren() const { return m_children; } + const std::list &getChildren() const { return m_children; } /*! Returns \e true if the objects cycle is enabled, @@ -439,9 +439,9 @@ public: bool isGrouped(); bool isContainedInGroup(int groupId); - void setGroupName(const wstring &name, int position = -1); - wstring getGroupName(bool fromEditor); - QStack getGroupNameStack(); + void setGroupName(const std::wstring &name, int position = -1); + std::wstring getGroupName(bool fromEditor); + QStack getGroupNameStack(); int removeGroupName(bool fromEditor); void removeGroupName(int position = -1); @@ -451,7 +451,7 @@ public: bool isGroupEditing(); void closeEditingGroup(int groupId); int getEditingGroupId(); - wstring getEditingGroupName(); + std::wstring getEditingGroupName(); void updateKeyframes(); //!< Rebuilds the internal keyframes table. @@ -474,7 +474,7 @@ private: TStageObjectId m_id; TStageObjectTree *m_tree; TStageObject *m_parent; - list m_children; + std::list m_children; bool m_cycleEnabled; @@ -510,13 +510,13 @@ private: double m_noScaleZ; - string m_name; + std::string m_name; TPointD m_dagNodePos; bool m_isOpened; - string m_handle, m_parentHandle; + std::string m_handle, m_parentHandle; TCamera *m_camera; QStack m_groupId; - QStack m_groupName; + QStack m_groupName; int m_groupSelector; bool m_locked; @@ -526,7 +526,7 @@ private: TStageObject(const TStageObject &); TStageObject &operator=(const TStageObject &); - TPointD getHandlePos(string handle, int row) const; + TPointD getHandlePos(std::string handle, int row) const; TAffine computeLocalPlacement(double frame); TStageObject *findRoot(double frame) const; TStageObject *getPinnedDescendant(int frame); @@ -569,12 +569,12 @@ class DVAPI TStageObjectParams { public: TStageObjectId m_id, m_parentId; - vector m_children; + std::vector m_children; std::map m_keyframes; bool m_cycleEnabled, m_isOpened; TStageObjectSpline *m_spline; TStageObject::Status m_status; - string m_handle, m_parentHandle; + std::string m_handle, m_parentHandle; TPinnedRangeSet *m_pinnedRangeSet; TDoubleParamP m_x, m_y, @@ -591,7 +591,7 @@ public: double m_noScaleZ; TPointD m_center, m_offset; - string m_name; + std::string m_name; TStageObjectParams(); TStageObjectParams(TStageObjectParams *data); diff --git a/toonz/sources/include/toonz/tstageobjectcmd.h b/toonz/sources/include/toonz/tstageobjectcmd.h index b6052c3..718bbf6 100644 --- a/toonz/sources/include/toonz/tstageobjectcmd.h +++ b/toonz/sources/include/toonz/tstageobjectcmd.h @@ -28,15 +28,15 @@ class TStageObject; namespace TStageObjectCmd { -DVAPI void rename(const TStageObjectId &id, string name, TXsheetHandle *xshHandle); +DVAPI void rename(const TStageObjectId &id, std::string name, TXsheetHandle *xshHandle); DVAPI void resetOffset(const TStageObjectId &id, TXsheetHandle *xshHandle); DVAPI void resetCenterAndOffset(const TStageObjectId &id, TXsheetHandle *xshHandle); DVAPI void resetPosition(const TStageObjectId &id, TXsheetHandle *xshHandle); -DVAPI void setHandle(const TStageObjectId &id, string handle, TXsheetHandle *xshHandle); -DVAPI void setParentHandle(const std::vector &ids, string handle, TXsheetHandle *xshHandle); +DVAPI void setHandle(const TStageObjectId &id, std::string handle, TXsheetHandle *xshHandle); +DVAPI void setParentHandle(const std::vector &ids, std::string handle, TXsheetHandle *xshHandle); DVAPI void setParent(const TStageObjectId &id, TStageObjectId parentId, - string parentHandle, + std::string parentHandle, TXsheetHandle *xshHandle, bool doUndo = true); DVAPI void setSplineParent(TStageObjectSpline *spline, TStageObject *parentObj, TXsheetHandle *xshHandle); @@ -52,7 +52,7 @@ DVAPI void deleteSelection(const std::vector &objIds, TFxHandle *fxHandle, bool doUndo = true); DVAPI void group(const QList ids, TXsheetHandle *xshHandle); DVAPI void ungroup(int groupId, TXsheetHandle *xshHandle); -DVAPI void renameGroup(const QList objs, const wstring &name, bool fromEditor, TXsheetHandle *xshHandle); +DVAPI void renameGroup(const QList objs, const std::wstring &name, bool fromEditor, TXsheetHandle *xshHandle); DVAPI void duplicateObject(const QList ids, TXsheetHandle *xshHandle); DVAPI void enableSplineAim(TStageObject *obj, int state, TXsheetHandle *xshHandle); DVAPI void enableSplineUppk(TStageObject *obj, bool toggled, TXsheetHandle *xshHandle); diff --git a/toonz/sources/include/toonz/tstageobjectid.h b/toonz/sources/include/toonz/tstageobjectid.h index 42708aa..2a78358 100644 --- a/toonz/sources/include/toonz/tstageobjectid.h +++ b/toonz/sources/include/toonz/tstageobjectid.h @@ -116,13 +116,13 @@ public: //----------------------------------------------------------------------------- -ostream &operator<<(ostream &out, const TStageObjectId &id); +std::ostream &operator<<(std::ostream &out, const TStageObjectId &id); //----------------------------------------------------------------------------- /*! Return a \b TStageObjectId from \b string \b s. */ -TStageObjectId toStageObjectId(string s); +TStageObjectId toStageObjectId(std::string s); #endif diff --git a/toonz/sources/include/toonz/tstageobjectspline.h b/toonz/sources/include/toonz/tstageobjectspline.h index 345798d..a919a83 100644 --- a/toonz/sources/include/toonz/tstageobjectspline.h +++ b/toonz/sources/include/toonz/tstageobjectspline.h @@ -41,8 +41,8 @@ class DVAPI TStageObjectSpline : public TSmartObject, public TPersist TPointD m_dagNodePos; int m_id; - string m_idBase; - string m_name; + std::string m_idBase; + std::string m_name; bool m_isOpened; std::vector m_posPathParams; @@ -68,8 +68,8 @@ public: int getId() const; void setId(int id); - string getName() const; - void setName(const string &name) { m_name = name; } + std::string getName() const; + void setName(const std::string &name) { m_name = name; } bool isOpened() const { return m_isOpened; } void setIsOpened(bool value) { m_isOpened = value; } @@ -77,7 +77,7 @@ public: void loadData(TIStream &is); void saveData(TOStream &os); - string getIconId(); + std::string getIconId(); //! add the PosPath param if you want to update keyframes values //! when the stroke changes. addParam() calls param->addRef() diff --git a/toonz/sources/include/toonz/tstageobjecttree.h b/toonz/sources/include/toonz/tstageobjecttree.h index 575e0a2..352cef3 100644 --- a/toonz/sources/include/toonz/tstageobjecttree.h +++ b/toonz/sources/include/toonz/tstageobjecttree.h @@ -168,7 +168,7 @@ public: If an Handle Manager has not been implemented this method returns a point of coordinates (0,0). \sa setHandleManager(). */ - TPointD getHandlePos(const TStageObjectId &id, string handle, int row) const; + TPointD getHandlePos(const TStageObjectId &id, std::string handle, int row) const; /*! Returns the number of the spline's objects in the tree. */ diff --git a/toonz/sources/include/toonz/ttileset.h b/toonz/sources/include/toonz/ttileset.h index fc675ea..ab6bdfd 100644 --- a/toonz/sources/include/toonz/ttileset.h +++ b/toonz/sources/include/toonz/ttileset.h @@ -66,7 +66,7 @@ public: // Nota: clona il raster! virtual void add(const TRasterP &ras, TRect rect) = 0; - void getRects(vector &rects) const; + void getRects(std::vector &rects) const; TRect getBBox() const; int getTileCount() const { return (int)m_tiles.size(); } diff --git a/toonz/sources/include/toonz/txshchildlevel.h b/toonz/sources/include/toonz/txshchildlevel.h index 846db0e..8797f82 100644 --- a/toonz/sources/include/toonz/txshchildlevel.h +++ b/toonz/sources/include/toonz/txshchildlevel.h @@ -38,14 +38,14 @@ class DVAPI TXshChildLevel : public TXshLevel PERSIST_DECLARATION(TXshChildLevel) TXsheet *m_xsheet; - string m_iconId; + std::string m_iconId; DECLARE_CLASS_CODE public: /*! Constructs a TXshChildLevel with \b TXshLevel name \b name */ - TXshChildLevel(wstring name = L""); + TXshChildLevel(std::wstring name = L""); /*! Destroys the TXshChildLevel object. diff --git a/toonz/sources/include/toonz/txshcolumn.h b/toonz/sources/include/toonz/txshcolumn.h index 29f4a95..e22a901 100644 --- a/toonz/sources/include/toonz/txshcolumn.h +++ b/toonz/sources/include/toonz/txshcolumn.h @@ -259,7 +259,7 @@ typedef TSmartPointerT TXshColumnP; class DVAPI TXshCellColumn : public TXshColumn { protected: - vector m_cells; + std::vector m_cells; int m_first; public: diff --git a/toonz/sources/include/toonz/txsheet.h b/toonz/sources/include/toonz/txsheet.h index 9e2104f..268547f 100644 --- a/toonz/sources/include/toonz/txsheet.h +++ b/toonz/sources/include/toonz/txsheet.h @@ -285,7 +285,7 @@ public: \n This method inserts in \b \e forUndo vector all the inserted cells, it is useful for the undo process. */ bool incrementCells(int r0, int c0, int r1, int c1, - vector> &forUndo); + std::vector> &forUndo); /*! A copy of cells, contained in rect delimited by first row \b \e r0, last row \b \e r1 and first column \b \e c0, is made in row cells from \b r1+1 to \b \e upTo. The duplicated cells will be inserted by shifting the other down. diff --git a/toonz/sources/include/toonz/txshlevel.h b/toonz/sources/include/toonz/txshlevel.h index 7ac5b88..88afce6 100644 --- a/toonz/sources/include/toonz/txshlevel.h +++ b/toonz/sources/include/toonz/txshlevel.h @@ -50,8 +50,8 @@ class DVAPI TXshLevel : public QObject, public TSmartObject, public TPersist { Q_OBJECT protected: - wstring m_name; - wstring m_shortName; + std::wstring m_name; + std::wstring m_shortName; /*! Identify level types defined in \b txshleveltypes.h @@ -67,14 +67,14 @@ public: /*! Constructs a TXshLevel with \b TXshLevel name \b name */ - TXshLevel(ClassCode classCode, wstring name); + TXshLevel(ClassCode classCode, std::wstring name); /*! Destroys the TXshLevel object. */ virtual ~TXshLevel(); - void setName(wstring name); + void setName(std::wstring name); //! return the level type (types are defined in \b txshleveltypes.h); \sa setType() int getType() const { return m_type; } @@ -109,10 +109,10 @@ public: virtual TXshSoundTextLevel *getSoundTextLevel() { return 0; } //! Return level name. \sa getShortName() - wstring getName() const { return m_name; } + std::wstring getName() const { return m_name; } //! Return level short name. \sa getName() - wstring getShortName() const { return m_shortName; } + std::wstring getShortName() const { return m_shortName; } //! Return the file path associated with the level virtual TFilePath getPath() const { return TFilePath(); } diff --git a/toonz/sources/include/toonz/txshlevelcolumn.h b/toonz/sources/include/toonz/txshlevelcolumn.h index fb2be48..b0ac8d8 100644 --- a/toonz/sources/include/toonz/txshlevelcolumn.h +++ b/toonz/sources/include/toonz/txshlevelcolumn.h @@ -34,7 +34,7 @@ class DVAPI TXshLevelColumn : public TXshCellColumn { PERSIST_DECLARATION(TXshLevelColumn) TLevelColumnFx *m_fx; - string m_iconId; + std::string m_iconId; bool m_iconVisible; diff --git a/toonz/sources/include/toonz/txshpalettelevel.h b/toonz/sources/include/toonz/txshpalettelevel.h index 494e2a0..da16971 100644 --- a/toonz/sources/include/toonz/txshpalettelevel.h +++ b/toonz/sources/include/toonz/txshpalettelevel.h @@ -46,7 +46,7 @@ public: /*! Constructs a TXshPaletteLevel with \b name */ - TXshPaletteLevel(wstring name = L""); + TXshPaletteLevel(std::wstring name = L""); /*! Destroys the TXshPaletteLevel object. diff --git a/toonz/sources/include/toonz/txshsimplelevel.h b/toonz/sources/include/toonz/txshsimplelevel.h index 253478d..421d3c3 100644 --- a/toonz/sources/include/toonz/txshsimplelevel.h +++ b/toonz/sources/include/toonz/txshsimplelevel.h @@ -51,7 +51,7 @@ class TContentHistory; /*! \brief The \p TXshLevel specialization for image levels. - \todo Substitute m_frames with a sorted std::vector or + \todo Substitute m_frames with a sorted vector or a boost flat_set. */ @@ -193,10 +193,10 @@ public: Set the range of frame that can be edited and saved. Editable range is contained in \b m_editableRange. */ - void setEditableRange(unsigned int from, unsigned int to, const wstring &userName); + void setEditableRange(unsigned int from, unsigned int to, const std::wstring &userName); void mergeTemporaryHookFile(unsigned int from, unsigned int to, const TFilePath &hookFile); void clearEditableRange(); - wstring getEditableFileName(); + std::wstring getEditableFileName(); std::set getEditableRange(); //!< Returns the set of editable frames. diff --git a/toonz/sources/include/toonz/txshsoundlevel.h b/toonz/sources/include/toonz/txshsoundlevel.h index 9f4608c..c990792 100644 --- a/toonz/sources/include/toonz/txshsoundlevel.h +++ b/toonz/sources/include/toonz/txshsoundlevel.h @@ -34,13 +34,13 @@ class DVAPI TXshSoundLevel : public TXshLevel /*!Integer is horizontal value of row pixel. DoublePair is computed according to frameRate, frameCount and soundtrack pressure.*/ - map m_values; + std::map m_values; TFilePath m_path; DECLARE_CLASS_CODE public: - TXshSoundLevel(wstring name = L"", int startOffset = 0, int endOffset = 0); + TXshSoundLevel(std::wstring name = L"", int startOffset = 0, int endOffset = 0); ~TXshSoundLevel(); TXshSoundLevel *clone() const; diff --git a/toonz/sources/include/toonz/txshsoundtextlevel.h b/toonz/sources/include/toonz/txshsoundtextlevel.h index 17be83b..96c398e 100644 --- a/toonz/sources/include/toonz/txshsoundtextlevel.h +++ b/toonz/sources/include/toonz/txshsoundtextlevel.h @@ -32,7 +32,7 @@ class DVAPI TXshSoundTextLevel : public TXshLevel QList m_framesText; public: - TXshSoundTextLevel(wstring name = L""); + TXshSoundTextLevel(std::wstring name = L""); ~TXshSoundTextLevel(); TXshSoundTextLevel *clone() const; diff --git a/toonz/sources/include/toonzqt/addfxcontextmenu.h b/toonz/sources/include/toonzqt/addfxcontextmenu.h index 4a189a8..15d3c13 100644 --- a/toonz/sources/include/toonzqt/addfxcontextmenu.h +++ b/toonz/sources/include/toonzqt/addfxcontextmenu.h @@ -62,7 +62,7 @@ private: void loadFxs(); void loadFxGroup(TIStream *is); void loadFx(TIStream *is, QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup); - bool loadPreset(const string &name, QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup); + bool loadPreset(const std::string &name, QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup); void loadMacro(); void loadFxPluginGroup(); void loadFxPlugins(QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup); @@ -78,4 +78,4 @@ public slots: void fixup(); }; -#endif; // ADDFXCONTEXTMENU_H +#endif // ADDFXCONTEXTMENU_H diff --git a/toonz/sources/include/toonzqt/doublefield.h b/toonz/sources/include/toonzqt/doublefield.h index 8dbc81d..bca0a1f 100644 --- a/toonz/sources/include/toonzqt/doublefield.h +++ b/toonz/sources/include/toonzqt/doublefield.h @@ -217,7 +217,7 @@ public: void setRange(double minValue, double maxValue); void getRange(double &minValue, double &maxValue); - void setMeasure(string measureName); + void setMeasure(std::string measureName); void setDecimals(int decimals); int getDecimals(); @@ -251,7 +251,7 @@ public: MeasuredDoubleField(QWidget *parent = 0, bool isRollerHide = true); ~MeasuredDoubleField() {} - void setMeasure(string measureName); + void setMeasure(std::string measureName); void setDecimals(int decimals); }; diff --git a/toonz/sources/include/toonzqt/doublepairfield.h b/toonz/sources/include/toonzqt/doublepairfield.h index a4372fd..a0e4ad7 100644 --- a/toonz/sources/include/toonzqt/doublepairfield.h +++ b/toonz/sources/include/toonzqt/doublepairfield.h @@ -203,7 +203,7 @@ public: MeasuredDoublePairField(QWidget *parent = 0, bool isMaxRangeLimited = true); ~MeasuredDoublePairField() {} - void setMeasure(string measureName); + void setMeasure(std::string measureName); void setPrecision(int precision); }; diff --git a/toonz/sources/include/toonzqt/expressionfield.h b/toonz/sources/include/toonzqt/expressionfield.h index 38a4a47..4f9b2ad 100644 --- a/toonz/sources/include/toonzqt/expressionfield.h +++ b/toonz/sources/include/toonzqt/expressionfield.h @@ -53,8 +53,8 @@ public: ExpressionField(QWidget *parent = 0); ~ExpressionField(); - void setExpression(string expression); - string getExpression() const; + void setExpression(std::string expression); + std::string getExpression() const; void setGrammar(const TSyntax::Grammar *grammar); const TSyntax::Grammar *getGrammar() const { return m_grammar; } diff --git a/toonz/sources/include/toonzqt/functionpanel.h b/toonz/sources/include/toonzqt/functionpanel.h index 73d94c5..7c69e06 100644 --- a/toonz/sources/include/toonzqt/functionpanel.h +++ b/toonz/sources/include/toonzqt/functionpanel.h @@ -103,7 +103,7 @@ private: struct { QPoint curvePos, labelPos; - string text; + std::string text; TDoubleParam *curve; } m_curveLabel; diff --git a/toonz/sources/include/toonzqt/functiontreeviewer.h b/toonz/sources/include/toonzqt/functiontreeviewer.h index 5848c6c..1813331 100644 --- a/toonz/sources/include/toonzqt/functiontreeviewer.h +++ b/toonz/sources/include/toonzqt/functiontreeviewer.h @@ -131,13 +131,13 @@ public: { protected: TParamP m_param; //!< The wrapped parameter. - wstring m_fxId; //!< Fx identifier for m_param's owner, if any. + std::wstring m_fxId; //!< Fx identifier for m_param's owner, if any. public: - ParamWrapper(const TParamP ¶m, const wstring &fxId) : m_param(param), m_fxId(fxId) {} + ParamWrapper(const TParamP ¶m, const std::wstring &fxId) : m_param(param), m_fxId(fxId) {} virtual ~ParamWrapper() {} - const wstring &getFxId() const { return m_fxId; } + const std::wstring &getFxId() const { return m_fxId; } TParamP getParam() const { return m_param; } virtual void setParam(const TParamP ¶m) { m_param = param; } @@ -151,13 +151,13 @@ public: FunctionTreeModel *m_model; //!< (\p not \p owned) Reference to the model ChannelGroup *m_group; //!< (\p not \p owned) Reference to the enclosing group - string m_paramNamePref; + std::string m_paramNamePref; bool m_isActive; //!< Whether the channels is active, ie visible //!< as a curve and numeric column public: Channel(FunctionTreeModel *model, TDoubleParam *param, - string paramNamePrefix = "", wstring fxId = L""); + std::string paramNamePrefix = "", std::wstring fxId = L""); ~Channel(); TDoubleParam *getParam() const { return (TDoubleParam *)m_param.getPointer(); } diff --git a/toonz/sources/include/toonzqt/functionviewer.h b/toonz/sources/include/toonzqt/functionviewer.h index 5ca5f92..88f43a0 100644 --- a/toonz/sources/include/toonzqt/functionviewer.h +++ b/toonz/sources/include/toonzqt/functionviewer.h @@ -105,7 +105,7 @@ public: signals: void curveChanged(); - void curveIo(int type, TDoubleParam *curve, const string &name); + void curveIo(int type, TDoubleParam *curve, const std::string &name); void editObject(); public slots: @@ -161,7 +161,7 @@ private: public: // :( void emitCurveChanged() { emit curveChanged(); } //!< \deprecated Should not be public. - void emitIoCurve(int type, TDoubleParam *curve, const string &name) + void emitIoCurve(int type, TDoubleParam *curve, const std::string &name) { emit curveIo(type, curve, name); } //!< \deprecated Should not be public. diff --git a/toonz/sources/include/toonzqt/fxhistogramrender.h b/toonz/sources/include/toonzqt/fxhistogramrender.h index 463c4e6..133e56d 100644 --- a/toonz/sources/include/toonzqt/fxhistogramrender.h +++ b/toonz/sources/include/toonzqt/fxhistogramrender.h @@ -69,7 +69,7 @@ private: : m_frame(-1), m_renderId((UINT)-1) {} TFxP m_fx; - string m_fxAlias; + std::string m_fxAlias; int m_frame; //! renderId given from renderer UINT m_renderId; diff --git a/toonz/sources/include/toonzqt/fxschematicnode.h b/toonz/sources/include/toonzqt/fxschematicnode.h index 5bd9e39..5647a62 100644 --- a/toonz/sources/include/toonzqt/fxschematicnode.h +++ b/toonz/sources/include/toonzqt/fxschematicnode.h @@ -123,13 +123,13 @@ class FxPainter : public QObject, public QGraphicsItem eFxType m_type; //to obtain the fx icons for zoom out view of the schematic - string m_fxType; + std::string m_fxType; QLinearGradient getGradientByLevelType(eFxType); void paint_small(QPainter *painter); public: - FxPainter(FxSchematicNode *parent, double width, double height, const QString &name, eFxType type, string fxType); + FxPainter(FxSchematicNode *parent, double width, double height, const QString &name, eFxType type, std::string fxType); ~FxPainter(); QRectF boundingRect() const; @@ -238,7 +238,7 @@ private: //!Handles hiding of existing link and showing of ghost links for snapping after creation link only for fx having //!dynamic ports. //!If \b secondIndex is -1 consider the last port in the groupedPorts of the node. - void handleSnappedLinksOnDynamicPortFx(const vector &groupedPorts, int targetIndex, int startIndex = -1); + void handleSnappedLinksOnDynamicPortFx(const std::vector &groupedPorts, int targetIndex, int startIndex = -1); void resetSnappedLinksOnDynamicPortFx(); @@ -547,7 +547,7 @@ class FxGroupNode : public FxSchematicNode public: FxGroupNode(FxSchematicScene *scene, const QList &groupedFx, const QList &roots, - int groupId, const wstring &groupName); + int groupId, const std::wstring &groupName); ~FxGroupNode(); QRectF boundingRect() const; diff --git a/toonz/sources/include/toonzqt/fxselection.h b/toonz/sources/include/toonzqt/fxselection.h index 0920a38..4544290 100644 --- a/toonz/sources/include/toonzqt/fxselection.h +++ b/toonz/sources/include/toonzqt/fxselection.h @@ -148,4 +148,4 @@ signals: void doExplodeChild(const QList &); }; -#endif; +#endif diff --git a/toonz/sources/include/toonzqt/fxsettings.h b/toonz/sources/include/toonzqt/fxsettings.h index 19ced46..30306d2 100644 --- a/toonz/sources/include/toonzqt/fxsettings.h +++ b/toonz/sources/include/toonzqt/fxsettings.h @@ -193,7 +193,7 @@ class DVAPI ParamViewer : public QFrame TFxP m_fx; QStackedWidget *m_tablePageSet; - QMap m_tableFxIndex; + QMap m_tableFxIndex; public: #if QT_VERSION >= 0x050500 diff --git a/toonz/sources/include/toonzqt/icongenerator.h b/toonz/sources/include/toonzqt/icongenerator.h index 0cfc42e..0df2274 100644 --- a/toonz/sources/include/toonzqt/icongenerator.h +++ b/toonz/sources/include/toonzqt/icongenerator.h @@ -111,7 +111,7 @@ public: QPixmap getSceneIcon(ToonzScene *scene); //Unused in Toonz void invalidateSceneIcon(); - void remap(const string &newIconId, const string &oldIconId); + void remap(const std::string &newIconId, const std::string &oldIconId); void clearRequests(); void clearSceneIcons(); diff --git a/toonz/sources/include/toonzqt/imageutils.h b/toonz/sources/include/toonzqt/imageutils.h index 08d5499..bac35e2 100644 --- a/toonz/sources/include/toonzqt/imageutils.h +++ b/toonz/sources/include/toonzqt/imageutils.h @@ -127,7 +127,7 @@ void DVAPI assignFillingInformation( void DVAPI getStrokeStyleInformationInArea( const TVectorImageP &vi, - std::vector> &strokesInfo, // pair:strokeIndex, styleIndex + std::vector> &strokesInfo, // pair:strokeIndex, styleIndex const TRectD &area); //********************************************************************************************* diff --git a/toonz/sources/include/toonzqt/paramfield.h b/toonz/sources/include/toonzqt/paramfield.h index 047e1e6..0e55178 100644 --- a/toonz/sources/include/toonzqt/paramfield.h +++ b/toonz/sources/include/toonzqt/paramfield.h @@ -119,7 +119,7 @@ private: bool m_highlighted; public: - ParamFieldKeyToggle(QWidget *parent, string name = "ParamFieldKeyToggle"); + ParamFieldKeyToggle(QWidget *parent, std::string name = "ParamFieldKeyToggle"); void setStatus(Status status); Status getStatus() const; diff --git a/toonz/sources/include/toonzqt/rasterimagedata.h b/toonz/sources/include/toonzqt/rasterimagedata.h index 02e37d1..a7bd2df 100644 --- a/toonz/sources/include/toonzqt/rasterimagedata.h +++ b/toonz/sources/include/toonzqt/rasterimagedata.h @@ -34,9 +34,9 @@ class RasterImageData : public DvMimeData { protected: double m_dpiX, m_dpiY; - vector m_rects; - vector m_strokes; - vector m_originalStrokes; + std::vector m_rects; + std::vector m_strokes; + std::vector m_originalStrokes; TAffine m_transformation; TDimension m_dim; @@ -45,11 +45,11 @@ public: ~RasterImageData(); virtual void setData(const TRasterP &copiedRaster, const TPaletteP &palette, double dpiX, double dpiY, const TDimension &dim, - const vector &rects, const vector &strokes, const vector &originalStrokes, + const std::vector &rects, const std::vector &strokes, const std::vector &originalStrokes, const TAffine &transformation) = 0; virtual void getData(TRasterP &copiedRaster, double &dpiX, double &dpiY, - vector &rects, vector &strokes, vector &originalStrokes, + std::vector &rects, std::vector &strokes, std::vector &originalStrokes, TAffine &transformation, TPalette *targetPalette) const = 0; virtual StrokesData *toStrokesData(ToonzScene *scene) const = 0; @@ -78,12 +78,12 @@ public: ~ToonzImageData(); // data <- floating ti; void setData(const TRasterP &copiedRaster, const TPaletteP &palette, double dpiX, double dpiY, const TDimension &dim, - const vector &rects, const vector &strokes, const vector &originalStrokes, + const std::vector &rects, const std::vector &strokes, const std::vector &originalStrokes, const TAffine &transformation); // floating ti <- data; void getData(TRasterP &copiedRaster, double &dpiX, double &dpiY, - vector &rects, vector &strokes, vector &originalStrokes, + std::vector &rects, std::vector &strokes, std::vector &originalStrokes, TAffine &transformation, TPalette *targetPalette) const; StrokesData *toStrokesData(ToonzScene *scene) const; @@ -109,12 +109,12 @@ public: // data <- floating ti; void setData(const TRasterP &copiedRaster, const TPaletteP &palette, double dpiX, double dpiY, const TDimension &dim, - const vector &rects, const vector &strokes, const vector &originalStrokes, + const std::vector &rects, const std::vector &strokes, const std::vector &originalStrokes, const TAffine &transformation); // floating ti <- data; void getData(TRasterP &copiedRaster, double &dpiX, double &dpiY, - vector &rects, vector &strokes, vector &originalStrokes, + std::vector &rects, std::vector &strokes, std::vector &originalStrokes, TAffine &transformation, TPalette *targetPalette) const; StrokesData *toStrokesData(ToonzScene *scene) const; diff --git a/toonz/sources/include/toonzqt/stageschematicscene.h b/toonz/sources/include/toonzqt/stageschematicscene.h index 5137cbe..4a19c71 100644 --- a/toonz/sources/include/toonzqt/stageschematicscene.h +++ b/toonz/sources/include/toonzqt/stageschematicscene.h @@ -37,7 +37,7 @@ class TreeStageNode //! The node to replace in the window StageSchematicNode *m_node; //! The childre of the node - vector m_cildren; + std::vector m_cildren; public: TreeStageNode(StageSchematicNode *node) @@ -144,7 +144,7 @@ private: //! Search nodes in the TStageObjectTree that are roots of a tree. //! Roots are placed in the container \b roots - void findRoots(vector &roots); + void findRoots(std::vector &roots); //! Build the tree starting from \b treenode. //! The tree is build recursively on each children of \b treeNode. diff --git a/toonz/sources/include/toonzqt/swatchviewer.h b/toonz/sources/include/toonzqt/swatchviewer.h index 7cd8f5e..0fa271b 100644 --- a/toonz/sources/include/toonzqt/swatchviewer.h +++ b/toonz/sources/include/toonzqt/swatchviewer.h @@ -32,12 +32,12 @@ using namespace TThread; class DVAPI BgPainter { - string m_name; + std::string m_name; public: - BgPainter(string name) : m_name(name) {} + BgPainter(std::string name) : m_name(name) {} virtual ~BgPainter() {} - string getName() const { return m_name; } + std::string getName() const { return m_name; } virtual void paint(const TRaster32P &ras) = 0; }; @@ -48,7 +48,7 @@ class DVAPI SolidColorBgPainter : public BgPainter TPixel32 m_color; public: - SolidColorBgPainter(string name, TPixel32 color) + SolidColorBgPainter(std::string name, TPixel32 color) : BgPainter(name), m_color(color) {} void paint(const TRaster32P &ras) @@ -64,7 +64,7 @@ class DVAPI CheckboardBgPainter : public BgPainter TPixel32 m_c0, m_c1; public: - CheckboardBgPainter(string name, TPixel32 c0, TPixel32 c1) + CheckboardBgPainter(std::string name, TPixel32 c0, TPixel32 c1) : BgPainter(name), m_c0(c0), m_c1(c1) {} void paint(const TRaster32P &ras) diff --git a/toonz/sources/include/toonzqt/tmessageviewer.h b/toonz/sources/include/toonzqt/tmessageviewer.h index 427ef44..d033ab2 100644 --- a/toonz/sources/include/toonzqt/tmessageviewer.h +++ b/toonz/sources/include/toonzqt/tmessageviewer.h @@ -48,7 +48,7 @@ class DVAPI TMessageViewer : public QFrame Q_OBJECT protected: - static vector m_tmsgViewers; + static std::vector m_tmsgViewers; MySortFilterProxyModel *m_proxyModel; void rowsInserted(const QModelIndex &parent, int start, int end); diff --git a/toonz/sources/include/toutputproperties.h b/toonz/sources/include/toutputproperties.h index ab53ba2..bf8f6a8 100644 --- a/toonz/sources/include/toutputproperties.h +++ b/toonz/sources/include/toutputproperties.h @@ -78,7 +78,7 @@ public: private: TFilePath m_path; - std::map m_formatProperties; //!< [\p owned] Format properties by file extension. + std::map m_formatProperties; //!< [\p owned] Format properties by file extension. TRenderSettings *m_renderSettings; @@ -194,12 +194,12 @@ public: Return \b TPropertyGroup, file format \b ext (Extension) properties. If extension there isn't is created. */ - TPropertyGroup *getFileFormatProperties(string ext); + TPropertyGroup *getFileFormatProperties(std::string ext); /*! Insert in \b v all extension in format properties of output settings. */ - void getFileFormatPropertiesExtensions(std::vector &v) const; + void getFileFormatPropertiesExtensions(std::vector &v) const; //! Sets the rendering behaviour to 'Multimedia'. void setMultimediaRendering(int mode) { m_multimediaRendering = mode; } diff --git a/toonz/sources/include/tpalette.h b/toonz/sources/include/tpalette.h index 6d506f9..d555633 100644 --- a/toonz/sources/include/tpalette.h +++ b/toonz/sources/include/tpalette.h @@ -86,16 +86,16 @@ public: friend class TPalette; private: - wstring m_name; //!< Name of the page to be displayed. + std::wstring m_name; //!< Name of the page to be displayed. int m_index; //!< Index of the page in the palette's pages collection. TPalette *m_palette; //!< (\p not \p owned) Palette the page refers to. - vector m_styleIds; //!< Palette style ids contained in the page. + std::vector m_styleIds; //!< Palette style ids contained in the page. public: - Page(wstring name); + Page(std::wstring name); - wstring getName() const { return m_name; } //!< Returns the name of the page. - void setName(wstring name) { m_name = name; } //!< Sets the name of the page. + std::wstring getName() const { return m_name; } //!< Returns the name of the page. + void setName(std::wstring name) { m_name = name; } //!< Sets the name of the page. TPalette *getPalette() const { return m_palette; } //!< Returns a pointer to the palette that contains this page. @@ -177,7 +177,7 @@ public: static TFilePath getRootDir(); std::wstring getGlobalName() const { return m_globalName; } //!< Returns the name of the palette object. - void setGlobalName(wstring name) { m_globalName = name; } //!< Assigns the name of the palette. + void setGlobalName(std::wstring name) { m_globalName = name; } //!< Assigns the name of the palette. void setDirtyFlag(bool dirtyFlag) //!< Declares the palette \a changed with respect to the last saved state. { @@ -216,7 +216,7 @@ public: /*! \return A pointer to the newly created page. */ - Page *addPage(wstring name); //!< Creates a new page with the specified name. + Page *addPage(std::wstring name); //!< Creates a new page with the specified name. void erasePage(int index); //!< Deletes the \a index-th page. void movePage(Page *page, int dstPageIndex); //!< Moves the specified page to a different page index. @@ -287,8 +287,8 @@ public: //! or \p -1 if it couldn't be found. void setShortcutValue(int key, int styleId); //!< Associates the specified key to a styleId. - void setPaletteName(wstring name) { m_paletteName = name; } //!< Sets the name of the palette. - wstring getPaletteName() const { return m_paletteName; } //!< Returns the name of the palette. + void setPaletteName(std::wstring name) { m_paletteName = name; } //!< Sets the name of the palette. + std::wstring getPaletteName() const { return m_paletteName; } //!< Returns the name of the palette. QMutex *mutex() { return &m_mutex; } //!< Returns the palette's mutex diff --git a/toonz/sources/include/tparam.h b/toonz/sources/include/tparam.h index dc34bad..975a467 100644 --- a/toonz/sources/include/tparam.h +++ b/toonz/sources/include/tparam.h @@ -29,16 +29,16 @@ class DVAPI TParam : public TSmartObject, public TPersist { DECLARE_CLASS_CODE - string m_name; - string m_description; - string m_label; + std::string m_name; + std::string m_description; + std::string m_label; public: /*! The contructor store the name of the parameter and initialize his interface with I/O through the class TPersist. */ - TParam(string name = "", string description = "", string label = "") + TParam(std::string name = "", std::string description = "", std::string label = "") : TSmartObject(m_classCode), TPersist(), m_name(name), m_description(description), m_label(label) {} @@ -46,20 +46,20 @@ public: /*! Returns the name of the parameter. */ - string getName() const { return m_name; }; + std::string getName() const { return m_name; }; /*! This method sets the name of the parameter to \e name. */ - void setName(const string &name) { m_name = name; }; + void setName(const std::string &name) { m_name = name; }; /*! Return the description. */ - string getDescription() const { return m_description; } + std::string getDescription() const { return m_description; } /*! Set the description. */ - void setDescription(const string &description) { m_description = description; } + void setDescription(const std::string &description) { m_description = description; } bool hasUILabel() const { return m_label != "" ? true : false; } void setUILabel(const std::string &l) { m_label = l; }; @@ -98,7 +98,7 @@ public: This pure virtual method must return a string with the value of the parameter and the precision needed. */ - virtual string getValueAlias(double frame, int precision) = 0; + virtual std::string getValueAlias(double frame, int precision) = 0; virtual bool isAnimatable() const = 0; /*! diff --git a/toonz/sources/include/tparamcontainer.h b/toonz/sources/include/tparamcontainer.h index 570ac68..770611c 100644 --- a/toonz/sources/include/tparamcontainer.h +++ b/toonz/sources/include/tparamcontainer.h @@ -24,16 +24,16 @@ class TParam; class DVAPI TParamVar { - string m_name; + std::string m_name; bool m_isHidden; TParamObserver *m_paramObserver; public: - TParamVar(string name, bool hidden = false) + TParamVar(std::string name, bool hidden = false) : m_name(name), m_isHidden(hidden), m_paramObserver(0) {} virtual ~TParamVar() {} virtual TParamVar *clone() const = 0; - string getName() const { return m_name; } + std::string getName() const { return m_name; } bool isHidden() const { return m_isHidden; } void setIsHidden(bool hidden) { m_isHidden = hidden; } virtual void setParam(TParam *param) = 0; @@ -47,11 +47,11 @@ class TParamVarT : public TParamVar TParamP m_var; public: - TParamVarT(string name, TParamP var, bool hidden = false) + TParamVarT(std::string name, TParamP var, bool hidden = false) : TParamVar(name, hidden), m_var(var) { } - TParamVarT(string name, T *var, bool hidden = false) + TParamVarT(std::string name, T *var, bool hidden = false) : TParamVar(name, hidden), m_var(var) { } @@ -82,8 +82,8 @@ public: bool isParamHidden(int index) const; TParam *getParam(int index) const; - string getParamName(int index) const; - TParam *getParam(string name) const; + std::string getParamName(int index) const; + TParam *getParam(std::string name) const; const TParamVar *getParamVar(int index) const; void unlink(); diff --git a/toonz/sources/include/tparamset.h b/toonz/sources/include/tparamset.h index 8b68c2a..39380ad 100644 --- a/toonz/sources/include/tparamset.h +++ b/toonz/sources/include/tparamset.h @@ -26,11 +26,11 @@ class TParamSetImp; class TParamSetChange : public TParamChange { public: - vector m_paramChanges; + std::vector m_paramChanges; public: TParamSetChange(TParam *param, double firstAffectedFrame, double lastAffectedFrame, - const vector ¶mChanges) + const std::vector ¶mChanges) : TParamChange(param, firstAffectedFrame, lastAffectedFrame, true, false, false), m_paramChanges(paramChanges) { } @@ -51,21 +51,21 @@ class DVAPI TParamSet : public TParam { PERSIST_DECLARATION(TParamSet) public: - TParamSet(string name = ""); + TParamSet(std::string name = ""); TParamSet(const TParamSet &src); ~TParamSet(); - void addParam(const TParamP ¶m, const string &name); - void insertParam(const TParamP ¶m, const string &name, int index); + void addParam(const TParamP ¶m, const std::string &name); + void insertParam(const TParamP ¶m, const std::string &name, int index); void removeParam(const TParamP ¶m); void removeAllParam(); int getParamCount() const; TParamP getParam(int index) const; - string getParamName(int index) const; - int getParamIdx(const string &name) const; + std::string getParamName(int index) const; + int getParamIdx(const std::string &name) const; - void getAnimatableParams(vector ¶ms, bool recursive = true); + void getAnimatableParams(std::vector ¶ms, bool recursive = true); void addObserver(TParamObserver *observer); void removeObserver(TParamObserver *observer); @@ -101,7 +101,7 @@ public: bool hasKeyframes() const; - string getValueAlias(double frame, int precision); + std::string getValueAlias(double frame, int precision); private: TParamSetImp *m_imp; diff --git a/toonz/sources/include/tparser.h b/toonz/sources/include/tparser.h index 4b8a093..90b2958 100644 --- a/toonz/sources/include/tparser.h +++ b/toonz/sources/include/tparser.h @@ -35,16 +35,16 @@ public: //! parse the input string and create the corresponding calculator //! (returns 0 if the text contains mistakes) - Calculator *parse(string text); + Calculator *parse(std::string text); //! return true if the last parsed string was correct bool isValid() const; //! return the last parsed string - string getText() const; + std::string getText() const; //! return the last error code (if the last parsed string was correct then returns "") - string getError() const; + std::string getError() const; //! if getError() != "" returns the position of the last parsed token //! the pair contains the indices of the first and the last characters of the token @@ -56,10 +56,10 @@ public: Error, ExtraIgnored }; - SyntaxStatus checkSyntax(std::vector &tokens, string text); + SyntaxStatus checkSyntax(std::vector &tokens, std::string text); - void getSuggestions(Grammar::Suggestions &suggestions, string text); - string getCurrentPatternString(string text); + void getSuggestions(Grammar::Suggestions &suggestions, std::string text); + std::string getCurrentPatternString(std::string text); private: // not implemented diff --git a/toonz/sources/include/tpassivecachemanager.h b/toonz/sources/include/tpassivecachemanager.h index 45e969f..58108c2 100644 --- a/toonz/sources/include/tpassivecachemanager.h +++ b/toonz/sources/include/tpassivecachemanager.h @@ -101,7 +101,7 @@ public: void forceInvalidate(); void getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData); diff --git a/toonz/sources/include/tpersist.h b/toonz/sources/include/tpersist.h index 7873917..d7855ee 100644 --- a/toonz/sources/include/tpersist.h +++ b/toonz/sources/include/tpersist.h @@ -50,7 +50,7 @@ public: Returns the string identifier of the object. For example a TXsheet object is identified by "xsheet", a TStageObjectTree is identified by PegbarTree. */ - inline string getStreamTag() const; + inline std::string getStreamTag() const; /*! This pure virtual method is used to define a global pointer to the object. @@ -74,7 +74,7 @@ public: this method creates it through TPersistDeclarationT class template. \sa getDeclaration() */ - static TPersist *create(const string &name); + static TPersist *create(const std::string &name); }; //=================================================================== @@ -85,18 +85,18 @@ public: */ class DVAPI TPersistDeclaration { - string m_id; + std::string m_id; public: - TPersistDeclaration(const string &id); + TPersistDeclaration(const std::string &id); virtual ~TPersistDeclaration() {} - string getId() const { return m_id; }; + std::string getId() const { return m_id; }; virtual TPersist *create() const = 0; }; //------------------------------------------------------------------- -inline string TPersist::getStreamTag() const { return getDeclaration()->getId(); } +inline std::string TPersist::getStreamTag() const { return getDeclaration()->getId(); } //------------------------------------------------------------------- /*! @@ -110,7 +110,7 @@ public: This is the constructor. Its argument is the id of the object. \sa TPersist::getStreamTag() */ - TPersistDeclarationT(const string &id) : TPersistDeclaration(id) {} + TPersistDeclarationT(const std::string &id) : TPersistDeclaration(id) {} /*! Returns a pointer to a newly created object of type TPersist. This template class is called by the macro PERSIST_DECLARATION(T). diff --git a/toonz/sources/include/tpluginmanager.h b/toonz/sources/include/tpluginmanager.h index e4c01f6..40aeba8 100644 --- a/toonz/sources/include/tpluginmanager.h +++ b/toonz/sources/include/tpluginmanager.h @@ -43,12 +43,12 @@ class TFilePath; class DVAPI TPluginInfo { - string m_name; + std::string m_name; public: - TPluginInfo(string name = "") : m_name(name){}; + TPluginInfo(std::string name = "") : m_name(name){}; ~TPluginInfo(){}; - string getName() const { return m_name; }; + std::string getName() const { return m_name; }; }; //----------------------------------------------------------------------------- @@ -72,7 +72,7 @@ class DVAPI TPluginManager class Plugin; - std::set m_ignoreList; + std::set m_ignoreList; typedef std::vector PluginTable; PluginTable m_pluginTable; std::set m_loadedPlugins; @@ -84,15 +84,15 @@ public: static TPluginManager *instance(); // the name should be ignored? (name only; case insensitive. e.g. "tnzimage") - bool isIgnored(string name) const; + bool isIgnored(std::string name) const; // set names to ignore; clear previous list - void setIgnoredList(const std::set &lst); + void setIgnoredList(const std::set &lst); // helper method. - void setIgnored(string name) + void setIgnored(std::string name) { - std::set lst; + std::set lst; lst.insert(name); setIgnoredList(lst); } diff --git a/toonz/sources/include/tpredictivecachemanager.h b/toonz/sources/include/tpredictivecachemanager.h index bdf0a7c..d7c92b3 100644 --- a/toonz/sources/include/tpredictivecachemanager.h +++ b/toonz/sources/include/tpredictivecachemanager.h @@ -50,7 +50,7 @@ public: void setBPP(int bpp); void getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData); diff --git a/toonz/sources/include/tproperty.h b/toonz/sources/include/tproperty.h index 98cc3fb..44d3f05 100644 --- a/toonz/sources/include/tproperty.h +++ b/toonz/sources/include/tproperty.h @@ -73,7 +73,7 @@ public: { }; - TProperty(string name) + TProperty(std::string name) : m_name(name) { m_qstringName = QString::fromStdString(name); @@ -87,8 +87,8 @@ public: QString getQStringName() const { return m_qstringName; } void setQStringName(const QString &str) { m_qstringName = str; } - string getName() const { return m_name; } - virtual string getValueAsString() = 0; + std::string getName() const { return m_name; } + virtual std::string getValueAsString() = 0; virtual void accept(Visitor &v) = 0; @@ -96,13 +96,13 @@ public: void removeListener(Listener *listener); void notifyListeners() const; - string getId() const { return m_id; } - void setId(string id) { m_id = id; } + std::string getId() const { return m_id; } + void setId(std::string id) { m_id = id; } private: - string m_name; + std::string m_name; QString m_qstringName; - string m_id; + std::string m_id; std::vector m_listeners; }; @@ -116,7 +116,7 @@ public: typedef std::pair Range; TRangeProperty( - string name, + std::string name, T minValue, T maxValue, T value, bool isMaxRangeLimited = true) : TProperty(name), m_range(minValue, maxValue), m_value(minValue), m_isMaxRangeLimited(isMaxRangeLimited) @@ -147,7 +147,7 @@ public: return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString(m_value); } @@ -177,7 +177,7 @@ public: typedef std::pair Value; TDoublePairProperty( - string name, + std::string name, double minValue, double maxValue, double v0, double v1, bool isMaxRangeLimited = true) @@ -206,7 +206,7 @@ public: { return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString(m_value.first) + "," + toString(m_value.second); } @@ -228,7 +228,7 @@ public: typedef std::pair Value; TIntPairProperty( - string name, + std::string name, int minValue, int maxValue, int v0, int v1, bool isMaxRangeLimited = true) @@ -257,7 +257,7 @@ public: { return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString(m_value.first) + "," + toString(m_value.second); } @@ -274,7 +274,7 @@ private: class DVAPI TBoolProperty : public TProperty { public: - TBoolProperty(string name, bool value) + TBoolProperty(std::string name, bool value) : TProperty(name), m_value(value) { } @@ -283,7 +283,7 @@ public: void setValue(bool v) { m_value = v; } bool getValue() const { return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString(m_value); } @@ -298,23 +298,23 @@ private: class DVAPI TStringProperty : public TProperty { public: - TStringProperty(string name, wstring value) + TStringProperty(std::string name, std::wstring value) : TProperty(name), m_value(value) { } TProperty *clone() const { return new TStringProperty(*this); } - void setValue(wstring v) { m_value = v; } - wstring getValue() const { return m_value; } - string getValueAsString() + void setValue(std::wstring v) { m_value = v; } + std::wstring getValue() const { return m_value; } + std::string getValueAsString() { return toString(m_value); } void accept(Visitor &v) { v.visit(this); }; private: - wstring m_value; + std::wstring m_value; }; //--------------------------------------------------------- @@ -322,17 +322,17 @@ private: class DVAPI TStyleIndexProperty : public TProperty { public: - TStyleIndexProperty(string name, wstring value) + TStyleIndexProperty(std::string name, std::wstring value) : TProperty(name), m_value(value) { } TProperty *clone() const { return new TStyleIndexProperty(*this); } - void setValue(wstring v) { m_value = v; } - wstring getValue() const { return m_value; } + void setValue(std::wstring v) { m_value = v; } + std::wstring getValue() const { return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString(m_value); } @@ -340,7 +340,7 @@ public: void accept(Visitor &v) { v.visit(this); }; private: - wstring m_value; + std::wstring m_value; }; //------------------------------------------------------------------ @@ -348,7 +348,7 @@ private: class DVAPI TPointerProperty : public TProperty { public: - TPointerProperty(string name, void *value) + TPointerProperty(std::string name, void *value) : TProperty(name), m_value(value) { } @@ -358,7 +358,7 @@ public: void setValue(void *v) { m_value = v; } void *getValue() const { return m_value; } - string getValueAsString() + std::string getValueAsString() { return toString((unsigned long long)m_value); } @@ -374,21 +374,21 @@ private: class DVAPI TEnumProperty : public TProperty { public: - typedef std::vector Range; + typedef std::vector Range; - TEnumProperty(const string &name) + TEnumProperty(const std::string &name) : TProperty(name), m_index(-1) {} - TEnumProperty(const string &name, const Range &range, const wstring &v) + TEnumProperty(const std::string &name, const Range &range, const std::wstring &v) : TProperty(name), m_range(range), m_index(indexOf(v)) { if (m_index < 0) throw RangeError(); } - TEnumProperty(const string &name, + TEnumProperty(const std::string &name, Range::const_iterator i0, Range::const_iterator i1, - const wstring &v) + const std::wstring &v) : TProperty(name), m_range(i0, i1), m_index(indexOf(v)) { if (m_index < 0) @@ -397,19 +397,19 @@ public: TProperty *clone() const { return new TEnumProperty(*this); } - int indexOf(const wstring &value) + int indexOf(const std::wstring &value) { Range::const_iterator it = std::find(m_range.begin(), m_range.end(), value); return (it == m_range.end()) ? -1 : it - m_range.begin(); } - bool isValue(const wstring &value) + bool isValue(const std::wstring &value) { bool ret = std::find(m_range.begin(), m_range.end(), value) != m_range.end(); return ret; } - void addValue(wstring value) + void addValue(std::wstring value) { if (m_index == -1) m_index = 0; @@ -429,7 +429,7 @@ public: m_index = index; } - void setValue(const wstring &value) + void setValue(const std::wstring &value) { int idx = indexOf(value); if (idx < 0) @@ -438,8 +438,8 @@ public: } const Range &getRange() const { return m_range; } - wstring getValue() const { return (m_index < 0) ? L"" : m_range[m_index]; } - string getValueAsString() { return toString(m_range[m_index]); } + std::wstring getValue() const { return (m_index < 0) ? L"" : m_range[m_index]; } + std::string getValueAsString() { return toString(m_range[m_index]); } int getIndex() const { return m_index; } void accept(Visitor &v) { v.visit(this); } @@ -458,7 +458,7 @@ class DVAPI TPropertyGroup { public: typedef std::vector> PropertyVector; - typedef std::map PropertyTable; + typedef std::map PropertyTable; // exception class PropertyNotFoundError @@ -477,7 +477,7 @@ public: void bind(TProperty &p); //! returns 0 if the property doesn't exist - TProperty *getProperty(string name); + TProperty *getProperty(std::string name); TProperty *getProperty(int i) { return (i >= (int)m_properties.size()) ? 0 : m_properties[i].first; } void setProperties(TPropertyGroup *g); diff --git a/toonz/sources/include/trasterfx.h b/toonz/sources/include/trasterfx.h index 92778fa..a3837b1 100644 --- a/toonz/sources/include/trasterfx.h +++ b/toonz/sources/include/trasterfx.h @@ -236,7 +236,7 @@ public: // resituisce una stringa che identifica univocamente il sottoalbero // avente come radice l'effetto - virtual string getAlias(double frame, const TRenderSettings &info) const; + virtual std::string getAlias(double frame, const TRenderSettings &info) const; virtual void dryCompute(TRectD &rect, double frame, @@ -309,7 +309,7 @@ public: virtual bool checkTimeRegion() const { return false; } - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; void transform(double frame, int port, @@ -386,7 +386,7 @@ public: m_aff = aff; } bool isDpiAffine() const { return m_isDpiAffine; } - string getPluginId() const { return string(); } + std::string getPluginId() const { return std::string(); } protected: TRasterFxPort m_port; diff --git a/toonz/sources/include/trasterimage.h b/toonz/sources/include/trasterimage.h index 90bd423..f6c0835 100644 --- a/toonz/sources/include/trasterimage.h +++ b/toonz/sources/include/trasterimage.h @@ -35,7 +35,7 @@ class DVAPI TRasterImage : public TImage //! dpi value for y axis m_dpiy; //! The name of the image - string m_name; + std::string m_name; //! The savebox of the image TRect m_savebox; //double m_hPos; @@ -67,9 +67,9 @@ public: // image info //! Return the name of the image - string getName() const { return m_name; } + std::string getName() const { return m_name; } //! Set the name of the image - void setName(string name) { m_name = name; } + void setName(std::string name) { m_name = name; } //! Get the \b dpi image void getDpi(double &dpix, double &dpiy) const diff --git a/toonz/sources/include/tregion.h b/toonz/sources/include/tregion.h index 8c849b8..f9d69a5 100644 --- a/toonz/sources/include/tregion.h +++ b/toonz/sources/include/tregion.h @@ -221,7 +221,7 @@ public: void print(); //friend void addRegion(vector& regionArray, TRegion *region); - void computeScanlineIntersections(double y, vector &intersections) const; + void computeScanlineIntersections(double y, std::vector &intersections) const; int scanlineIntersectionsBefore(double x, double y, bool horiz) const; int leftScanlineIntersections(double x, double y) const diff --git a/toonz/sources/include/tregionoutline.h b/toonz/sources/include/tregionoutline.h index b54ff49..a26f4b5 100644 --- a/toonz/sources/include/tregionoutline.h +++ b/toonz/sources/include/tregionoutline.h @@ -6,8 +6,8 @@ class TRegionOutline { public: - typedef vector PointVector; - typedef vector Boundary; + typedef std::vector PointVector; + typedef std::vector Boundary; Boundary m_exterior, m_interior; bool m_doAntialiasing; diff --git a/toonz/sources/include/trop.h b/toonz/sources/include/trop.h index d02db04..fb48070 100644 --- a/toonz/sources/include/trop.h +++ b/toonz/sources/include/trop.h @@ -34,10 +34,10 @@ struct _RASTER; class DVAPI TRopException : public TException { - string message; + std::string message; public: - TRopException(const string &s) : message(s) {} + TRopException(const std::string &s) : message(s) {} ~TRopException() {} TString getMessage() const; diff --git a/toonz/sources/include/tropcm.h b/toonz/sources/include/tropcm.h index f93bccd..0532bc9 100644 --- a/toonz/sources/include/tropcm.h +++ b/toonz/sources/include/tropcm.h @@ -53,9 +53,9 @@ DVAPI void overlayCmapped(TRasterCM32P rasOut, const TRasterCM32P &rasUp, const //DVAPI void deleteMatchline(const vector& level, const vector& inkIndexes); //DVAPI void eraseInks(TRasterCM32P ras, vector& inkIds, bool keepInks=false); -DVAPI void eraseColors(TRasterCM32P ras, vector *colorIds, bool eraseInks); //colorsId==0 ->erase ALL +DVAPI void eraseColors(TRasterCM32P ras, std::vector *colorIds, bool eraseInks); //colorsId==0 ->erase ALL //DVAPI void eraseColors(TRasterCM32P ras, vector& colorIds, bool eraseInks, bool keepColor); -DVAPI void eraseStyleIds(TToonzImage *image, const vector styleIds); +DVAPI void eraseStyleIds(TToonzImage *image, const std::vector styleIds); DVAPI void resample(const TRasterP &out, const TRasterCM32P &in, diff --git a/toonz/sources/include/tscanner.h b/toonz/sources/include/tscanner.h index c8c0202..2813287 100644 --- a/toonz/sources/include/tscanner.h +++ b/toonz/sources/include/tscanner.h @@ -55,7 +55,7 @@ private: // Current scan type ScanType m_scanType; - string m_paperFormat; // e.g. "A4 paper" + std::string m_paperFormat; // e.g. "A4 paper" TRectD m_scanArea; // in mm /* TWAIN preferirebbe gli inch, ma uso i mm per seguire tnz4.x*/ TRectD m_cropBox; // in mm /* TWAIN preferirebbe gli inch, ma uso i mm per seguire tnz4.x*/ bool m_isPreview; @@ -77,11 +77,11 @@ public: private: // other useful info ?! - string m_twainVersion; - string m_manufacturer; - string m_prodFamily; - string m_productName; - string m_version; + std::string m_twainVersion; + std::string m_manufacturer; + std::string m_prodFamily; + std::string m_productName; + std::string m_version; bool m_reverseOrder; // if true then scan levels starting from last frame @@ -96,8 +96,8 @@ public: void setMaxPaperSize(double maxWidth, double maxHeight); // note: possibly update m_scanArea - string getPaperFormat() const { return m_paperFormat; } - void setPaperFormat(string paperFormat); + std::string getPaperFormat() const { return m_paperFormat; } + void setPaperFormat(std::string paperFormat); // assert(TPaperFormatManager::instance()->isValidFormat(paperFormat)); // updates scanArea (cropping with maxPaperSize) @@ -211,7 +211,7 @@ public: }; private: - typedef std::map FormatTable; + typedef std::map FormatTable; FormatTable m_formats; TPaperFormatManager(); @@ -222,13 +222,13 @@ public: static TPaperFormatManager *instance(); // resitutisce la lista dei formati - void getFormats(std::vector &names) const; + void getFormats(std::vector &names) const; - bool isValidFormat(string name) const; - string getDefaultFormat() const; + bool isValidFormat(std::string name) const; + std::string getDefaultFormat() const; // nome formato --> dimensione - TDimensionD getSize(string name) const; + TDimensionD getSize(std::string name) const; }; #endif diff --git a/toonz/sources/include/tsimplecolorstyles.h b/toonz/sources/include/tsimplecolorstyles.h index b6dd9b4..ed67f94 100644 --- a/toonz/sources/include/tsimplecolorstyles.h +++ b/toonz/sources/include/tsimplecolorstyles.h @@ -240,13 +240,13 @@ class DVAPI TRasterImagePatternStrokeStyle : public TColorStyle protected: TLevelP m_level; - string m_name; + std::string m_name; double m_space, m_rotation; public: TRasterImagePatternStrokeStyle(); - TRasterImagePatternStrokeStyle(const string &patternName); + TRasterImagePatternStrokeStyle(const std::string &patternName); bool isRegionStyle() const { return false; } bool isStrokeStyle() const { return true; } @@ -275,9 +275,9 @@ public: }; int getTagId() const { return 2000; }; - void getObsoleteTagIds(vector &ids) const; + void getObsoleteTagIds(std::vector &ids) const; - void loadLevel(const string &patternName); + void loadLevel(const std::string &patternName); static TFilePath getRootDir(); static void setRootDir(const TFilePath &path) { m_rootDir = path + "custom styles"; } @@ -312,12 +312,12 @@ class DVAPI TVectorImagePatternStrokeStyle : public TColorStyle protected: TLevelP m_level; - string m_name; + std::string m_name; double m_space, m_rotation; public: TVectorImagePatternStrokeStyle(); - TVectorImagePatternStrokeStyle(const string &patternName); + TVectorImagePatternStrokeStyle(const std::string &patternName); bool isRegionStyle() const { return false; } bool isStrokeStyle() const { return true; } @@ -346,9 +346,9 @@ public: }; int getTagId() const { return 2800; }; - void getObsoleteTagIds(vector &ids) const; + void getObsoleteTagIds(std::vector &ids) const; - void loadLevel(const string &patternName); + void loadLevel(const std::string &patternName); static TFilePath getRootDir(); static void setRootDir(const TFilePath &path) { m_rootDir = path + "custom styles"; } diff --git a/toonz/sources/include/tsound.h b/toonz/sources/include/tsound.h index 0000b0d..5bf998c 100644 --- a/toonz/sources/include/tsound.h +++ b/toonz/sources/include/tsound.h @@ -260,9 +260,9 @@ public: // un play od una registrazione }; - TSoundDeviceException(Type type, const string &msg) + TSoundDeviceException(Type type, const std::string &msg) : TException(msg), m_type(type) {} - TSoundDeviceException(Type type, const wstring &msg) + TSoundDeviceException(Type type, const std::wstring &msg) : TException(msg), m_type(type) {} Type getType() diff --git a/toonz/sources/include/tspectrumparam.h b/toonz/sources/include/tspectrumparam.h index 5627e2e..ae3a969 100644 --- a/toonz/sources/include/tspectrumparam.h +++ b/toonz/sources/include/tspectrumparam.h @@ -85,7 +85,7 @@ public: void enableMatte(bool on); bool isMatteEnabled() const; - string getValueAlias(double frame, int precision); + std::string getValueAlias(double frame, int precision); bool hasKeyframes() const; void getKeyframes(std::set &frames) const; int getNextKeyframe(double frame) const; diff --git a/toonz/sources/include/tstopwatch.h b/toonz/sources/include/tstopwatch.h index e15b4e0..a29264f 100644 --- a/toonz/sources/include/tstopwatch.h +++ b/toonz/sources/include/tstopwatch.h @@ -49,7 +49,7 @@ class DVAPI TStopWatch { - string m_name; //stopwatch name + std::string m_name; //stopwatch name TM_TOTAL m_tm; //elapsed total time (in milliseconds) TM_USER m_tmUser; //elapsed user time (time associated to the process calling stop watch)(unit=100-nanosecond) @@ -69,7 +69,7 @@ class DVAPI TStopWatch void getElapsedTime(TM_TOTAL &tm, TM_USER &user, TM_SYSTEM &system); public: - TStopWatch(string name = ""); + TStopWatch(std::string name = ""); ~TStopWatch(); void reset(); @@ -88,14 +88,14 @@ public: /*!Returns the amount of time that the process has spent executing operating system code. see getTotalTime() */ TUINT32 getSystemTime(); - const string &getName() { return m_name; }; - void setName(string name) { m_name = name; }; + const std::string &getName() { return m_name; }; + void setName(std::string name) { m_name = name; }; /*!Returns a string containing the recorded times.*/ - operator string(); + operator std::string(); /*!Print (to cout) the name and the relative total,user and system times of the stop watch. see getTotalTime()*/ - void print(ostream &out); + void print(std::ostream &out); void print(); private: @@ -115,7 +115,7 @@ public: Allows you to print the name and the relative total, user and system times of all the active stop watches. */ - static void printGlobals(ostream &out); + static void printGlobals(std::ostream &out); static void printGlobals(); }; diff --git a/toonz/sources/include/tstream.h b/toonz/sources/include/tstream.h index d4a2ee7..773070a 100644 --- a/toonz/sources/include/tstream.h +++ b/toonz/sources/include/tstream.h @@ -63,8 +63,8 @@ public: TIStream &operator>>(int &v); //!< Reads an integer from the stream TIStream &operator>>(double &v); //!< Reads a double from the stream - TIStream &operator>>(string &v); //!< Reads a string from the stream - TIStream &operator>>(wstring &v); //!< Reads a wstring from the stream + TIStream &operator>>(std::string &v); //!< Reads a string from the stream + TIStream &operator>>(std::wstring &v); //!< Reads a wstring from the stream TIStream &operator>>(TFilePath &v); //!< Reads a TFilePath from the stream TIStream &operator>>(TPixel32 &v); //!< Reads a TPixel32 from the stream TIStream &operator>>(TPixel64 &v); //!< Reads a TPixel64 from the stream @@ -85,7 +85,7 @@ public: //! \sa operator>>(TPersist&) //! \deprecated - string getString(); //!< Returns the stream content as a string, up to the next tag. + std::string getString(); //!< Returns the stream content as a string, up to the next tag. //! \deprecated bool eos(); //!< \brief Returns \e true in case of end of string (a StreamTag::EndTag @@ -95,7 +95,7 @@ public: \param tagName Output name of a matched tag. \return Whether a tag was found. */ - bool matchTag(string &tagName); //!< Attempts matching a tag and returns its name. + bool matchTag(std::string &tagName); //!< Attempts matching a tag and returns its name. //! \return Whether an end tag was found. bool matchEndTag(); //!< Attempts matching a StreamTag::EndTag. @@ -108,18 +108,18 @@ public: \param value Output value of the attribute. \return Whether the tag attribute was found. */ - bool getTagParam(string paramName, string &value); - bool getTagParam(string paramName, int &value); //!< \sa getTagParam(string, string&) + bool getTagParam(std::string paramName, std::string &value); + bool getTagParam(std::string paramName, int &value); //!< \sa getTagParam(string, string&) bool isBeginEndTag(); //!< Returns whether current tag is of type StreamTag::BeginEndTag. - bool openChild(string &tagName); //!< \deprecated Use matchTag(string&) instead. + bool openChild(std::string &tagName); //!< \deprecated Use matchTag(string&) instead. void closeChild(); //!< \deprecated Use matchEndTag() instead. bool match(char c) const; //! \deprecated - string getTagAttribute(string name) const; //!< \sa getTagParam(string, string&), - //! TOStream::openChild(string, const map&). + std::string getTagAttribute(std::string name) const; //!< \sa getTagParam(string, string&), + //! TOStream::openChild(string, const map&). TFilePath getFilePath(); //!< Returns the stream's path (i.e. the opened filename associated to the input stream). TFilePath getRepositoryPath(); //!< \deprecated @@ -196,8 +196,8 @@ public: TOStream &operator<<(int v); //!< Writes an int to the stream. TOStream &operator<<(double v); //!< Writes a double to the stream. - TOStream &operator<<(string v); //!< Writes a string to the stream. - TOStream &operator<<(wstring v); //!< Writes a wstring to the stream. + TOStream &operator<<(std::string v); //!< Writes a string to the stream. + TOStream &operator<<(std::wstring v); //!< Writes a wstring to the stream. TOStream &operator<<(const TFilePath &v); //!< Writes a TFilePath to the stream. TOStream &operator<<(const TPixel32 &v); //!< Writes a TPixel32 to the stream. TOStream &operator<<(const TPixel64 &v); //!< Writes a TPixel64 to the stream. @@ -211,14 +211,14 @@ public: //! to the reimplemented TPersist::saveData. //! \deprecated Use openChild(string) instead - TOStream child(string tagName); + TOStream child(std::string tagName); - void openChild(string tagName); //!< Writes a to the stream, opening a tag. - void openChild(string tagName, - const map &attributes); //!< \brief Writes a + void openChild(std::string tagName); //!< Writes a to the stream, opening a tag. + void openChild(std::string tagName, + const std::map &attributes); //!< \brief Writes a //! to the stream, opening a tag with embedded attributes. - void openCloseChild(string tagName, - const map &attributes); //!< \brief Writes a tag + void openCloseChild(std::string tagName, + const std::map &attributes); //!< \brief Writes a tag //! to the stream, opening a tag with embedded attributes //! which is immediately closed. diff --git a/toonz/sources/include/tstreamexception.h b/toonz/sources/include/tstreamexception.h index 9a2628b..c86c77c 100644 --- a/toonz/sources/include/tstreamexception.h +++ b/toonz/sources/include/tstreamexception.h @@ -27,8 +27,8 @@ class DVAPI TIStreamException : public TException public: TIStreamException(TIStream &is); TIStreamException(TIStream &is, const TException &e); - TIStreamException(TIStream &is, wstring message); - TIStreamException(TIStream &is, string message); + TIStreamException(TIStream &is, std::wstring message); + TIStreamException(TIStream &is, std::string message); ~TIStreamException(); }; diff --git a/toonz/sources/include/tstroke.h b/toonz/sources/include/tstroke.h index 9d739d5..1d10a3e 100644 --- a/toonz/sources/include/tstroke.h +++ b/toonz/sources/include/tstroke.h @@ -118,7 +118,7 @@ public: /*! \finds all points on stroke which are "enough" close to point p. return the number of such points. */ - int getNearChunks(const TThickPoint &p, vector &pointsOnStroke, bool checkBBox = true) const; + int getNearChunks(const TThickPoint &p, std::vector &pointsOnStroke, bool checkBBox = true) const; //! \return number of chunks in the stroke int getChunkCount() const; @@ -131,7 +131,7 @@ public: */ int getControlPointCount() const; - void getControlPoints(vector &v) const; + void getControlPoints(std::vector &v) const; /*! Return the n-th control point @@ -224,7 +224,7 @@ public: //! Reduce the number of control point according to \b maxError parameter. //! The vector corners contain the corner of the stroke. - void reduceControlPoints(double maxError, vector corners); + void reduceControlPoints(double maxError, std::vector corners); /*! Return a thickpoint at w (parameter (0<=w<=1)) @@ -327,7 +327,7 @@ public: // void deleteStyle(int); //! Only for debug - void print(ostream &os = std::cout) const; + void print(std::ostream &os = std::cout) const; //! change tangent versus in the stroke /*! @@ -363,13 +363,13 @@ public: Create a \b T3DPointD vector froma a \b TThickPoint vector. The \b T3DPointD vector is used to find a \b TCubicStroke; than find the quadratic stroke. */ - static TStroke *interpolate(const vector &points, double error, bool findCorners = true); + static TStroke *interpolate(const std::vector &points, double error, bool findCorners = true); //! Get a stroke from a \b TThickQuadratic vector /*! Take from \b curves the control points used to create the stroke */ - static TStroke *create(const vector &curves); + static TStroke *create(const std::vector &curves); int getId() const; void setId(int id); @@ -512,7 +512,7 @@ DVAPI int intersect(const TStroke &stroke, and a specialyzed function. */ DVAPI void splitStroke(const TStroke &tq, - const vector &pars, + const std::vector &pars, std::vector &v); /* !puts in corners the indexes of quadric junctions of the stroke that create angles greater @@ -537,6 +537,6 @@ DVAPI void computeQuadraticsFromCubic(const TThickPoint &p0, const TThickPoint &p2, const TThickPoint &p3, double error, - vector &chunkArray); + std::vector &chunkArray); #endif // TSTROKE_H diff --git a/toonz/sources/include/tstrokeprop.h b/toonz/sources/include/tstrokeprop.h index 435a9e6..29cf10e 100644 --- a/toonz/sources/include/tstrokeprop.h +++ b/toonz/sources/include/tstrokeprop.h @@ -53,7 +53,7 @@ class DVAPI TRasterImagePatternStrokeProp : public TStrokeProp { protected: TRasterImagePatternStrokeStyle *m_colorStyle; - vector m_transformations; + std::vector m_transformations; public: TRasterImagePatternStrokeProp(const TStroke *stroke, TRasterImagePatternStrokeStyle *style); @@ -72,7 +72,7 @@ class DVAPI TVectorImagePatternStrokeProp : public TStrokeProp { protected: TVectorImagePatternStrokeStyle *m_colorStyle; - vector m_transformations; + std::vector m_transformations; public: TVectorImagePatternStrokeProp(const TStroke *stroke, TVectorImagePatternStrokeStyle *style); diff --git a/toonz/sources/include/tstrokeutil.h b/toonz/sources/include/tstrokeutil.h index b7515fc..f6c262b 100644 --- a/toonz/sources/include/tstrokeutil.h +++ b/toonz/sources/include/tstrokeutil.h @@ -57,11 +57,11 @@ DVAPI void modifyControlPoints(TStroke &stroke, DVAPI void modifyControlPoints(TStroke &stroke, const TStrokeDeformation &deformer, - vector &controlPointLen); + std::vector &controlPointLen); DVAPI void modifyThickness(TStroke &stroke, const TStrokeDeformation &deformer, - vector &controlPointLen, + std::vector &controlPointLen, bool exponentially = false); //----------------------------------------------------------------------------- diff --git a/toonz/sources/include/tsweepboundary.h b/toonz/sources/include/tsweepboundary.h index 619323d..2fb4eb8 100644 --- a/toonz/sources/include/tsweepboundary.h +++ b/toonz/sources/include/tsweepboundary.h @@ -21,7 +21,7 @@ #define DVVAR DV_IMPORT_VAR #endif -bool DVAPI computeSweepBoundary(const vector &strokes, - vector> &outlines); +bool DVAPI computeSweepBoundary(const std::vector &strokes, + std::vector> &outlines); #endif //TSWEEPBOUNDARY_INCLUDED diff --git a/toonz/sources/include/tsystem.h b/toonz/sources/include/tsystem.h index ec888ef..8363cc1 100644 --- a/toonz/sources/include/tsystem.h +++ b/toonz/sources/include/tsystem.h @@ -30,7 +30,7 @@ #include -DVAPI ostream &operator<<(ostream &out, const QDateTime &t); +DVAPI std::ostream &operator<<(std::ostream &out, const QDateTime &t); #include class DVAPI TFileStatus @@ -71,10 +71,10 @@ class DVAPI TSystemException : public TException public: TSystemException() {} TSystemException(const TFilePath &, int); - TSystemException(const TFilePath &, const string &); - TSystemException(const TFilePath &, const wstring &); - TSystemException(const string &); - TSystemException(const wstring &msg); + TSystemException(const TFilePath &, const std::string &); + TSystemException(const TFilePath &, const std::wstring &); + TSystemException(const std::string &); + TSystemException(const std::wstring &msg); ~TSystemException() {} TString getMessage() const; }; @@ -121,7 +121,7 @@ DVAPI TFilePathSet packLevelNames(const TFilePathSet &); DVAPI TFilePath getHomeDirectory(); DVAPI TFilePath getTempDir(); -DVAPI TFilePath getTestDir(string name = "verify_tnzcore"); +DVAPI TFilePath getTestDir(std::string name = "verify_tnzcore"); DVAPI TFilePath getBinDir(); DVAPI TFilePath getDllDir(); @@ -207,14 +207,14 @@ DVAPI long getCPUExtensions(); // un po' di studio sui file memory mapped // indagare -DVAPI iostream openTemporaryFile(); +DVAPI std::iostream openTemporaryFile(); // un'altra idea e' avere un TQualcosaP che ritorna un UniqueFileName // e che sul distruttore cancella il file // pensare a: // DVAPI void setFileProtection(const TFilePath &path, ???); -void DVAPI outputDebug(string s); +void DVAPI outputDebug(std::string s); DVAPI bool isUNC(const TFilePath &fp); diff --git a/toonz/sources/include/ttest.h b/toonz/sources/include/ttest.h index 525590d..34d7653 100644 --- a/toonz/sources/include/ttest.h +++ b/toonz/sources/include/ttest.h @@ -29,7 +29,7 @@ class DVAPI TTest int m_fxInstanceCount; public: - TTest(const string &testName); + TTest(const std::string &testName); virtual ~TTest(); void setInstanceCount(); @@ -39,12 +39,12 @@ public: virtual void before() { setInstanceCount(); }; virtual void after(){}; - static void runTests(string filename); + static void runTests(std::string filename); }; //Utility -DVAPI TFilePath getTestFile(string name); +DVAPI TFilePath getTestFile(std::string name); DVAPI int areEqual(TRasterP ra, TRasterP rb, double err = 1e-8); DVAPI int areEqual(TVectorImageP va, TVectorImageP vb, double err = 1e-8); diff --git a/toonz/sources/include/ttile.h b/toonz/sources/include/ttile.h index 284742f..dc20e2c 100644 --- a/toonz/sources/include/ttile.h +++ b/toonz/sources/include/ttile.h @@ -21,7 +21,7 @@ class DVAPI TTile { private: - string m_rasterId; + std::string m_rasterId; TRect m_subRect; TTile(const TTile &); TTile &operator=(const TTile &); diff --git a/toonz/sources/include/ttimer.h b/toonz/sources/include/ttimer.h index 4aaa949..fb12b14 100644 --- a/toonz/sources/include/ttimer.h +++ b/toonz/sources/include/ttimer.h @@ -59,7 +59,7 @@ public: Creates a timer with name \p name, resolution \p timerRes and type \p type. Resolution is expressed in milliseconds. */ - TTimer(const string &name, UINT timerRes, Type type); + TTimer(const std::string &name, UINT timerRes, Type type); /*! Deletes the timer. */ @@ -81,7 +81,7 @@ public: /*! Returns the name of the timer. */ - string getName() const; + std::string getName() const; /*! Asks the timer for number of events so far. */ diff --git a/toonz/sources/include/ttokenizer.h b/toonz/sources/include/ttokenizer.h index 9a70ad3..71b8b22 100644 --- a/toonz/sources/include/ttokenizer.h +++ b/toonz/sources/include/ttokenizer.h @@ -44,14 +44,14 @@ public: { } - Token(string text, Type type, int pos) + Token(std::string text, Type type, int pos) : m_text(text), m_type(type), m_pos(pos) { } Type getType() const { return m_type; } - string getText() const { return m_text; } + std::string getText() const { return m_text; } int getIntValue() const; double getDoubleValue() const; @@ -59,7 +59,7 @@ public: int getPos1() const { return m_pos + m_text.length() - 1; } private: - string m_text; + std::string m_text; int m_pos; Type m_type; }; @@ -69,17 +69,17 @@ private: class DVAPI Tokenizer { - string m_buffer; + std::string m_buffer; std::vector m_tokens; int m_index; public: Tokenizer(); - Tokenizer(string buffer); + Tokenizer(std::string buffer); ~Tokenizer(); - void setBuffer(string buffer); - string getBuffer() const { return m_buffer; } + void setBuffer(std::string buffer); + std::string getBuffer() const { return m_buffer; } int getTokenCount() const; const Token &getToken(int index) const; diff --git a/toonz/sources/include/ttonecurveparam.h b/toonz/sources/include/ttonecurveparam.h index f09ada7..c22123d 100644 --- a/toonz/sources/include/ttonecurveparam.h +++ b/toonz/sources/include/ttonecurveparam.h @@ -80,7 +80,7 @@ public: // virtual void enableNotification(bool on) {} // virtual bool isNotificationEnabled() const { return true;} - string getValueAlias(double frame, int precision); + std::string getValueAlias(double frame, int precision); bool isAnimatable() const { return true; }; bool isKeyframe(double frame) const; diff --git a/toonz/sources/include/ttoonzimage.h b/toonz/sources/include/ttoonzimage.h index 0dd93d2..a3b67f2 100644 --- a/toonz/sources/include/ttoonzimage.h +++ b/toonz/sources/include/ttoonzimage.h @@ -29,7 +29,7 @@ class DVAPI TToonzImage : public TImage m_dpiy; int m_subsampling; //! The name of the image - string m_name; + std::string m_name; //! The savebox of the image TRect m_savebox; //double m_hPos; diff --git a/toonz/sources/include/ttzpimagefx.h b/toonz/sources/include/ttzpimagefx.h index 627611f..a9e8129 100644 --- a/toonz/sources/include/ttzpimagefx.h +++ b/toonz/sources/include/ttzpimagefx.h @@ -39,7 +39,7 @@ public: std::string m_name; public: - ExternalPaletteFxRenderData(TPaletteP palette, const string &name); + ExternalPaletteFxRenderData(TPaletteP palette, const std::string &name); float typeIndex() const { return 0.0f; } @@ -78,8 +78,8 @@ public: //------------------------------------------------------------------------------ -void DVAPI insertIndexes(std::vector items, PaletteFilterFxRenderData *t); -void DVAPI parseIndexes(std::string indexes, std::vector &items); +void DVAPI insertIndexes(std::vector items, PaletteFilterFxRenderData *t); +void DVAPI parseIndexes(std::string indexes, std::vector &items); //********************************************************************************************** // SandorFxRenderData (possible) parameters diff --git a/toonz/sources/include/tunit.h b/toonz/sources/include/tunit.h index 6f11b6a..0a6e16e 100644 --- a/toonz/sources/include/tunit.h +++ b/toonz/sources/include/tunit.h @@ -49,23 +49,23 @@ public: class DVAPI TUnit { - wstring m_defaultExtension; - std::vector m_extensions; + std::wstring m_defaultExtension; + std::vector m_extensions; TUnitConverter *m_converter; public: - TUnit(wstring ext, TUnitConverter *converter = 0); + TUnit(std::wstring ext, TUnitConverter *converter = 0); TUnit(const TUnit &); ~TUnit(); TUnit *clone() const { return new TUnit(*this); } - const std::vector &getExtensions() const { return m_extensions; } - void addExtension(wstring ext); - bool isExtension(wstring ext) const; + const std::vector &getExtensions() const { return m_extensions; } + void addExtension(std::wstring ext); + bool isExtension(std::wstring ext) const; - wstring getDefaultExtension() const { return m_defaultExtension; } - void setDefaultExtension(wstring ext); + std::wstring getDefaultExtension() const { return m_defaultExtension; } + void setDefaultExtension(std::wstring ext); double convertTo(double v) const { return m_converter->convertTo(v); } double convertFrom(double v) const { return m_converter->convertFrom(v); } @@ -79,18 +79,18 @@ private: class DVAPI TMeasure { - string m_name; + std::string m_name; TUnit *m_mainUnit, *m_currentUnit, *m_standardUnit; - std::map m_extensions; + std::map m_extensions; double m_defaultValue; public: - TMeasure(string name, TUnit *mainUnit); + TMeasure(std::string name, TUnit *mainUnit); TMeasure(const TMeasure &); ~TMeasure(); - string getName() const { return m_name; } - void setName(string name) { m_name = name; } + std::string getName() const { return m_name; } + void setName(std::string name) { m_name = name; } void add(TUnit *unit); @@ -105,7 +105,7 @@ public: const TUnit *getStandardUnit() const { return m_standardUnit; } void setStandardUnit(TUnit *unit); - TUnit *getUnit(wstring ext) const; + TUnit *getUnit(std::wstring ext) const; // defaultValue e' espresso in main unit double getDefaultValue() const { return m_defaultValue; } @@ -120,7 +120,7 @@ private: class DVAPI TMeasureManager { // singleton - std::map m_measures; + std::map m_measures; TMeasureManager(); public: @@ -131,7 +131,7 @@ public: } void add(TMeasure *m); - TMeasure *get(string name) const; + TMeasure *get(std::string name) const; typedef double CameraSizeProvider(); void addCameraMeasures(CameraSizeProvider *cameraSizeProvider); @@ -145,12 +145,12 @@ class DVAPI TMeasuredValue double m_value; public: - TMeasuredValue(string measureName); + TMeasuredValue(std::string measureName); ~TMeasuredValue(); const TMeasure *getMeasure() const { return m_measure; } void setMeasure(const TMeasure *measure); - void setMeasure(string measureName); + void setMeasure(std::string measureName); enum UnitType { MainUnit, CurrentUnit }; @@ -164,8 +164,8 @@ public: m_value = uType == MainUnit ? value : m_measure->getCurrentUnit()->convertFrom(value); } - bool setValue(wstring s, int *pErr = 0); // if pErr != then *pErr contains error code. *pErr == 0 means OK - wstring toWideString(int decimals = 7) const; + bool setValue(std::wstring s, int *pErr = 0); // if pErr != then *pErr contains error code. *pErr == 0 means OK + std::wstring toWideString(int decimals = 7) const; private: // not implemented diff --git a/toonz/sources/include/tvectorimage.h b/toonz/sources/include/tvectorimage.h index 586e66d..c9cd769 100644 --- a/toonz/sources/include/tvectorimage.h +++ b/toonz/sources/include/tvectorimage.h @@ -215,7 +215,7 @@ public: //! Remove the strokes identified by indexes in the vector \b toBeRemoved /*! If \b deleteThem is true strokes are really delete; if \b doComputeRegions is true recompute the regions*/ - void removeStrokes(const vector &tobeRemoved, bool deleteThem, bool recomputeRegions); + void removeStrokes(const std::vector &tobeRemoved, bool deleteThem, bool recomputeRegions); //! Delete the \b TStroke stroke of index \b index void deleteStroke(int index); @@ -267,7 +267,7 @@ public: //! Call the following method after stroke modification //! \note you must specify, using the second argument, whether the modification was a reflection - void notifyChangedStrokes(const vector &strokeIndexArray, const vector &oldStrokeArray, bool areFlipped = false); + void notifyChangedStrokes(const std::vector &strokeIndexArray, const std::vector &oldStrokeArray, bool areFlipped = false); //! Call the following method after stroke modification void notifyChangedStrokes(int strokeIndex, TStroke *oldStroke = 0, bool isFlipped = false); @@ -300,8 +300,8 @@ public: void mergeImage(const std::vector &images); //! Insert the \b TVectorImageP \b img - void insertImage(const TVectorImageP &img, const vector &dstIndices); - TVectorImageP splitImage(const vector &indices, bool removeFlag); + void insertImage(const TVectorImageP &img, const std::vector &dstIndices); + TVectorImageP splitImage(const std::vector &indices, bool removeFlag); //! Return the used styles in the image void getUsedStyles(std::set &styles) const; @@ -320,7 +320,7 @@ public: cutting it in points w specified in sortedW. SortedW must be sorted in ascending order. Resulting strokes are put in VectorImage in position strokeIndex,strokeIndex+1, ... strokeIndex+n. Information on fill colors are maintened, as much as possible. */ - void splitStroke(int strokeIndex, const vector &sortedWRanges); + void splitStroke(int strokeIndex, const std::vector &sortedWRanges); VIStroke *joinStroke(int index1, int index2, int cpIndex1, int cpIndex2, bool isSmooth); VIStroke *extendStroke(int index, const TThickPoint &p, int cpIndex, bool isSmooth); /*! this method removes the parts of the stroke that are not bounds of regions. only ending parts are removed. @@ -341,7 +341,7 @@ public: void recomputeRegionsIfNeeded(); /*! Remove all image strokes and all image regions with style index contained in \b styleIds vector.*/ - void eraseStyleIds(const vector styleIds); + void eraseStyleIds(const std::vector styleIds); TThread::Mutex *getMutex() const; @@ -364,7 +364,8 @@ DVAPI VIStroke *cloneVIStroke(VIStroke *vs); DVAPI void deleteVIStroke(VIStroke *vs); DVAPI void getClosingPoints(const TRectD &rect, double fac, const TVectorImageP &vi, - vector> &startPoints, vector> &endPoints); + std::vector> &startPoints, + std::vector> &endPoints); //----------------------------------------------------------------------------- @@ -410,7 +411,7 @@ public: virtual TInputStreamInterface &operator>>(double &) = 0; virtual TInputStreamInterface &operator>>(int &) = 0; - virtual TInputStreamInterface &operator>>(string &) = 0; + virtual TInputStreamInterface &operator>>(std::string &) = 0; virtual TInputStreamInterface &operator>>(UCHAR &) = 0; virtual TInputStreamInterface &operator>>(USHORT &) = 0; virtual TInputStreamInterface &operator>>(TRaster32P &) = 0; @@ -429,7 +430,7 @@ public: virtual TOutputStreamInterface &operator<<(double) = 0; virtual TOutputStreamInterface &operator<<(int) = 0; - virtual TOutputStreamInterface &operator<<(string) = 0; + virtual TOutputStreamInterface &operator<<(std::string) = 0; virtual TOutputStreamInterface &operator<<(UCHAR) = 0; virtual TOutputStreamInterface &operator<<(USHORT) = 0; virtual TOutputStreamInterface &operator<<(const TRaster32P &) = 0; diff --git a/toonz/sources/include/tw/keycodes.h b/toonz/sources/include/tw/keycodes.h index 8e98d59..5aefd02 100644 --- a/toonz/sources/include/tw/keycodes.h +++ b/toonz/sources/include/tw/keycodes.h @@ -62,6 +62,6 @@ enum { } // namespace -DVAPI string getKeyName(int key, unsigned long flags); +DVAPI std::string getKeyName(int key, unsigned long flags); #endif diff --git a/toonz/sources/include/tw/popup.h b/toonz/sources/include/tw/popup.h index e60f773..5cee4c3 100644 --- a/toonz/sources/include/tw/popup.h +++ b/toonz/sources/include/tw/popup.h @@ -14,10 +14,10 @@ protected: bool m_isResizable; bool m_isTopMost; virtual void create(); - wstring m_caption; + std::wstring m_caption; public: - TPopup(TWidget *parent, string name, bool hasCaption = true, bool isResizable = true, bool isTopMost = false); + TPopup(TWidget *parent, std::string name, bool hasCaption = true, bool isResizable = true, bool isTopMost = false); ~TPopup(); virtual void openPopup(); @@ -42,10 +42,10 @@ public: bool isResizable() const { return m_isResizable; } bool isTopMost() const { return m_isTopMost; } - void setCaption(const string &name); - void setCaption(const wstring &name); + void setCaption(const std::string &name); + void setCaption(const std::wstring &name); - wstring getCaption() const { return m_caption; }; + std::wstring getCaption() const { return m_caption; }; virtual TDimension getPreferredSize() const; virtual TDimension getMinimumSize() const { return TDimension(1, 1); }; @@ -62,7 +62,7 @@ protected: virtual void create(); public: - TModalPopup(TWidget *parent, string name, bool hasCaption = true, bool isResizable = true, bool isTopMost = true); + TModalPopup(TWidget *parent, std::string name, bool hasCaption = true, bool isResizable = true, bool isTopMost = true); ~TModalPopup(); // virtual void popup(const TPoint &pos); diff --git a/toonz/sources/include/tw/scrollview.h b/toonz/sources/include/tw/scrollview.h index 1480409..024e212 100644 --- a/toonz/sources/include/tw/scrollview.h +++ b/toonz/sources/include/tw/scrollview.h @@ -27,7 +27,7 @@ class DVAPI TScrollView : public TWidget int m_autopanningOldT; public: - TScrollView(TWidget *parent, string name = "scrollview"); + TScrollView(TWidget *parent, std::string name = "scrollview"); ~TScrollView(); void middleButtonDown(const TMouseEvent &e); diff --git a/toonz/sources/include/tw/stringtable.h b/toonz/sources/include/tw/stringtable.h index 061655e..9be75ad 100644 --- a/toonz/sources/include/tw/stringtable.h +++ b/toonz/sources/include/tw/stringtable.h @@ -21,20 +21,20 @@ class DVAPI TStringTable { public: static const TStringTable *instance(); - static wstring translate(string); + static std::wstring translate(std::string); class Item { public: - wstring m_name, m_help, m_tip; + std::wstring m_name, m_help, m_tip; Item() : m_name(), m_help(), m_tip(){}; }; - virtual const Item *getItem(string name) const = 0; + virtual const Item *getItem(std::string name) const = 0; - virtual std::pair getDefaultFontNameAndSize() const = 0; + virtual std::pair getDefaultFontNameAndSize() const = 0; - virtual string getDefaultMacFontName() const = 0; + virtual std::string getDefaultMacFontName() const = 0; protected: TStringTable(); diff --git a/toonz/sources/include/tw/textfield.h b/toonz/sources/include/tw/textfield.h index c97e479..afdd4df 100644 --- a/toonz/sources/include/tw/textfield.h +++ b/toonz/sources/include/tw/textfield.h @@ -47,14 +47,14 @@ protected: bool m_mouseDown; int xToIndex(int x); - vector m_actions; - vector m_commitActions; + std::vector m_actions; + std::vector m_commitActions; Listener *m_listener; void updateOffset(); public: - TTextField(TWidget *parent, string name = "textfield"); + TTextField(TWidget *parent, std::string name = "textfield"); ~TTextField(); virtual void commit() {} @@ -90,7 +90,7 @@ public: virtual void drawFieldText( const TPoint &origin, - wstring text); + std::wstring text); #ifndef MACOSX // pezza dovuta al baco del gcc3.3.1. Togliere quando lo si aggiorna al 3.3.2 o superiori @@ -111,18 +111,18 @@ public: template class TTextFieldAction : public TTextField::Action { - typedef void (T::*Method)(wstring text); + typedef void (T::*Method)(std::wstring text); T *m_target; Method m_method; public: TTextFieldAction(T *target, Method method) : m_target(target), m_method(method) {} - void sendCommand(wstring s) { (m_target->*m_method)(s); } + void sendCommand(std::wstring s) { (m_target->*m_method)(s); } }; template -void tconnect(TTextField *fld, T *target, void (T::*method)(wstring s)) +void tconnect(TTextField *fld, T *target, void (T::*method)(std::wstring s)) { fld->addCommitAction(new TTextFieldAction(target, method)); } @@ -156,7 +156,7 @@ public: private: double m_minValue, m_maxValue; - vector m_numActions; + std::vector m_numActions; bool m_isInteger; int m_precision; @@ -168,7 +168,7 @@ protected: void sendCommand(); public: - TNumField(TWidget *parent, string name = "numfield"); + TNumField(TWidget *parent, std::string name = "numfield"); ~TNumField(); void keyDown(int, TUINT32, const TPoint &); @@ -189,7 +189,7 @@ public: void addAction(Action *action); void onFocusChange(bool status); - void pasteText(wstring text); + void pasteText(std::wstring text); }; template @@ -227,13 +227,13 @@ public: private: TMeasuredValue *m_value; - vector m_actions; + std::vector m_actions; public: - TMeasuredValueField(TWidget *parent, string name = "numfield"); + TMeasuredValueField(TWidget *parent, std::string name = "numfield"); ~TMeasuredValueField(); - void setMeasure(string name); + void setMeasure(std::string name); TMeasuredValue *getMeasuredValue() const { return m_value; } diff --git a/toonz/sources/include/tw/textlist.h b/toonz/sources/include/tw/textlist.h index e0e8d0c..ec0ba9e 100644 --- a/toonz/sources/include/tw/textlist.h +++ b/toonz/sources/include/tw/textlist.h @@ -48,15 +48,15 @@ private: class DVAPI TTextListItem { public: - TTextListItem(const string &id, const string &caption); + TTextListItem(const std::string &id, const std::string &caption); virtual ~TTextListItem() {} - string getId() { return m_id; } - string getCaption() { return m_caption; } + std::string getId() { return m_id; } + std::string getCaption() { return m_caption; } private: - string m_id; - string m_caption; + std::string m_id; + std::string m_caption; }; //------------------------------------------------------------------- @@ -64,29 +64,29 @@ private: class DVAPI TTextList : public TWidget { public: - TTextList(TWidget *parent, string name = "textlist"); + TTextList(TWidget *parent, std::string name = "textlist"); ~TTextList(); void addItem(TTextListItem *item); - void removeItem(const string &itemId); + void removeItem(const std::string &itemId); void clearAll(); int getItemCount() const; TTextListItem *getItem(int i) const; // returns the index of item, -1 if not present - int itemToIndex(const string &itemId); + int itemToIndex(const std::string &itemId); int getSelectedItemCount() const; TTextListItem *getSelectedItem(int i) const; - string getSelectedItemId(int i) const; // returns the id of the i-th item selected + std::string getSelectedItemId(int i) const; // returns the id of the i-th item selected void select(int i, bool on); - void select(const string &itemId, bool on); + void select(const std::string &itemId, bool on); void unselectAll(); bool isSelected(int i) const; - bool isSelected(const string &itemId) const; + bool isSelected(const std::string &itemId) const; void setSelAction(TGenericTextListAction *action); void setDblClickAction(TGenericTextListAction *action); diff --git a/toonz/sources/include/tw/tw.h b/toonz/sources/include/tw/tw.h index fd5010d..652e0ca 100644 --- a/toonz/sources/include/tw/tw.h +++ b/toonz/sources/include/tw/tw.h @@ -92,8 +92,8 @@ protected: //TTimer *m_timer; TWidget *m_parent, *m_sonKeeper; - string m_name, m_contextHelpReference; - wstring m_shortHelp, m_longHelp; + std::string m_name, m_contextHelpReference; + std::wstring m_shortHelp, m_longHelp; int m_cursorIdx; @@ -108,7 +108,7 @@ protected: TDragDropListener *m_dragDropListener; - string m_fontName; + std::string m_fontName; int m_fontSize; int m_fontOrientation; @@ -127,7 +127,7 @@ protected: void createSons(); public: - TWidget(TWidget *parent = 0, string name = "unnamed"); + TWidget(TWidget *parent = 0, std::string name = "unnamed"); virtual ~TWidget(); // @@ -179,7 +179,7 @@ public: // name, parent & sons // inline TWidget *getParent() const { return m_parent; } - inline string getName() const { return m_name; } + inline std::string getName() const { return m_name; } virtual void setParent(TWidget *p); virtual void addSon(TWidget *son); virtual void removeSon(TWidget *son); @@ -189,25 +189,25 @@ public: // // help messages // - wstring getLongHelp() const; - wstring getShortHelp() const; + std::wstring getLongHelp() const; + std::wstring getShortHelp() const; - void setHelp(string shortHelp, string longHelp); - void setHelp(wstring shortHelp, wstring longHelp); + void setHelp(std::string shortHelp, std::string longHelp); + void setHelp(std::wstring shortHelp, std::wstring longHelp); - virtual string getContextHelpReference(const TPoint &) + virtual std::string getContextHelpReference(const TPoint &) { return m_contextHelpReference; } - void setContextHelpReference(string s) + void setContextHelpReference(std::string s) { m_contextHelpReference = s; } //void delegateHelpToParent(); - virtual wstring getTooltipString(const TPoint &) { return getShortHelp(); } + virtual std::wstring getTooltipString(const TPoint &) { return getShortHelp(); } // // misc @@ -239,7 +239,7 @@ public: virtual void paste(); - virtual void startDragAndDrop(string stringToDrop); + virtual void startDragAndDrop(std::string stringToDrop); typedef unsigned int CursorIndex; @@ -276,19 +276,19 @@ public: virtual void clear(); - virtual void drawText(const TPoint &p, string text); - virtual void drawText(const TPoint &p, wstring text); + virtual void drawText(const TPoint &p, std::string text); + virtual void drawText(const TPoint &p, std::wstring text); - virtual void drawText(const TRect &r, string text, Alignment alignment = CENTER); - virtual void drawText(const TRect &r, wstring text, Alignment alignment = CENTER); - virtual void drawMultiLineText(const TRect &r, string text); - virtual void drawMultiLineText(const TRect &r, wstring text); + virtual void drawText(const TRect &r, std::string text, Alignment alignment = CENTER); + virtual void drawText(const TRect &r, std::wstring text, Alignment alignment = CENTER); + virtual void drawMultiLineText(const TRect &r, std::string text); + virtual void drawMultiLineText(const TRect &r, std::wstring text); - virtual TDimension getTextSize(string text); - virtual TDimension getTextSize(wstring text); + virtual TDimension getTextSize(std::string text); + virtual TDimension getTextSize(std::wstring text); - virtual TDimension getTextSize(string text, string font, int fontSize); - virtual TDimension getTextSize(wstring text, string font, int fontSize); + virtual TDimension getTextSize(std::string text, std::string font, int fontSize); + virtual TDimension getTextSize(std::wstring text, std::string font, int fontSize); inline void drawPoint(int x, int y) { drawLine(x, y, x, y); } @@ -357,7 +357,7 @@ public: virtual void rectwrite(const TRaster32P &, const TPoint &); virtual void setFontSize(int size); - virtual void setFont(string name, int size = 0, int orientation = 0); + virtual void setFont(std::string name, int size = 0, int orientation = 0); // // events @@ -386,13 +386,13 @@ public: virtual void configureNotify(const TDimension &) {} - virtual void onPaste(string) {} + virtual void onPaste(std::string) {} // virtual void close() {unmap();} - virtual void onDrop(string) {} + virtual void onDrop(std::string) {} - virtual string getToolTip() { return ""; } + virtual std::string getToolTip() { return ""; } virtual void onTimer(int) {} @@ -441,7 +441,7 @@ public: //void paintRegion(const TRect &rect); static TDimension getScreenSize(); - static void getScreenPlacement(vector &); + static void getScreenPlacement(std::vector &); }; #endif diff --git a/toonz/sources/stdfx/artcontourfx.cpp b/toonz/sources/stdfx/artcontourfx.cpp index 5ab992a..02b5874 100644 --- a/toonz/sources/stdfx/artcontourfx.cpp +++ b/toonz/sources/stdfx/artcontourfx.cpp @@ -58,7 +58,7 @@ public: //---------------------------------------------------------------------------- SandorFxRenderData *buildRenderData(double frame, int shrink, const TRectD &controlBox, - const string &controllerAlias) + const std::string &controllerAlias) { int argc = 12; const char *argv[12]; @@ -165,7 +165,7 @@ private: void convertParam(double param[], const char *cParam[], int cParamLen) { - string app; + std::string app; for (int i = 1; i <= 11; i++) { app = toString(param[i]); cParam[i] = strsave(app.c_str()); @@ -198,7 +198,7 @@ void ArtContourFx::doDryCompute(TRectD &rect, double frame, const TRenderSetting TRenderSettings ri3(ri); int shrink = tround((ri.m_shrinkX + ri.m_shrinkY) / 2.0); - string controlAlias = m_controller->getAlias(frame, ri2); + std::string controlAlias = m_controller->getAlias(frame, ri2); SandorFxRenderData *artContourData = buildRenderData(frame, shrink, controlBox, controlAlias); ri3.m_data.push_back(artContourData); ri3.m_userCachable = false; @@ -233,7 +233,7 @@ void ArtContourFx::doCompute(TTile &tile, double frame, const TRenderSettings &r //Build the render data int shrink = tround((ri.m_shrinkX + ri.m_shrinkY) / 2.0); - string controlAlias = m_controller->getAlias(frame, ri2); + std::string controlAlias = m_controller->getAlias(frame, ri2); SandorFxRenderData *artContourData = buildRenderData(frame, shrink, controlBox, controlAlias); //Add the controller raster diff --git a/toonz/sources/stdfx/blendtzfx.cpp b/toonz/sources/stdfx/blendtzfx.cpp index 186e04a..7cdea50 100644 --- a/toonz/sources/stdfx/blendtzfx.cpp +++ b/toonz/sources/stdfx/blendtzfx.cpp @@ -96,7 +96,7 @@ private: void convertParam(double param[], const char *cParam[], int cParamLen) { - string app; + std::string app; for (int i = 2; i < cParamLen - 1; i++) { app = toString(param[i]); cParam[i] = strsave(app.c_str()); diff --git a/toonz/sources/stdfx/bright_contfx.cpp b/toonz/sources/stdfx/bright_contfx.cpp index c0c0ce3..e23e143 100644 --- a/toonz/sources/stdfx/bright_contfx.cpp +++ b/toonz/sources/stdfx/bright_contfx.cpp @@ -42,7 +42,7 @@ public: //=================================================================== template -void my_compute_lut(double contrast, double brightness, vector &lut) +void my_compute_lut(double contrast, double brightness, std::vector &lut) { int i; double value, nvalue, power; @@ -94,7 +94,7 @@ void doBrightnessContrast(TRasterPT ras, double contrast, double brightne int lx = ras->getLx(); int ly = ras->getLy(); - vector lut(PIXEL::maxChannelValue + 1); + std::vector lut(PIXEL::maxChannelValue + 1); my_compute_lut(contrast, brightness, lut); int j; diff --git a/toonz/sources/stdfx/calligraphicfx.cpp b/toonz/sources/stdfx/calligraphicfx.cpp index c7166b0..9a7611a 100644 --- a/toonz/sources/stdfx/calligraphicfx.cpp +++ b/toonz/sources/stdfx/calligraphicfx.cpp @@ -120,7 +120,7 @@ private: void convertParam(double param[], const char *cParam[], int cParamLen) { - string app; + std::string app; for (int i = 1; i < cParamLen; i++) { app = toString(param[i]); cParam[i] = strsave(app.c_str()); @@ -280,7 +280,7 @@ private: void convertParam(double param[], const char *cParam[], int cParamLen) { - string app; + std::string app; for (int i = 1; i < cParamLen; i++) { app = toString(param[i]); cParam[i] = strsave(app.c_str()); diff --git a/toonz/sources/stdfx/cornerpinfx.cpp b/toonz/sources/stdfx/cornerpinfx.cpp index 85474da..b32784f 100644 --- a/toonz/sources/stdfx/cornerpinfx.cpp +++ b/toonz/sources/stdfx/cornerpinfx.cpp @@ -374,8 +374,8 @@ void CornerPinFx::doDryCompute(TRectD &rect, double frame, const TRenderSettings if (!m_input.isConnected()) return; - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); TRenderSettings ri2(ri); PaletteFilterFxRenderData *PaletteFilterData = new PaletteFilterFxRenderData; @@ -430,8 +430,8 @@ void CornerPinFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri TTile invertMaskTile; //carico il vettore items con gli indici dei colori - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); //genero il tile il cui raster contiene l'immagine in input a cui sono stati tolti i pixel diff --git a/toonz/sources/stdfx/externalpalettefx.cpp b/toonz/sources/stdfx/externalpalettefx.cpp index 9790617..47d59fd 100644 --- a/toonz/sources/stdfx/externalpalettefx.cpp +++ b/toonz/sources/stdfx/externalpalettefx.cpp @@ -40,7 +40,7 @@ public: } } - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; void doDryCompute(TRectD &rect, double frame, const TRenderSettings &info); void doCompute(TTile &tile, double frame, const TRenderSettings &ri); @@ -97,9 +97,9 @@ TPalette *getPalette(TFx *fx, double frame) //------------------------------------------------------------------- -string ExternalPaletteFx::getAlias(double frame, const TRenderSettings &info) const +std::string ExternalPaletteFx::getAlias(double frame, const TRenderSettings &info) const { - string alias(TRasterFx::getAlias(frame, info)); + std::string alias(TRasterFx::getAlias(frame, info)); if (m_expalette.isConnected()) { TFx *fx = m_expalette.getFx(); @@ -120,7 +120,7 @@ void ExternalPaletteFx::doDryCompute(TRectD &rect, double frame, const TRenderSe if (m_expalette.isConnected()) { TFx *fx = m_expalette.getFx(); - string pltAlias = m_expalette->getAlias(frame, ri); + std::string pltAlias = m_expalette->getAlias(frame, ri); TPaletteP palette(getPalette(fx, frame)); if (palette && palette->isAnimated()) @@ -146,7 +146,7 @@ void ExternalPaletteFx::doCompute(TTile &tile, double frame, const TRenderSettin if (m_expalette.isConnected()) { TFx *fx = m_expalette.getFx(); - string pltAlias = m_expalette->getAlias(frame, ri); + std::string pltAlias = m_expalette->getAlias(frame, ri); TPaletteP palette(getPalette(fx, frame)); if (palette && palette->isAnimated()) diff --git a/toonz/sources/stdfx/ino_blend_add.cpp b/toonz/sources/stdfx/ino_blend_add.cpp index 1a596b1..0276585 100644 --- a/toonz/sources/stdfx/ino_blend_add.cpp +++ b/toonz/sources/stdfx/ino_blend_add.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_color_burn.cpp b/toonz/sources/stdfx/ino_blend_color_burn.cpp index 88631d3..40cfb36 100644 --- a/toonz/sources/stdfx/ino_blend_color_burn.cpp +++ b/toonz/sources/stdfx/ino_blend_color_burn.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_color_dodge.cpp b/toonz/sources/stdfx/ino_blend_color_dodge.cpp index d612e6a..a937bf6 100644 --- a/toonz/sources/stdfx/ino_blend_color_dodge.cpp +++ b/toonz/sources/stdfx/ino_blend_color_dodge.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_cross_dissolve.cpp b/toonz/sources/stdfx/ino_blend_cross_dissolve.cpp index 5c89d5d..5c21c6f 100644 --- a/toonz/sources/stdfx/ino_blend_cross_dissolve.cpp +++ b/toonz/sources/stdfx/ino_blend_cross_dissolve.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_darken.cpp b/toonz/sources/stdfx/ino_blend_darken.cpp index 0fd040b..3d94102 100644 --- a/toonz/sources/stdfx/ino_blend_darken.cpp +++ b/toonz/sources/stdfx/ino_blend_darken.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_darker_color.cpp b/toonz/sources/stdfx/ino_blend_darker_color.cpp index 28e1b07..95d4bb8 100644 --- a/toonz/sources/stdfx/ino_blend_darker_color.cpp +++ b/toonz/sources/stdfx/ino_blend_darker_color.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_divide.cpp b/toonz/sources/stdfx/ino_blend_divide.cpp index 0f132c4..0f692ef 100644 --- a/toonz/sources/stdfx/ino_blend_divide.cpp +++ b/toonz/sources/stdfx/ino_blend_divide.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_hard_light.cpp b/toonz/sources/stdfx/ino_blend_hard_light.cpp index b739841..6ff64a2 100644 --- a/toonz/sources/stdfx/ino_blend_hard_light.cpp +++ b/toonz/sources/stdfx/ino_blend_hard_light.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_hard_mix.cpp b/toonz/sources/stdfx/ino_blend_hard_mix.cpp index d9b9a32..1f8a2f4 100644 --- a/toonz/sources/stdfx/ino_blend_hard_mix.cpp +++ b/toonz/sources/stdfx/ino_blend_hard_mix.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_lighten.cpp b/toonz/sources/stdfx/ino_blend_lighten.cpp index 449a9b3..199b8bf 100644 --- a/toonz/sources/stdfx/ino_blend_lighten.cpp +++ b/toonz/sources/stdfx/ino_blend_lighten.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_lighter_color.cpp b/toonz/sources/stdfx/ino_blend_lighter_color.cpp index ed6a3e4..49cee81 100644 --- a/toonz/sources/stdfx/ino_blend_lighter_color.cpp +++ b/toonz/sources/stdfx/ino_blend_lighter_color.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_linear_burn.cpp b/toonz/sources/stdfx/ino_blend_linear_burn.cpp index 60d8011..5833e6e 100644 --- a/toonz/sources/stdfx/ino_blend_linear_burn.cpp +++ b/toonz/sources/stdfx/ino_blend_linear_burn.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_linear_dodge.cpp b/toonz/sources/stdfx/ino_blend_linear_dodge.cpp index 053f635..769deb2 100644 --- a/toonz/sources/stdfx/ino_blend_linear_dodge.cpp +++ b/toonz/sources/stdfx/ino_blend_linear_dodge.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_linear_light.cpp b/toonz/sources/stdfx/ino_blend_linear_light.cpp index 548ba22..724c9b2 100644 --- a/toonz/sources/stdfx/ino_blend_linear_light.cpp +++ b/toonz/sources/stdfx/ino_blend_linear_light.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_multiply.cpp b/toonz/sources/stdfx/ino_blend_multiply.cpp index ab49b10..9620eaf 100644 --- a/toonz/sources/stdfx/ino_blend_multiply.cpp +++ b/toonz/sources/stdfx/ino_blend_multiply.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_over.cpp b/toonz/sources/stdfx/ino_blend_over.cpp index 6c469d2..0cf34d9 100644 --- a/toonz/sources/stdfx/ino_blend_over.cpp +++ b/toonz/sources/stdfx/ino_blend_over.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_overlay.cpp b/toonz/sources/stdfx/ino_blend_overlay.cpp index c2b1181..413f68f 100644 --- a/toonz/sources/stdfx/ino_blend_overlay.cpp +++ b/toonz/sources/stdfx/ino_blend_overlay.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_pin_light.cpp b/toonz/sources/stdfx/ino_blend_pin_light.cpp index bf3b74b..9d31eff 100644 --- a/toonz/sources/stdfx/ino_blend_pin_light.cpp +++ b/toonz/sources/stdfx/ino_blend_pin_light.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_screen.cpp b/toonz/sources/stdfx/ino_blend_screen.cpp index 95d46fd..869f782 100644 --- a/toonz/sources/stdfx/ino_blend_screen.cpp +++ b/toonz/sources/stdfx/ino_blend_screen.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_soft_light.cpp b/toonz/sources/stdfx/ino_blend_soft_light.cpp index 85a5dc6..31a4396 100644 --- a/toonz/sources/stdfx/ino_blend_soft_light.cpp +++ b/toonz/sources/stdfx/ino_blend_soft_light.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_subtract.cpp b/toonz/sources/stdfx/ino_blend_subtract.cpp index 9bec520..9ddcc36 100644 --- a/toonz/sources/stdfx/ino_blend_subtract.cpp +++ b/toonz/sources/stdfx/ino_blend_subtract.cpp @@ -51,7 +51,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_blend_vivid_light.cpp b/toonz/sources/stdfx/ino_blend_vivid_light.cpp index 1cbdead..c6594ce 100644 --- a/toonz/sources/stdfx/ino_blend_vivid_light.cpp +++ b/toonz/sources/stdfx/ino_blend_vivid_light.cpp @@ -49,7 +49,7 @@ public: } } //TRect getInvalidRect(const TRect &max) {return max;} - //void doSetParam(const string &name, const TParamP ¶m) {} + //void doSetParam(const std::string &name, const TParamP ¶m) {} int getMemoryRequirement( const TRectD &rect, double frame, const TRenderSettings &rs) { diff --git a/toonz/sources/stdfx/ino_channel_selector.cpp b/toonz/sources/stdfx/ino_channel_selector.cpp index 7b132bd..68bf0fb 100644 --- a/toonz/sources/stdfx/ino_channel_selector.cpp +++ b/toonz/sources/stdfx/ino_channel_selector.cpp @@ -67,7 +67,7 @@ public: double frame, TRectD &bBox, const TRenderSettings &info) { for (int ii = 0; ii < this->getInputPortCount(); ++ii) { - string nm = this->getInputPortName(ii); + std::string nm = this->getInputPortName(ii); TRasterFxPort * tmp_port = (TRasterFxPort *)this->getInputPort(nm); if (tmp_port->isConnected()) { @@ -201,7 +201,7 @@ void ino_channel_selector::doCompute( /* ------ 画像生成 ---------------------------------------- */ for (int ii = 0; ii < this->getInputPortCount(); ++ii) { - string nm = this->getInputPortName(ii); + std::string nm = this->getInputPortName(ii); TRasterFxPort * tmp_port = (TRasterFxPort *)this->getInputPort(nm); if (tmp_port->isConnected() && ((ii == red_source) || (ii == gre_source) || diff --git a/toonz/sources/stdfx/ino_common.h b/toonz/sources/stdfx/ino_common.h index 5ccf7f3..cd9e4fd 100644 --- a/toonz/sources/stdfx/ino_common.h +++ b/toonz/sources/stdfx/ino_common.h @@ -45,7 +45,7 @@ public: /* FX nodeが無効のときの、表示port番号 */ int getPreferredInputPort() { return 1; } - string getPluginId() const { return PLUGIN_PREFIX; } + std::string getPluginId() const { return PLUGIN_PREFIX; } }; #endif /* !ino_common_h */ diff --git a/toonz/sources/stdfx/iwa_motionblurfx.cpp b/toonz/sources/stdfx/iwa_motionblurfx.cpp index 7e5d5c7..3887b34 100644 --- a/toonz/sources/stdfx/iwa_motionblurfx.cpp +++ b/toonz/sources/stdfx/iwa_motionblurfx.cpp @@ -965,9 +965,9 @@ bool Iwa_MotionBlurCompFx::canHandle(const TRenderSettings &info, エイリアスは毎フレーム変える ------------------------------------------------------------*/ -string Iwa_MotionBlurCompFx::getAlias(double frame, const TRenderSettings &info) const +std::string Iwa_MotionBlurCompFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -983,7 +983,7 @@ string Iwa_MotionBlurCompFx::getAlias(double frame, const TRenderSettings &info) alias += ","; } - string paramalias(""); + std::string paramalias(""); for (i = 0; i < getParams()->getParamCount(); i++) { TParam *param = getParams()->getParam(i); paramalias += param->getName() + "=" + param->getValueAlias(frame, 3); diff --git a/toonz/sources/stdfx/iwa_motionblurfx.h b/toonz/sources/stdfx/iwa_motionblurfx.h index 12d2209..21d6f7d 100644 --- a/toonz/sources/stdfx/iwa_motionblurfx.h +++ b/toonz/sources/stdfx/iwa_motionblurfx.h @@ -155,7 +155,7 @@ public: double frame); /*- 参考にしているオブジェクトが動いている可能性があるので、 エイリアスは毎フレーム変える -*/ - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; }; #endif \ No newline at end of file diff --git a/toonz/sources/stdfx/iwa_particles.cpp b/toonz/sources/stdfx/iwa_particles.cpp index 8fd254c..d21316a 100644 --- a/toonz/sources/stdfx/iwa_particles.cpp +++ b/toonz/sources/stdfx/iwa_particles.cpp @@ -29,7 +29,7 @@ void Iwa_Particle::create_Animation(const particles_values &values, Iwa_Particle::Iwa_Particle(int g_lifetime, int seed, - map porttiles, + std::map porttiles, const particles_values &values, const particles_ranges &ranges, int howmany, @@ -41,7 +41,7 @@ Iwa_Particle::Iwa_Particle(int g_lifetime, int initSourceFrame) /*- Level内の初期フレーム位置 -*/ { double random_s_a_range, random_speed; - map imagereferences; + std::map imagereferences; random = TRandom(seed); float randomxreference = 0.0; float randomyreference = 0.0; @@ -226,7 +226,7 @@ void Iwa_Particle::create_Swing(const particles_values &values, void Iwa_Particle::create_Colors(const particles_values &values, const particles_ranges &ranges, - map porttiles) + std::map porttiles) { if (values.genfadecol_val) { TPixel32 color; @@ -903,7 +903,7 @@ void Iwa_Particle::spread_color(TPixel32 &color, double range) 粒子の移動 -----------------------------------------------*/ -void Iwa_Particle::move(map porttiles, +void Iwa_Particle::move(std::map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, float windy, @@ -913,7 +913,7 @@ void Iwa_Particle::move(map porttiles, { struct pos_dummy dummy; float frictx, fricty; - map imagereferences; + std::map imagereferences; dummy.x = dummy.y = dummy.a = 0.0; frictx = fricty = 0.0; diff --git a/toonz/sources/stdfx/iwa_particles.h b/toonz/sources/stdfx/iwa_particles.h index 20e39e4..ab255a4 100644 --- a/toonz/sources/stdfx/iwa_particles.h +++ b/toonz/sources/stdfx/iwa_particles.h @@ -204,7 +204,7 @@ public: public: Iwa_Particle(int lifetime, int seed, - const map porttiles, + const std::map porttiles, const particles_values &values, const particles_ranges &ranges, int howmany, @@ -225,9 +225,9 @@ public: const particles_ranges &ranges, double randomxreference, double randomyreference); void create_Colors(const particles_values &values, - const particles_ranges &ranges, map porttiles); + const particles_ranges &ranges, std::map porttiles); - void move(const map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, + void move(const std::map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, float windy, float xgravity, float ygravity, float dpi, int lastframe); void spread_color(TPixel32 &color, double range); diff --git a/toonz/sources/stdfx/iwa_particlesengine.cpp b/toonz/sources/stdfx/iwa_particlesengine.cpp index ad8ecc9..46a7fdd 100644 --- a/toonz/sources/stdfx/iwa_particlesengine.cpp +++ b/toonz/sources/stdfx/iwa_particlesengine.cpp @@ -31,9 +31,9 @@ namespace { QMutex mutex; -void printTime(TStopWatch &sw, string name) +void printTime(TStopWatch &sw, std::string name) { - ostrstream ss; + std::ostrstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; @@ -208,7 +208,7 @@ void Iwa_Particles_Engine::roll_particles(TTile *tile, /*-結果を格納� int level_n, /*-テクスチャ素材画像の数-*/ bool *random_level, /*-ループの最初にfalseで入ってくる-*/ float dpi, /*- 1 で入ってくる-*/ - vector lastframe, /*-テクスチャ素材のそれぞれのカラム長-*/ + std::vector lastframe, /*-テクスチャ素材のそれぞれのカラム長-*/ int &totalparticles, QList &particleOrigins, int genPartNum /*- 実際に生成したい粒子数 -*/ @@ -226,7 +226,7 @@ void Iwa_Particles_Engine::roll_particles(TTile *tile, /*-結果を格納� fill_range_struct(values, ranges); - vector myregions; + std::vector myregions; QList> myHistogram; std::map::iterator it = porttiles.find(values.source_ctrl_val); @@ -537,7 +537,7 @@ void Iwa_Particles_Engine::render_particles(TFlash *flash, /*- 0 が入� TDimension &p_size, /*- テクスチャ素材のバウンディングボックスの足し合わさったもの -*/ TPointD &p_offset, /*- バウンディングボックス左下の座標 -*/ std::map ctrl_ports, /*- コントロール画像のポート番号/ポート -*/ - vector partLevel, /*- テクスチャ素材のリスト -*/ + std::vector partLevel, /*- テクスチャ素材のリスト -*/ float dpi, /*- 1 が入ってくる -*/ int curr_frame, int shrink, /*- 1 が入ってくる -*/ @@ -545,7 +545,7 @@ void Iwa_Particles_Engine::render_particles(TFlash *flash, /*- 0 が入� double starty, /*- 0 が入ってくる -*/ double endx, /*- 0 が入ってくる -*/ double endy, /*- 0 が入ってくる -*/ - vector last_frame, /*- テクスチャ素材のそれぞれのカラム長 -*/ + std::vector last_frame, /*- テクスチャ素材のそれぞれのカラム長 -*/ unsigned long fxId) { /*- 各種パーティクルのパラメータ -*/ @@ -680,7 +680,7 @@ void Iwa_Particles_Engine::render_particles(TFlash *flash, /*- 0 が入� fractpart = fractpart - (int)fractpart; } - map porttiles; + std::map porttiles; // Perform the roll /*- RenderSettingsを複製して現在のフレームの計算用にする -*/ @@ -714,7 +714,7 @@ void Iwa_Particles_Engine::render_particles(TFlash *flash, /*- 0 が入� if (isPrecomputingEnabled) { (*it->second)->allocateAndCompute(*tmp, bbox.getP00(), convert(bbox).getSize(), 0, r_frame, riAux); } else { - string alias = "CTRL: " + (*(it->second))->getAlias(r_frame, riAux); + std::string alias = "CTRL: " + (*(it->second))->getAlias(r_frame, riAux); TRasterImageP rimg = TImageCache::instance()->get(alias, false); if (rimg) { @@ -737,7 +737,7 @@ void Iwa_Particles_Engine::render_particles(TFlash *flash, /*- 0 が入� port_is_used(values.base_ctrl_val, values) && values.iw_rendermode_val != Iwa_TiledParticlesFx::REND_ILLUMINATED) /*- 照明モードなら、BG素材は要らない -*/ { - string alias = "BG_CTRL: " + (*ctrl_ports.at(values.base_ctrl_val))->getAlias(r_frame, ri); + std::string alias = "BG_CTRL: " + (*ctrl_ports.at(values.base_ctrl_val))->getAlias(r_frame, ri); TRasterImageP rimg = TImageCache::instance()->get(alias, false); if (rimg) { baseImgTile.m_pos = tile->m_pos; @@ -935,7 +935,7 @@ void Iwa_Particles_Engine::do_render(TFlash *flash, TDimension &p_size, TPointD &p_offset, int lastframe, - vector partLevel, + std::vector partLevel, struct particles_values &values, float opacity_range, int dist_frame, @@ -952,7 +952,7 @@ void Iwa_Particles_Engine::do_render(TFlash *flash, TRasterP tileRas(tile->getRaster()); - string levelid; + std::string levelid; double aim_angle = 0; if (values.pathaim_val) { float arctan = atan2f(part->vy, part->vx); @@ -1049,7 +1049,7 @@ void Iwa_Particles_Engine::do_render(TFlash *flash, } else { TRasterP ras; - string alias; + std::string alias; TRasterImageP rimg; if (rimg = partLevel[part->level]->frame(ndx)) { ras = rimg->getRaster(); @@ -1147,9 +1147,9 @@ void Iwa_Particles_Engine::do_render(TFlash *flash, void Iwa_Particles_Engine::fill_array(TTile *ctrl1, /*- ソース画像のTile -*/ int ®ioncount, /*- 領域数を返す -*/ - vector &myarray, /*- インデックスを返すと思われる。サイズはソースTileの縦横 -*/ - vector &lista, - vector &listb, + std::vector &myarray, /*- インデックスを返すと思われる。サイズはソースTileの縦横 -*/ + std::vector &lista, + std::vector &listb, int threshold) { @@ -1181,7 +1181,7 @@ void Iwa_Particles_Engine::fill_array(TTile *ctrl1, /*- ソース画像のTile for (i = 0, pix = raster32->pixels(j); i < lx; i++, pix++) { /*TMSG_INFO("j=%d i=%d\n", j, i);*/ if (pix->m > threshold) { - vector mask(4); + std::vector mask(4); pr++; /* l,ul,u,ur;*/ if (i) { @@ -1220,13 +1220,13 @@ void Iwa_Particles_Engine::fill_array(TTile *ctrl1, /*- ソース画像のTile /*-----------------------------------------------------------------*/ -void Iwa_Particles_Engine::normalize_array(vector> &myregions, TPointD pos, int lx, int ly, int +void Iwa_Particles_Engine::normalize_array(std::vector> &myregions, TPointD pos, int lx, int ly, int regioncounter, - vector &myarray, vector &lista, vector &listb, vector &final) + std::vector &myarray, std::vector &lista, std::vector &listb, std::vector &final) { int i, j, k, l; - vector tmp; + std::vector tmp; int maxregioncounter = 0; int listsize = (int)lista.size(); //TMSG_INFO("regioncounter %d, eqcount=%d\n", regioncounter, eqcount); @@ -1293,7 +1293,7 @@ void Iwa_Particles_Engine::normalize_array(vector> &myregions, T /*-----------------------------------------------------------------*/ /*- multiがONのときのSource画像(ctrl1)の領域を分析 -*/ -void Iwa_Particles_Engine::fill_subregions(int cont_index, vector> &myregions, TTile *ctrl1, int thres) +void Iwa_Particles_Engine::fill_subregions(int cont_index, std::vector> &myregions, TTile *ctrl1, int thres) { int regioncounter = 0; @@ -1301,14 +1301,14 @@ void Iwa_Particles_Engine::fill_subregions(int cont_index, vectorgetRaster()->getLx(); int ly = ctrl1->getRaster()->getLy(); - vector myarray(lx * ly); - vector lista; - vector listb; + std::vector myarray(lx * ly); + std::vector lista; + std::vector listb; fill_array(ctrl1, regioncounter, myarray, lista, listb, thres); if (regioncounter) { - vector final(regioncounter + 1); + std::vector final(regioncounter + 1); normalize_array(myregions, ctrl1->m_pos, lx, ly, regioncounter, myarray, lista, listb, final); } } @@ -1316,7 +1316,7 @@ void Iwa_Particles_Engine::fill_subregions(int cont_index, vector &myregions, +void Iwa_Particles_Engine::fill_single_region(std::vector &myregions, TTile *ctrl1, int threshold, bool do_source_gradation, QList> &myHistogram, @@ -1405,7 +1405,7 @@ void Iwa_Particles_Engine::initParticleOrigins(TRectD &resourceTileBBox, const double frame, const TAffine affine, struct particles_values &values, int level_n, - vector &lastframe, /*- 素材カラムのフレーム長 -*/ + std::vector &lastframe, /*- 素材カラムのフレーム長 -*/ double pixelMargin) { /*- 敷き詰め三角形の一辺の長さをピクセル単位に換算する -*/ @@ -1524,7 +1524,7 @@ void Iwa_Particles_Engine::renderBackground(TTile *tile, QList &origins, std::vector part_ports, const TRenderSettings &ri, - vector partLevel, + std::vector partLevel, std::map, float> &partScales, TTile *baseImgTile) { @@ -1566,7 +1566,7 @@ void Iwa_Particles_Engine::renderBackground(TTile *tile, TRasterP ras; - string alias; + std::string alias; TRasterImageP rimg; if (rimg = partLevel[origin.level]->frame(ndx)) { ras = rimg->getRaster(); diff --git a/toonz/sources/stdfx/iwa_particlesengine.h b/toonz/sources/stdfx/iwa_particlesengine.h index f90e968..0157538 100644 --- a/toonz/sources/stdfx/iwa_particlesengine.h +++ b/toonz/sources/stdfx/iwa_particlesengine.h @@ -80,7 +80,7 @@ public: int level_n, bool *random_level, float dpi, - vector lastframe, + std::vector lastframe, int &totalparticles, QList &particleOrigin, int genPartNum); @@ -94,13 +94,13 @@ public: TDimension &p_size, TPointD &p_offset, std::map ctrl_ports, - vector partLevel, + std::vector partLevel, float dpi, int curr_frame, int shrink, double startx, double starty, double endx, double endy, - vector lastframe, + std::vector lastframe, unsigned long fxId); void do_render(TFlash *flash, @@ -112,7 +112,7 @@ public: TDimension &p_size, TPointD &p_offset, int lastframe, - vector partLevel, + std::vector partLevel, struct particles_values &values, float opacity_range, int curr_frame, @@ -121,29 +121,29 @@ public: bool port_is_used(int i, struct particles_values &values); - void fill_single_region(vector &myregions, + void fill_single_region(std::vector &myregions, TTile *ctrl1, int thres, bool do_source_gradation, QList> &myHistogram, QList &particleOrigins); void fill_subregions(int cont_index, - vector> &myregions, + std::vector> &myregions, TTile *ctrl1, int thres); - void normalize_array(vector> &myregions, + void normalize_array(std::vector> &myregions, TPointD pos, int lx, int ly, int regioncounter, - vector &myarray, - vector &lista, vector &listb, - vector &final); + std::vector &myarray, + std::vector &lista, std::vector &listb, + std::vector &final); void fill_array(TTile *ctrl1, int ®ioncount, - vector &myarray, - vector &lista, vector &listb, + std::vector &myarray, + std::vector &lista, std::vector &listb, int thres); /*- 敷き詰めのため。まだ出発していない粒子情報を初期化 -*/ @@ -152,7 +152,7 @@ public: const double frame, const TAffine affine, struct particles_values &values, int level_n, - vector &lastframe, + std::vector &lastframe, double pixelMargin); /*- Particle::create_Animationと同じ。粒子発生前に @@ -165,7 +165,7 @@ public: QList &origins, std::vector part_ports, const TRenderSettings &ri, - vector partLevel, + std::vector partLevel, std::map, float> &partScales, TTile *baseImgTile); }; diff --git a/toonz/sources/stdfx/iwa_particlesfx.cpp b/toonz/sources/stdfx/iwa_particlesfx.cpp index 9effe31..f7040f3 100644 --- a/toonz/sources/stdfx/iwa_particlesfx.cpp +++ b/toonz/sources/stdfx/iwa_particlesfx.cpp @@ -308,9 +308,9 @@ bool Iwa_TiledParticlesFx::doGetBBox(double frame, TRectD &bBox, const TRenderSe //------------------------------------------------------------------ -string Iwa_TiledParticlesFx::getAlias(double frame, const TRenderSettings &info) const +std::string Iwa_TiledParticlesFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -325,7 +325,7 @@ string Iwa_TiledParticlesFx::getAlias(double frame, const TRenderSettings &info) alias += ","; } - string paramalias(""); + std::string paramalias(""); for (int i = 0; i < getParams()->getParamCount(); ++i) { TParam *param = getParams()->getParam(i); paramalias += param->getName() + "=" + param->getValueAlias(frame, 3); @@ -339,8 +339,8 @@ string Iwa_TiledParticlesFx::getAlias(double frame, const TRenderSettings &info) bool Iwa_TiledParticlesFx::allowUserCacheOnPort(int portNum) { // Only control port are currently allowed to cache upon explicit user's request - string tmpName = getInputPortName(portNum); - return tmpName.find("Control") != string::npos; + std::string tmpName = getInputPortName(portNum); + return tmpName.find("Control") != std::string::npos; } //------------------------------------------------------------------ @@ -365,7 +365,7 @@ void Iwa_TiledParticlesFx::doDryCompute(TRectD &rect, double frame, const TRende for (j = 0; j < inputPortCount; ++j) { TFxPort *port = getInputPort(j); - string tmpName = getInputPortName(j); + std::string tmpName = getInputPortName(j); if (port->isConnected()) { TRasterFxP fx = port->getFx(); @@ -393,19 +393,19 @@ void Iwa_TiledParticlesFx::doDryCompute(TRectD &rect, double frame, const TRende void Iwa_TiledParticlesFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) { - vector lastframe; - vector partLevel; + std::vector lastframe; + std::vector partLevel; TPointD p_offset; TDimension p_size(0, 0); /*- 参照画像ポートの取得 -*/ - vector part_ports; /*- テクスチャ素材画像のポート -*/ - map ctrl_ports; /*- コントロール画像のポート番号/ポート -*/ + std::vector part_ports; /*- テクスチャ素材画像のポート -*/ + std::map ctrl_ports; /*- コントロール画像のポート番号/ポート -*/ int portsCount = this->getInputPortCount(); for (int i = 0; i < portsCount; ++i) { - string tmpName = this->getInputPortName(i); + std::string tmpName = this->getInputPortName(i); QString portName = QString::fromStdString(tmpName); if (portName.startsWith("T")) { diff --git a/toonz/sources/stdfx/iwa_particlesfx.h b/toonz/sources/stdfx/iwa_particlesfx.h index 7c2f49e..84ceb93 100644 --- a/toonz/sources/stdfx/iwa_particlesfx.h +++ b/toonz/sources/stdfx/iwa_particlesfx.h @@ -161,7 +161,7 @@ public: bool canHandle(const TRenderSettings &info, double frame) { return true; } bool allowUserCacheOnPort(int port); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); TFxTimeRegion getTimeRegion() const { return TFxTimeRegion::createUnlimited(); } diff --git a/toonz/sources/stdfx/iwa_tilefx.cpp b/toonz/sources/stdfx/iwa_tilefx.cpp index f138183..d67f0ca 100644 --- a/toonz/sources/stdfx/iwa_tilefx.cpp +++ b/toonz/sources/stdfx/iwa_tilefx.cpp @@ -280,14 +280,14 @@ void Iwa_TileFx::makeTile(const TTile &inputTile, const TTile &tile) tile.getRaster()->clear(); //Build the mirroring pattern. It obviously repeats itself out of 2x2 tile blocks. - map, TRasterP> mirrorRaster; - mirrorRaster[pair(false, false)] = inputTile.getRaster(); - mirrorRaster[pair(false, true)] = inputTile.getRaster()->clone(); - mirrorRaster[pair(false, true)]->yMirror(); - mirrorRaster[pair(true, false)] = inputTile.getRaster()->clone(); - mirrorRaster[pair(true, false)]->xMirror(); - mirrorRaster[pair(true, true)] = mirrorRaster[pair(true, false)]->clone(); - mirrorRaster[pair(true, true)]->yMirror(); + std::map, TRasterP> mirrorRaster; + mirrorRaster[std::pair(false, false)] = inputTile.getRaster(); + mirrorRaster[std::pair(false, true)] = inputTile.getRaster()->clone(); + mirrorRaster[std::pair(false, true)]->yMirror(); + mirrorRaster[std::pair(true, false)] = inputTile.getRaster()->clone(); + mirrorRaster[std::pair(true, false)]->xMirror(); + mirrorRaster[std::pair(true, true)] = mirrorRaster[std::pair(true, false)]->clone(); + mirrorRaster[std::pair(true, true)]->yMirror(); TPoint animatedPos = convert(inputTile.m_pos - tile.m_pos); TDimension inSize = inputTile.getRaster()->getSize(); @@ -346,7 +346,7 @@ void Iwa_TileFx::makeTile(const TTile &inputTile, const TTile &tile) do { do { if (checkIfThisTileShouldBeComptedOrNot(horizIndex, vertIndex)) { - pair doMirror(doMirroX && m_xMirror->getValue(), doMirroY && m_yMirror->getValue()); + std::pair doMirror(doMirroX && m_xMirror->getValue(), doMirroY && m_yMirror->getValue()); tile.getRaster()->copy(mirrorRaster[doMirror], startTilingPos); } diff --git a/toonz/sources/stdfx/motionblurfx.cpp b/toonz/sources/stdfx/motionblurfx.cpp index 7ee9da3..9575e0d 100644 --- a/toonz/sources/stdfx/motionblurfx.cpp +++ b/toonz/sources/stdfx/motionblurfx.cpp @@ -445,7 +445,7 @@ public: { } - string getAlias(double frame, const TRenderSettings &info) const + std::string getAlias(double frame, const TRenderSettings &info) const { unsigned long id = getIdentifier(); double value = m_intensity->getValue(frame); diff --git a/toonz/sources/stdfx/noisefx.cpp b/toonz/sources/stdfx/noisefx.cpp index 3537f04..a7b2546 100644 --- a/toonz/sources/stdfx/noisefx.cpp +++ b/toonz/sources/stdfx/noisefx.cpp @@ -43,7 +43,7 @@ public: } void doCompute(TTile &tile, double frame, const TRenderSettings &ri); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; bool canHandle(const TRenderSettings &info, double frame) { return true; } }; @@ -55,7 +55,7 @@ namespace template class RayleighNoise { - vector noise_buf; + std::vector noise_buf; public: RayleighNoise(double sigma, int seed = 0) @@ -167,9 +167,9 @@ void NoiseFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) } //------------------------------------------------------------------ -string NoiseFx::getAlias(double frame, const TRenderSettings &info) const +std::string NoiseFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -187,7 +187,7 @@ string NoiseFx::getAlias(double frame, const TRenderSettings &info) const } bool addframe = 0; - string paramalias(""); + std::string paramalias(""); for (i = 0; i < getParams()->getParamCount(); i++) { TParam *param = getParams()->getParam(i); paramalias += param->getName() + "=" + param->getValueAlias(frame, 3); diff --git a/toonz/sources/stdfx/palettefilterfx.cpp b/toonz/sources/stdfx/palettefilterfx.cpp index 92b32df..9a1b14c 100644 --- a/toonz/sources/stdfx/palettefilterfx.cpp +++ b/toonz/sources/stdfx/palettefilterfx.cpp @@ -63,8 +63,8 @@ void PaletteFilterFx::doDryCompute(TRectD &rect, double frame, if (!m_input.isConnected()) return; - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); TRenderSettings ri2(info); PaletteFilterFxRenderData *PaletteFilterData = new PaletteFilterFxRenderData; @@ -94,8 +94,8 @@ void PaletteFilterFx::doCompute(TTile &tile, double frame, const TRenderSettings if (!m_input.isConnected()) return; - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); TRenderSettings ri2(ri); PaletteFilterFxRenderData *PaletteFilterData = new PaletteFilterFxRenderData; diff --git a/toonz/sources/stdfx/particles.cpp b/toonz/sources/stdfx/particles.cpp index 8677a9d..824c3a7 100644 --- a/toonz/sources/stdfx/particles.cpp +++ b/toonz/sources/stdfx/particles.cpp @@ -26,14 +26,14 @@ void Particle::create_Animation(const particles_values &values, } //------------------------------------------------------------------ -Particle::Particle(int g_lifetime, int seed, map porttiles, const particles_values &values, - const particles_ranges &ranges, vector> &myregions, +Particle::Particle(int g_lifetime, int seed, std::map porttiles, const particles_values &values, + const particles_ranges &ranges, std::vector> &myregions, int howmany, int first, int level, int last, - vector> &myHistogram, - vector &myWeight) + std::vector> &myHistogram, + std::vector &myWeight) { double random_s_a_range, random_speed; - map imagereferences; + std::map imagereferences; random = TRandom(seed); double randomxreference = 0.0; double randomyreference = 0.0; @@ -230,7 +230,7 @@ void Particle::create_Swing(const particles_values &values, void Particle::create_Colors(const particles_values &values, const particles_ranges &ranges, - map porttiles) + std::map porttiles) { //TPixel32 color; @@ -599,7 +599,7 @@ void Particle::spread_color(TPixel32 &color, double range) } /*-----------------------------------------------------------------*/ -void Particle::move(map porttiles, const particles_values &values, const particles_ranges &ranges, +void Particle::move(std::map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, float windy, float xgravity, float ygravity, float dpicorr, int lastframe) @@ -607,7 +607,7 @@ void Particle::move(map porttiles, const particles_values &values, struct pos_dummy dummy; float frictx, fricty; //int time; - map imagereferences; + std::map imagereferences; dummy.x = dummy.y = dummy.a = 0.0; frictx = fricty = 0.0; diff --git a/toonz/sources/stdfx/particles.h b/toonz/sources/stdfx/particles.h index 6e7a17c..90a5f84 100644 --- a/toonz/sources/stdfx/particles.h +++ b/toonz/sources/stdfx/particles.h @@ -165,8 +165,8 @@ public: int seed; public: - Particle(int lifetime, int seed, const map porttiles, const particles_values &values, const particles_ranges &ranges, vector> &myregions, int howmany, int first, int level, int last, - vector> &myHistogram, vector &myWeight); + Particle(int lifetime, int seed, const std::map porttiles, const particles_values &values, const particles_ranges &ranges, std::vector> &myregions, int howmany, int first, int level, int last, + std::vector> &myHistogram, std::vector &myWeight); //Constructor ~Particle() {} //Destructor @@ -178,9 +178,9 @@ public: const particles_ranges &ranges, double randomxreference, double randomyreference); void create_Colors(const particles_values &values, - const particles_ranges &ranges, map porttiles); + const particles_ranges &ranges, std::map porttiles); - void move(const map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, + void move(const std::map porttiles, const particles_values &values, const particles_ranges &ranges, float windx, float windy, float xgravity, float ygravity, float dpi, int lastframe); void spread_color(TPixel32 &color, double range); diff --git a/toonz/sources/stdfx/particlesengine.cpp b/toonz/sources/stdfx/particlesengine.cpp index 57069f1..cb1ef13 100644 --- a/toonz/sources/stdfx/particlesengine.cpp +++ b/toonz/sources/stdfx/particlesengine.cpp @@ -33,9 +33,9 @@ Particles_Engine::Particles_Engine(ParticlesFx *parent, double frame) { } -void printTime(TStopWatch &sw, string name) +void printTime(TStopWatch &sw, std::string name) { - ostrstream ss; + std::ostrstream ss; ss << name << " : "; sw.print(ss); ss << '\n' << '\0'; @@ -181,7 +181,7 @@ void Particles_Engine::roll_particles( TTile *tile, std::map porttiles, const TRenderSettings &ri, std::list &myParticles, struct particles_values &values, float cx, float cy, int frame, int curr_frame, int level_n, bool *random_level, - float dpi, vector lastframe, int &totalparticles) + float dpi, std::vector lastframe, int &totalparticles) { particles_ranges ranges; int i, newparticles; @@ -194,12 +194,12 @@ void Particles_Engine::roll_particles( fill_range_struct(values, ranges); - vector> myregions; + std::vector> myregions; /*-- [1〜255] そのIndexに対応するアルファ値を持つピクセルのインデックス値を保存。 [0] 使用せず --*/ - vector> myHistogram; + std::vector> myHistogram; /*-- アルファ値255から下がっていき、ピクセル数×重み又はアルファ値を次々足した値を格納 --*/ - vector myWeight; + std::vector myWeight; std::map::iterator it = porttiles.find(values.source_ctrl_val); /*-- Perspective DistributionがONのとき、Sizeに刺さったControlImageが粒子の発生分布を決める --*/ @@ -385,10 +385,10 @@ void Particles_Engine::render_particles( const TRenderSettings &ri, TDimension &p_size, TPointD &p_offset, std::map ctrl_ports, - vector partLevel, + std::vector partLevel, float dpi, int curr_frame, int shrink, double startx, double starty, - double endx, double endy, vector last_frame, + double endx, double endy, std::vector last_frame, unsigned long fxId) { int frame, startframe, intpart = 0, level_n = 0; @@ -455,7 +455,7 @@ void Particles_Engine::render_particles( fractpart = fractpart - (int)fractpart; } - map porttiles; + std::map porttiles; // Perform the roll /*- RenderSettingsを複製して現在のフレームの計算用にする -*/ @@ -491,7 +491,7 @@ void Particles_Engine::render_particles( if (isPrecomputingEnabled) (*it->second)->allocateAndCompute(*tmp, bbox.getP00(), convert(bbox).getSize(), 0, r_frame, riAux); else { - string alias = "CTRL: " + (*(it->second))->getAlias(r_frame, riAux); + std::string alias = "CTRL: " + (*(it->second))->getAlias(r_frame, riAux); TRasterImageP rimg = TImageCache::instance()->get(alias, false); if (rimg) { @@ -582,7 +582,7 @@ void Particles_Engine::do_render(TFlash *flash, Particle *part, TTile *tile, std::vector part_ports, std::map porttiles, const TRenderSettings &ri, - TDimension &p_size, TPointD &p_offset, int lastframe, vector partLevel, + TDimension &p_size, TPointD &p_offset, int lastframe, std::vector partLevel, struct particles_values &values, double opacity_range, int dist_frame, std::map, double> &partScales) { @@ -592,7 +592,7 @@ void Particles_Engine::do_render(TFlash *flash, Particle *part, TTile *tile, TRasterP tileRas(tile->getRaster()); - string levelid; + std::string levelid; double aim_angle = 0; if (values.pathaim_val) { double arctan = atan2(part->vy, part->vx); @@ -664,7 +664,7 @@ void Particles_Engine::do_render(TFlash *flash, Particle *part, TTile *tile, } else { TRasterP ras; - string alias; + std::string alias; TRasterImageP rimg; if (rimg = partLevel[part->level]->frame(ndx)) { ras = rimg->getRaster(); @@ -751,7 +751,7 @@ void Particles_Engine::do_render(TFlash *flash, Particle *part, TTile *tile, /*-----------------------------------------------------------------*/ void Particles_Engine::fill_array(TTile *ctrl1, int ®ioncount, - vector &myarray, vector &lista, vector &listb, int threshold) + std::vector &myarray, std::vector &lista, std::vector &listb, int threshold) { int pr = 0; @@ -782,7 +782,7 @@ void Particles_Engine::fill_array(TTile *ctrl1, int ®ioncount, for (i = 0, pix = raster32->pixels(j); i < lx; i++, pix++) { /*TMSG_INFO("j=%d i=%d\n", j, i);*/ if (pix->m > threshold) { - vector mask(4); + std::vector mask(4); pr++; /* l,ul,u,ur;*/ if (i) { @@ -821,13 +821,12 @@ void Particles_Engine::fill_array(TTile *ctrl1, int ®ioncount, /*-----------------------------------------------------------------*/ -void Particles_Engine::normalize_array(vector> &myregions, TPointD pos, int lx, int ly, int - regioncounter, - vector &myarray, vector &lista, vector &listb, vector &final) +void Particles_Engine::normalize_array(std::vector> &myregions, TPointD pos, int lx, int ly, int regioncounter, + std::vector &myarray, std::vector &lista, std::vector &listb, std::vector &final) { int i, j, k, l; - vector tmp; + std::vector tmp; int maxregioncounter = 0; int listsize = (int)lista.size(); //TMSG_INFO("regioncounter %d, eqcount=%d\n", regioncounter, eqcount); @@ -893,7 +892,7 @@ void Particles_Engine::normalize_array(vector> &myregions, TPoin /*-----------------------------------------------------------------*/ /*- multiがONのときのSource画像(ctrl1)の領域を分析 -*/ -void Particles_Engine::fill_subregions(int cont_index, vector> &myregions, TTile *ctrl1, int thres) +void Particles_Engine::fill_subregions(int cont_index, std::vector> &myregions, TTile *ctrl1, int thres) { int regioncounter = 0; @@ -901,22 +900,22 @@ void Particles_Engine::fill_subregions(int cont_index, vector> & int lx = ctrl1->getRaster()->getLx(); int ly = ctrl1->getRaster()->getLy(); - vector myarray(lx * ly); - vector lista; - vector listb; + std::vector myarray(lx * ly); + std::vector lista; + std::vector listb; fill_array(ctrl1, regioncounter, myarray, lista, listb, thres); if (regioncounter) { - vector final(regioncounter + 1); + std::vector final(regioncounter + 1); normalize_array(myregions, ctrl1->m_pos, lx, ly, regioncounter, myarray, lista, listb, final); } } /*-----------------------------------------------------------------*/ /*- 入力画像のアルファ値に比例して発生濃度を変える。各Pointにウェイトを持たせる -*/ -void Particles_Engine::fill_single_region(vector> &myregions, TTile *ctrl1, int threshold, - bool do_source_gradation, vector> &myHistogram) +void Particles_Engine::fill_single_region(std::vector> &myregions, TTile *ctrl1, int threshold, + bool do_source_gradation, std::vector> &myHistogram) { TRaster32P raster32 = ctrl1->getRaster(); @@ -957,7 +956,7 @@ void Particles_Engine::fill_single_region(vector> &myregions, TT } } else { for (int i = 0; i < 256; i++) - myHistogram.push_back(vector()); + myHistogram.push_back(std::vector()); TRandom rand = TRandom(1); for (j = 0; j < raster32->getLy(); j++) { @@ -995,8 +994,8 @@ void Particles_Engine::fill_single_region(vector> &myregions, TT /*-----------------------------------------------------------------*/ /*- 入力画像のアルファ値に比例して発生濃度を変える。Histogramを格納しながら領域を登録 -*/ -void Particles_Engine::fill_regions(int frame, vector> &myregions, TTile *ctrl1, bool multi, int thres, - bool do_source_gradation, vector> &myHistogram) +void Particles_Engine::fill_regions(int frame, std::vector> &myregions, TTile *ctrl1, bool multi, int thres, + bool do_source_gradation, std::vector> &myHistogram) { TRaster32P ctrl1ras = ctrl1->getRaster(); if (!ctrl1ras) @@ -1019,8 +1018,8 @@ void Particles_Engine::fill_regions(int frame, vector> &myregion そのとき、SourceのControlが刺さっている場合は、マスクとして用いられる --*/ -void Particles_Engine::fill_regions_with_size_map(vector> &myregions, - vector> &myHistogram, +void Particles_Engine::fill_regions_with_size_map(std::vector> &myregions, + std::vector> &myHistogram, TTile *sizeTile, TTile *sourceTile, int thres) @@ -1040,7 +1039,7 @@ void Particles_Engine::fill_regions_with_size_map(vector> &myreg myregions.resize(1); myregions[0].clear(); for (int i = 0; i < 256; i++) - myHistogram.push_back(vector()); + myHistogram.push_back(std::vector()); for (int j = 0; j < sizeRas->getLy(); j++) { diff --git a/toonz/sources/stdfx/particlesengine.h b/toonz/sources/stdfx/particlesengine.h index 7e311de..0c3126c 100644 --- a/toonz/sources/stdfx/particlesengine.h +++ b/toonz/sources/stdfx/particlesengine.h @@ -25,19 +25,19 @@ public: struct particles_ranges &ranges); void fill_value_struct(struct particles_values &value, double frame); void roll_particles(TTile *tile, std::map porttiles, const TRenderSettings &ri, std::list &myParticles, struct particles_values &values, - float cx, float cy, int frame, int curr_frame, int level_n, bool *random_level, float dpi, vector lastframe, int &totalparticles); + float cx, float cy, int frame, int curr_frame, int level_n, bool *random_level, float dpi, std::vector lastframe, int &totalparticles); void normalize_values(struct particles_values &values, const TRenderSettings &ri); void render_particles( TFlash *flash, TTile *tile, std::vector part_ports, const TRenderSettings &ri, - TDimension &p_size, TPointD &p_offset, std::map ctrl_ports, vector partLevel, float dpi, + TDimension &p_size, TPointD &p_offset, std::map ctrl_ports, std::vector partLevel, float dpi, int curr_frame, int shrink, double startx, double starty, - double endx, double endy, vector lastframe, unsigned long fxId); + double endx, double endy, std::vector lastframe, unsigned long fxId); void do_render( TFlash *flash, Particle *part, TTile *tile, std::vector part_ports, std::map porttiles, const TRenderSettings &ri, - TDimension &p_size, TPointD &p_offset, int lastframe, vector partLevel, + TDimension &p_size, TPointD &p_offset, int lastframe, std::vector partLevel, struct particles_values &values, double opacity_range, int curr_frame, std::map, double> &partScales); @@ -45,27 +45,27 @@ public: /*- do_source_gradationがONのとき、入力画像のアルファ値に比例して発生濃度を変える。 入力画像のHistogramを格納しながら領域を登録する -*/ - void fill_regions(int frame, vector> &myregions, TTile *ctrl1, bool multi, int thres, + void fill_regions(int frame, std::vector> &myregions, TTile *ctrl1, bool multi, int thres, bool do_source_gradation, - vector> &myHistogram); + std::vector> &myHistogram); - void fill_single_region(vector> &myregions, TTile *ctrl1, int thres, + void fill_single_region(std::vector> &myregions, TTile *ctrl1, int thres, bool do_source_gradation, - vector> &myHistogram); + std::vector> &myHistogram); /*-- Perspective DistributionがONのとき、Sizeに刺さったControlImageが粒子の発生分布を決める。 そのとき、SourceのControlが刺さっている場合は、マスクとして用いられる --*/ - void fill_regions_with_size_map(vector> &myregions, - vector> &myHistogram, + void fill_regions_with_size_map(std::vector> &myregions, + std::vector> &myHistogram, TTile *sizeTile, TTile *sourceTile, int thres); - void fill_subregions(int cont_index, vector> &myregions, TTile *ctrl1, int thres); + void fill_subregions(int cont_index, std::vector> &myregions, TTile *ctrl1, int thres); - void normalize_array(vector> &myregions, TPointD pos, int lx, int ly, int regioncounter, vector &myarray, vector &lista, vector &listb, vector &final); + void normalize_array(std::vector> &myregions, TPointD pos, int lx, int ly, int regioncounter, std::vector &myarray, std::vector &lista, std::vector &listb, std::vector &final); - void fill_array(TTile *ctrl1, int ®ioncount, vector &myarray, vector &lista, vector &listb, int thres); + void fill_array(TTile *ctrl1, int ®ioncount, std::vector &myarray, std::vector &lista, std::vector &listb, int thres); }; #endif diff --git a/toonz/sources/stdfx/particlesfx.cpp b/toonz/sources/stdfx/particlesfx.cpp index 50973b4..99dcb48 100644 --- a/toonz/sources/stdfx/particlesfx.cpp +++ b/toonz/sources/stdfx/particlesfx.cpp @@ -236,9 +236,9 @@ bool ParticlesFx::doGetBBox(double frame, TRectD &bBox, const TRenderSettings &i //------------------------------------------------------------------ -string ParticlesFx::getAlias(double frame, const TRenderSettings &info) const +std::string ParticlesFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -253,7 +253,7 @@ string ParticlesFx::getAlias(double frame, const TRenderSettings &info) const alias += ","; } - string paramalias(""); + std::string paramalias(""); for (int i = 0; i < getParams()->getParamCount(); ++i) { TParam *param = getParams()->getParam(i); paramalias += param->getName() + "=" + param->getValueAlias(frame, 3); @@ -267,8 +267,8 @@ string ParticlesFx::getAlias(double frame, const TRenderSettings &info) const bool ParticlesFx::allowUserCacheOnPort(int portNum) { // Only control port are currently allowed to cache upon explicit user's request - string tmpName = getInputPortName(portNum); - return tmpName.find("Control") != string::npos; + std::string tmpName = getInputPortName(portNum); + return tmpName.find("Control") != std::string::npos; } //------------------------------------------------------------------ @@ -290,7 +290,7 @@ void ParticlesFx::doDryCompute(TRectD &rect, double frame, const TRenderSettings for (j = 0; j < inputPortCount; ++j) { TFxPort *port = getInputPort(j); - string tmpName = getInputPortName(j); + std::string tmpName = getInputPortName(j); if (port->isConnected()) { TRasterFxP fx = port->getFx(); @@ -318,19 +318,19 @@ void ParticlesFx::doDryCompute(TRectD &rect, double frame, const TRenderSettings void ParticlesFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) { - vector lastframe; - vector partLevel; + std::vector lastframe; + std::vector partLevel; TPointD p_offset; TDimension p_size(0, 0); /*-- 参照画像ポートの取得 --*/ - vector part_ports; /*- テクスチャ素材画像のポート -*/ - map ctrl_ports; /*- コントロール画像のポート番号/ポート -*/ + std::vector part_ports; /*- テクスチャ素材画像のポート -*/ + std::map ctrl_ports; /*- コントロール画像のポート番号/ポート -*/ int portsCount = this->getInputPortCount(); for (int i = 0; i < portsCount; ++i) { - string tmpName = this->getInputPortName(i); + std::string tmpName = this->getInputPortName(i); QString portName = QString::fromStdString(tmpName); if (portName.startsWith("T")) { diff --git a/toonz/sources/stdfx/particlesfx.h b/toonz/sources/stdfx/particlesfx.h index 1005f45..9e33820 100644 --- a/toonz/sources/stdfx/particlesfx.h +++ b/toonz/sources/stdfx/particlesfx.h @@ -130,7 +130,7 @@ public: bool canHandle(const TRenderSettings &info, double frame) { return true; } bool allowUserCacheOnPort(int port); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; bool doGetBBox(double frame, TRectD &bBox, const TRenderSettings &info); TFxTimeRegion getTimeRegion() const { return TFxTimeRegion::createUnlimited(); } diff --git a/toonz/sources/stdfx/posterizefx.cpp b/toonz/sources/stdfx/posterizefx.cpp index df1553b..c1c37a1 100644 --- a/toonz/sources/stdfx/posterizefx.cpp +++ b/toonz/sources/stdfx/posterizefx.cpp @@ -6,7 +6,7 @@ namespace { template -void prepare_lut(int levels, vector &lut) +void prepare_lut(int levels, std::vector &lut) { int i, j; int valuestep = PIXEL::maxChannelValue / (levels - 1); @@ -58,7 +58,7 @@ public: template void doPosterize(TRasterPT ras, int levels) { - vector solarize_lut(PIXEL::maxChannelValue + 1); + std::vector solarize_lut(PIXEL::maxChannelValue + 1); prepare_lut(levels, solarize_lut); int j; diff --git a/toonz/sources/stdfx/saltpeppernoisefx.cpp b/toonz/sources/stdfx/saltpeppernoisefx.cpp index 9eb4fcf..703206f 100644 --- a/toonz/sources/stdfx/saltpeppernoisefx.cpp +++ b/toonz/sources/stdfx/saltpeppernoisefx.cpp @@ -40,7 +40,7 @@ public: } void doCompute(TTile &tile, double frame, const TRenderSettings &ri); - string getAlias(double frame, const TRenderSettings &info) const; + std::string getAlias(double frame, const TRenderSettings &info) const; bool canHandle(const TRenderSettings &info, double frame) { return true; } }; @@ -99,9 +99,9 @@ void SaltPepperNoiseFx::doCompute(TTile &tile, double frame, const TRenderSettin } //------------------------------------------------------------------ -string SaltPepperNoiseFx::getAlias(double frame, const TRenderSettings &info) const +std::string SaltPepperNoiseFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -119,7 +119,7 @@ string SaltPepperNoiseFx::getAlias(double frame, const TRenderSettings &info) co } bool addframe = 0; - string paramalias(""); + std::string paramalias(""); for (i = 0; i < getParams()->getParamCount(); i++) { TParam *param = getParams()->getParam(i); paramalias += param->getName() + "=" + param->getValueAlias(frame, 3); diff --git a/toonz/sources/stdfx/solarizefx.cpp b/toonz/sources/stdfx/solarizefx.cpp index 38981f3..0277bb2 100644 --- a/toonz/sources/stdfx/solarizefx.cpp +++ b/toonz/sources/stdfx/solarizefx.cpp @@ -8,7 +8,7 @@ namespace { template -void prepare_lut(double max, int edge, vector &lut) +void prepare_lut(double max, int edge, std::vector &lut) { double aux = (double)PIXEL::maxChannelValue; int i = 0; @@ -81,7 +81,7 @@ void update_param(T ¶m, TRaster64P ras) template void doSolarize(TRasterPT ras, double max, int edge) { - vector solarize_lut(PIXEL::maxChannelValue + 1); + std::vector solarize_lut(PIXEL::maxChannelValue + 1); update_param(max, ras); update_param(edge, ras); diff --git a/toonz/sources/stdfx/stdfx.h b/toonz/sources/stdfx/stdfx.h index 2a4e1cf..9f6b2d0 100644 --- a/toonz/sources/stdfx/stdfx.h +++ b/toonz/sources/stdfx/stdfx.h @@ -12,7 +12,7 @@ class PaletteFilterFxRenderData; -static const string PLUGIN_PREFIX("STD"); +static const std::string PLUGIN_PREFIX("STD"); #define FX_PLUGIN_DECLARATION(T) \ public: \ @@ -50,7 +50,7 @@ public: \ class TStandardRasterFx : public TRasterFx { public: - string getPluginId() const { return PLUGIN_PREFIX; } + std::string getPluginId() const { return PLUGIN_PREFIX; } }; //------------------------------------------------------------------- @@ -58,7 +58,7 @@ public: class TStandardZeraryFx : public TZeraryFx { public: - string getPluginId() const { return PLUGIN_PREFIX; } + std::string getPluginId() const { return PLUGIN_PREFIX; } }; //------------------------------------------------------------------- diff --git a/toonz/sources/stdfx/texturefx.cpp b/toonz/sources/stdfx/texturefx.cpp index c16051e..4eb34b7 100644 --- a/toonz/sources/stdfx/texturefx.cpp +++ b/toonz/sources/stdfx/texturefx.cpp @@ -75,8 +75,8 @@ void TextureFx::doDryCompute(TRectD &rect, double frame, const TRenderSettings & if (!m_input.isConnected()) return; - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); TRenderSettings ri2(info); PaletteFilterFxRenderData *PaletteFilterData = new PaletteFilterFxRenderData; @@ -124,8 +124,8 @@ void TextureFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) TTile invertMaskTile; //carico il vettore items con gli indici dei colori - vector items; - string indexes = toString(m_string->getValue()); + std::vector items; + std::string indexes = toString(m_string->getValue()); parseIndexes(indexes, items); //genero il tile il cui raster contiene l'immagine in input a cui sono stati tolti i pixel diff --git a/toonz/sources/stdfx/tilefx.cpp b/toonz/sources/stdfx/tilefx.cpp index 4431d22..42fb95e 100644 --- a/toonz/sources/stdfx/tilefx.cpp +++ b/toonz/sources/stdfx/tilefx.cpp @@ -174,14 +174,14 @@ void TileFx::doCompute(TTile &tile, double frame, const TRenderSettings &ri) void TileFx::makeTile(const TTile &inputTile, const TTile &tile) const { //Build the mirroring pattern. It obviously repeats itself out of 2x2 tile blocks. - map, TRasterP> mirrorRaster; - mirrorRaster[pair(false, false)] = inputTile.getRaster(); - mirrorRaster[pair(false, true)] = inputTile.getRaster()->clone(); - mirrorRaster[pair(false, true)]->yMirror(); - mirrorRaster[pair(true, false)] = inputTile.getRaster()->clone(); - mirrorRaster[pair(true, false)]->xMirror(); - mirrorRaster[pair(true, true)] = mirrorRaster[pair(true, false)]->clone(); - mirrorRaster[pair(true, true)]->yMirror(); + std::map, TRasterP> mirrorRaster; + mirrorRaster[std::pair(false, false)] = inputTile.getRaster(); + mirrorRaster[std::pair(false, true)] = inputTile.getRaster()->clone(); + mirrorRaster[std::pair(false, true)]->yMirror(); + mirrorRaster[std::pair(true, false)] = inputTile.getRaster()->clone(); + mirrorRaster[std::pair(true, false)]->xMirror(); + mirrorRaster[std::pair(true, true)] = mirrorRaster[std::pair(true, false)]->clone(); + mirrorRaster[std::pair(true, true)]->yMirror(); TPoint animatedPos = convert(inputTile.m_pos - tile.m_pos); TDimension inSize = inputTile.getRaster()->getSize(); @@ -217,7 +217,7 @@ void TileFx::makeTile(const TTile &inputTile, const TTile &tile) const TPoint startTilingPos = animatedPos; do { do { - pair doMirror(doMirroX && m_xMirror->getValue(), doMirroY && m_yMirror->getValue()); + std::pair doMirror(doMirroX && m_xMirror->getValue(), doMirroY && m_yMirror->getValue()); tile.getRaster()->copy(mirrorRaster[doMirror], startTilingPos); startTilingPos.x += inSize.lx; doMirroX = !doMirroX; diff --git a/toonz/sources/stdfx/tonecurvefx.cpp b/toonz/sources/stdfx/tonecurvefx.cpp index dcb6f8e..22e6146 100644 --- a/toonz/sources/stdfx/tonecurvefx.cpp +++ b/toonz/sources/stdfx/tonecurvefx.cpp @@ -39,7 +39,7 @@ int getLinearYfromX(TSegment t, int x, double &s0, double &s1) } template -void fill_lut(QList points, vector &lut, bool isLinear) +void fill_lut(QList points, std::vector &lut, bool isLinear) { int i; TPointD p0 = points.at(0); @@ -181,12 +181,12 @@ void doToneCurveFx(TRasterPT ras, double frame, const TToneCurveParam *to } } - vector rgbaLut(PIXEL::maxChannelValue + 1); - vector rgbLut(PIXEL::maxChannelValue + 1); - vector rLut(PIXEL::maxChannelValue + 1); - vector gLut(PIXEL::maxChannelValue + 1); - vector bLut(PIXEL::maxChannelValue + 1); - vector aLut(PIXEL::maxChannelValue + 1); + std::vector rgbaLut(PIXEL::maxChannelValue + 1); + std::vector rgbLut(PIXEL::maxChannelValue + 1); + std::vector rLut(PIXEL::maxChannelValue + 1); + std::vector gLut(PIXEL::maxChannelValue + 1); + std::vector bLut(PIXEL::maxChannelValue + 1); + std::vector aLut(PIXEL::maxChannelValue + 1); fill_lut(pointsList[0], rgbaLut, isLinear); fill_lut(pointsList[1], rgbLut, isLinear); diff --git a/toonz/sources/tcomposer/tcomposer.cpp b/toonz/sources/tcomposer/tcomposer.cpp index 81a5c86..e8946e0 100644 --- a/toonz/sources/tcomposer/tcomposer.cpp +++ b/toonz/sources/tcomposer/tcomposer.cpp @@ -473,7 +473,7 @@ std::pair generateMovie(ToonzScene *scene, exit(1); } } -#endif; +#endif double cameraXDpi, cameraYDpi; TPointD camDpi = scene->getCurrentCamera()->getDpi(); diff --git a/toonz/sources/tnzbase/permissionsmanager.cpp b/toonz/sources/tnzbase/permissionsmanager.cpp index 635d717..9ed70a2 100644 --- a/toonz/sources/tnzbase/permissionsmanager.cpp +++ b/toonz/sources/tnzbase/permissionsmanager.cpp @@ -17,22 +17,22 @@ namespace class User { public: - string m_name; - std::vector m_svnUsernames; - std::vector m_svnPasswords; - User(string name) : m_name(name) {} + std::string m_name; + std::vector m_svnUsernames; + std::vector m_svnPasswords; + User(std::string name) : m_name(name) {} - void addSvnUsername(string username) { m_svnUsernames.push_back(username); } - void addSvnPassword(string password) { m_svnPasswords.push_back(password); } + void addSvnUsername(std::string username) { m_svnUsernames.push_back(username); } + void addSvnPassword(std::string password) { m_svnPasswords.push_back(password); } - string getSvnUsername(int index) + std::string getSvnUsername(int index) { if (index < 0 || index >= (int)m_svnUsernames.size()) return ""; return m_svnUsernames.at(index); } - string getSvnPassword(int index) + std::string getSvnPassword(int index) { if (index < 0 || index >= (int)m_svnPasswords.size()) return ""; @@ -47,7 +47,7 @@ public: class PermissionsManager::Imp { public: - std::map m_users; + std::map m_users; // utente corrente User *m_user; @@ -63,14 +63,14 @@ public: ~Imp() { - for (std::map::iterator u = m_users.begin(); + for (std::map::iterator u = m_users.begin(); u != m_users.end(); ++u) delete u->second; } - User *findUser(string userName, bool create = true) + User *findUser(std::string userName, bool create = true) { - std::map::iterator i = m_users.find(userName); + std::map::iterator i = m_users.find(userName); if (i != m_users.end()) return i->second; if (!create) @@ -80,7 +80,7 @@ public: return user; } - string getSVNUserName(int index) + std::string getSVNUserName(int index) { User *user = findUser(TSystem::getUserName().toStdString(), false); if (!user) @@ -90,7 +90,7 @@ public: return user->getSvnUsername(index); } - string getSVNPassword(int index) + std::string getSVNPassword(int index) { User *user = findUser(TSystem::getUserName().toStdString(), false); if (!user) @@ -116,7 +116,7 @@ void PermissionsManager::Imp::loadPermissions() if (!is) return; - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "permissions") return; @@ -125,7 +125,7 @@ void PermissionsManager::Imp::loadPermissions() while (is.matchTag(tagName)) { if (tagName != "user") return; - string userName; + std::string userName; is.getTagParam("name", userName); if (userName == "") return; @@ -135,9 +135,9 @@ void PermissionsManager::Imp::loadPermissions() // is no longer used is.skipCurrentTag(); } else if (tagName == "svn") { - string name; + std::string name; is.getTagParam("name", name); - string password; + std::string password; is.getTagParam("password", password); user->addSvnUsername(name); user->addSvnPassword(password); diff --git a/toonz/sources/tnzbase/stringtable.cpp b/toonz/sources/tnzbase/stringtable.cpp index 096819c..18d4f9c 100644 --- a/toonz/sources/tnzbase/stringtable.cpp +++ b/toonz/sources/tnzbase/stringtable.cpp @@ -20,9 +20,9 @@ class TStringTableImp : public TStringTable public: bool m_initialized; - map m_table; - std::pair m_defaultFontNameAndSize; - string m_defaultMacFontName; + std::map m_table; + std::pair m_defaultFontNameAndSize; + std::string m_defaultMacFontName; TStringTableImp(); ~TStringTableImp(); @@ -34,12 +34,12 @@ public: void loadCoded(const TFilePath &); void saveCoded(const TFilePath &); - const Item *getItem(string name) const; - std::pair getDefaultFontNameAndSize() const + const Item *getItem(std::string name) const; + std::pair getDefaultFontNameAndSize() const { return m_defaultFontNameAndSize; } - string getDefaultMacFontName() const; + std::string getDefaultMacFontName() const; }; //------------------------------------------------------------------- @@ -74,7 +74,7 @@ void TStringTableImp::init() //------------------------------------------------------------------- -string TStringTableImp::getDefaultMacFontName() const +std::string TStringTableImp::getDefaultMacFontName() const { return m_defaultMacFontName; } @@ -99,7 +99,7 @@ int readShort(Tifstream &is) //------------------------------------------------------------------- -void writeString(Tofstream &os, string s) +void writeString(Tofstream &os, std::string s) { int len = s.length(); writeShort(os, len); @@ -111,7 +111,7 @@ void writeString(Tofstream &os, string s) //------------------------------------------------------------------- -string readString(Tifstream &is) +std::string readString(Tifstream &is) { int len = readShort(is); int len2 = len; @@ -120,12 +120,12 @@ string readString(Tifstream &is) char buffer[1204]; assert(len2 <= (int)(sizeof(buffer))); is.read(buffer, len2); - return string(buffer, len); + return std::string(buffer, len); } //------------------------------------------------------------------- -void writeStringW(Tofstream &os, wstring s) +void writeStringW(Tofstream &os, std::wstring s) { int len = s.length(); writeShort(os, len); @@ -134,13 +134,13 @@ void writeStringW(Tofstream &os, wstring s) //------------------------------------------------------------------- -wstring readStringW(Tifstream &is) +std::wstring readStringW(Tifstream &is) { int len = readShort(is); wchar_t buffer[1204]; assert(len <= (int)(sizeof(buffer))); is.read(reinterpret_cast(buffer), sizeof(wchar_t) * len); - return wstring(buffer, len); + return std::wstring(buffer, len); } //------------------------------------------------------------------- @@ -148,7 +148,7 @@ wstring readStringW(Tifstream &is) class TMagic //singleton { public: - string m_magic; + std::string m_magic; private: TMagic() @@ -166,7 +166,7 @@ public: }; #else -const string magic = "stab.001"; +const std::string magic = "stab.001"; #endif void TStringTableImp::loadCoded(const TFilePath &fp) @@ -187,7 +187,7 @@ void TStringTableImp::loadCoded(const TFilePath &fp) for (int i = 0; i < count; i++) { int m = readShort(is); assert(1 <= m && m <= 3); - string id = readString(is); + std::string id = readString(is); Item &item = m_table[id]; item.m_name = readStringW(is); if (m >= 2) { @@ -221,7 +221,7 @@ void TStringTableImp::saveCoded(const TFilePath &fp) writeString(os, m_defaultFontNameAndSize.first); writeShort(os, m_defaultFontNameAndSize.second); writeShort(os, m_table.size()); - for(std::map::iterator it = m_table.begin(); + for(std::map::iterator it = m_table.begin(); it != m_table.end(); ++it) { Item &item = it->second; @@ -256,7 +256,7 @@ void TStringTableImp::load(const TFilePath &fp) if (!is) throw TException("can't read string table "); - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "stringtable") throw TException("not a string table file"); @@ -264,7 +264,7 @@ void TStringTableImp::load(const TFilePath &fp) if (!is.matchTag(tagName)) throw TException("expected tag"); if (tagName == "item") { - string id, name, help, tip; + std::string id, name, help, tip; is >> id >> name; if (!is.matchEndTag()) { is >> help; @@ -279,14 +279,14 @@ void TStringTableImp::load(const TFilePath &fp) item.m_help = toWideString(help); item.m_tip = toWideString(tip); } else if (tagName == "defaultFont") { - string fontName; + std::string fontName; int fontSize = 0; is >> fontName >> fontSize; if (!is.matchEndTag()) throw TException("Expected end tag"); m_defaultFontNameAndSize = std::make_pair(fontName, fontSize); } else if (tagName == "defaultMacFont") { - string macFontName; + std::string macFontName; is >> macFontName; if (!is.matchEndTag()) throw TException("Expected end tag"); @@ -299,9 +299,9 @@ void TStringTableImp::load(const TFilePath &fp) //------------------------------------------------------------------- -const TStringTable::Item *TStringTableImp::getItem(string name) const +const TStringTable::Item *TStringTableImp::getItem(std::string name) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_table.find(name); if (it == m_table.end()) return 0; @@ -327,7 +327,7 @@ TStringTable::~TStringTable() //------------------------------------------------------------------- -wstring TStringTable::translate(string name) +std::wstring TStringTable::translate(std::string name) { const TStringTable::Item *item = instance()->getItem(name); if (item) diff --git a/toonz/sources/tnzbase/texternfx.cpp b/toonz/sources/tnzbase/texternfx.cpp index 1524b08..97bf97e 100644 --- a/toonz/sources/tnzbase/texternfx.cpp +++ b/toonz/sources/tnzbase/texternfx.cpp @@ -23,13 +23,13 @@ TFilePath getExternFxPath() //========================================================= // not implemented yet -void TExternFx::getNames(vector &names) +void TExternFx::getNames(std::vector &names) { } //========================================================= -TExternFx *TExternFx::create(string name) +TExternFx *TExternFx::create(std::string name) { TExternalProgramFx *fx = new TExternalProgramFx(name); return fx; @@ -37,7 +37,7 @@ TExternFx *TExternFx::create(string name) //========================================================= -TExternalProgramFx::TExternalProgramFx(string name) +TExternalProgramFx::TExternalProgramFx(std::string name) : m_externFxName(name) { initialize(name); @@ -62,14 +62,14 @@ TExternalProgramFx::~TExternalProgramFx() //------------------------------------------------------------------ -void TExternalProgramFx::initialize(string name) +void TExternalProgramFx::initialize(std::string name) { TFilePath fp = getExternFxPath() + (name + ".xml"); TIStream is(fp); if (!is) return; - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "externFx") return; @@ -77,25 +77,25 @@ void TExternalProgramFx::initialize(string name) while (is.matchTag(tagName)) { if (tagName == "executable") { TFilePath executable = TFilePath(is.getTagAttribute("path")); - string args = is.getTagAttribute("args"); + std::string args = is.getTagAttribute("args"); if (executable == TFilePath()) throw TException("missing executable path"); if (args == "") throw TException("missing args string"); setExecutable(executable, args); } else if (tagName == "inport" || tagName == "outport") { - string portName = is.getTagAttribute("name"); - string ext = is.getTagAttribute("ext"); + std::string portName = is.getTagAttribute("name"); + std::string ext = is.getTagAttribute("ext"); if (portName == "") throw TException("missing port name"); if (ext == "") throw TException("missing port ext"); addPort(portName, ext, tagName == "inport"); } else if (tagName == "param") { - string paramName = is.getTagAttribute("name"); + std::string paramName = is.getTagAttribute("name"); if (paramName == "") throw TException("missing param name"); - string type = is.getTagAttribute("type"); + std::string type = is.getTagAttribute("type"); if (type == "") throw TException("missing param type"); if (type != "double") @@ -117,7 +117,7 @@ void TExternalProgramFx::initialize(string name) //------------------------------------------------------------------ -void TExternalProgramFx::addPort(string portName, string ext, bool isInput) +void TExternalProgramFx::addPort(std::string portName, std::string ext, bool isInput) { if (isInput) { TRasterFxPort *port = new TRasterFxPort(); @@ -153,7 +153,7 @@ TFx *TExternalProgramFx::clone(bool recursive) const assert(getInputPortCount() == fx->getInputPortCount()); - //std::map::const_iterator j; + //std::map::const_iterator j; //for(j=m_ports.begin(); j!=m_ports.end(); ++j) // fx->addPort(j->first, j->second.m_ext, j->second.m_port != 0); @@ -166,7 +166,7 @@ TFx *TExternalProgramFx::clone(bool recursive) const } } - //std::map::const_iterator j; + //std::map::const_iterator j; //for(j=m_params.begin(); j!=m_params.end(); ++j) // fx->addParam(j->first, j->second->clone()); @@ -180,7 +180,7 @@ bool TExternalProgramFx::doGetBBox(double frame, TRectD &bBox, const TRenderSett // bBox = TRectD(-30,-30,30,30); // return true; - std::map::const_iterator portIt; + std::map::const_iterator portIt; for (portIt = m_ports.begin(); portIt != m_ports.end(); ++portIt) { if (portIt->second.m_port != 0) { TRasterFxPort *tmp; @@ -219,12 +219,12 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti TRaster32P ras = tile.getRaster(); if (!ras) return; - string args = m_args; - string executablePath = toString(m_executablePath.getWideString()); - std::map tmpFiles; // portname --> file + std::string args = m_args; + std::string executablePath = toString(m_executablePath.getWideString()); + std::map tmpFiles; // portname --> file TFilePath outputTmpFile; - std::map::const_iterator portIt; + std::map::const_iterator portIt; for (portIt = m_ports.begin(); portIt != m_ports.end(); ++portIt) { TFilePath fp = TSystem::getUniqueFile("externfx"); fp = fp.withType(portIt->second.m_ext); @@ -246,7 +246,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti int i = 0; for (;;) { i = args.find('$', i); - if (i == (int)string::npos) + if (i == (int)std::string::npos) break; int j = i + 1; int len = args.length(); @@ -262,11 +262,11 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti } // ho trovato una variabile int m = j - i - 1; - string name = args.substr(i + 1, m); + std::string name = args.substr(i + 1, m); // calcolo il valore. - string value; + std::string value; - std::map::const_iterator it; + std::map::const_iterator it; it = tmpFiles.find(name); if (it != tmpFiles.end()) { // e' una porta. il valore e' il nome del @@ -291,7 +291,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti // chiamare "m_executablePath args" // e leggere l'immagine scritta in outputTmpFile // poi cancellare tutto - string expandedargs; + std::string expandedargs; char buffer[1024]; #ifdef _WIN32 ExpandEnvironmentStrings(args.c_str(), buffer, 1024); @@ -326,7 +326,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti &exitCode); // termination status #else - string cmdline = executablePath + buffer; + std::string cmdline = executablePath + buffer; // int exitCode = system(cmdline.c_str()); #endif @@ -359,7 +359,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti } //butto i file temporanei creati - std::map::const_iterator fileIt; + std::map::const_iterator fileIt; for (fileIt = tmpFiles.begin(); fileIt != tmpFiles.end(); ++fileIt) { if (TFileStatus(fileIt->second).doesExist() == true) try { @@ -378,7 +378,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti void TExternalProgramFx::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "path") { is >> m_executablePath; @@ -391,7 +391,7 @@ void TExternalProgramFx::loadData(TIStream &is) while (is.matchTag(tagName)) { if (tagName == "param") { // assert(0); - string paramName = is.getTagAttribute("name"); + std::string paramName = is.getTagAttribute("name"); TDoubleParamP param = new TDoubleParam(); param->setName(paramName); m_params.push_back(param); @@ -403,12 +403,12 @@ void TExternalProgramFx::loadData(TIStream &is) } else if (tagName == "ports") { while (is.matchTag(tagName)) { if (tagName == "port") { - string name = is.getTagAttribute("name"); - string ext = is.getTagAttribute("ext"); + std::string name = is.getTagAttribute("name"); + std::string ext = is.getTagAttribute("ext"); addPort(name, ext, true); } else if (tagName == "outport") { - string name = is.getTagAttribute("name"); - string ext = is.getTagAttribute("ext"); + std::string name = is.getTagAttribute("name"); + std::string ext = is.getTagAttribute("ext"); addPort(name, ext, false); } else throw TException("unexpected tag " + tagName); @@ -428,19 +428,19 @@ void TExternalProgramFx::saveData(TOStream &os) os.child("args") << m_args; os.openChild("params"); for (int i = 0; i < getParams()->getParamCount(); i++) { - std::map attr; + std::map attr; attr["name"] = getParams()->getParamName(i); attr["type"] = "double"; os.openCloseChild("param", attr); } os.closeChild(); os.openChild("ports"); - std::map::iterator portIt; + std::map::iterator portIt; for (portIt = m_ports.begin(); portIt != m_ports.end(); ++portIt) { - std::map attr; + std::map attr; attr["name"] = portIt->second.m_name; attr["ext"] = portIt->second.m_ext; - string tagName = portIt->second.m_port == 0 ? "outport" : "port"; + std::string tagName = portIt->second.m_port == 0 ? "outport" : "port"; os.openCloseChild(tagName, attr); } os.closeChild(); @@ -460,18 +460,18 @@ void ExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSettin tile.getRaster()->clear(); return; } - string name1("C:\\temp\\uno..tif"); - string name2("C:\\temp\\due..tif"); - string outname("C:\\temp\\outfile.0001.jpg"); - string program("C:\\temp\\xdissolve.exe"); - string extension(".jpg"); + std::string name1("C:\\temp\\uno..tif"); + std::string name2("C:\\temp\\due..tif"); + std::string outname("C:\\temp\\outfile.0001.jpg"); + std::string program("C:\\temp\\xdissolve.exe"); + std::string extension(".jpg"); TFilePath programpath(program); m_input1->compute(tile, frame, ri); TFilePath fname1(name1); TFilePath fname2(name2); - string tmp1 = fname1.getName() + extension; - string tmp2 = fname2.getName() + extension; + std::string tmp1 = fname1.getName() + extension; + std::string tmp2 = fname2.getName() + extension; TFilePath tmpname1(fname1.getParentDir() + tmp1); TFilePath tmpname2(fname2.getParentDir() + tmp2); @@ -480,11 +480,11 @@ void ExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSettin m_input2->compute(tile, frame, ri); TImageWriter::save(tmpname2, tile.getRaster()); - string arglist = " -range1 1 1 -start2 1 -startout 1 "; + std::string arglist = " -range1 1 1 -start2 1 -startout 1 "; arglist += toString(tmpname1.getWideString()); arglist += " " + toString(tmpname2.getWideString()); arglist += " " + outname; - string cmdline = program + arglist; + std::string cmdline = program + arglist; #ifdef _WIN32 STARTUPINFO si; diff --git a/toonz/sources/tnzbase/tfxattributes.cpp b/toonz/sources/tnzbase/tfxattributes.cpp index dcd948d..78ed6f4 100644 --- a/toonz/sources/tnzbase/tfxattributes.cpp +++ b/toonz/sources/tnzbase/tfxattributes.cpp @@ -98,7 +98,7 @@ bool TFxAttributes::isContainedInGroup(int groupId) //---------------------------------------------------------------------- -void TFxAttributes::setGroupName(const wstring &name, int position) +void TFxAttributes::setGroupName(const std::wstring &name, int position) { int groupSelector = position < 0 ? m_groupSelector : position; assert(groupSelector >= 0 && groupSelector <= m_groupName.size()); @@ -107,7 +107,7 @@ void TFxAttributes::setGroupName(const wstring &name, int position) //---------------------------------------------------------------------- -wstring TFxAttributes::getGroupName(bool fromEditor) +std::wstring TFxAttributes::getGroupName(bool fromEditor) { int groupSelector = fromEditor ? m_groupSelector + 1 : m_groupSelector; return m_groupName.isEmpty() || @@ -119,7 +119,7 @@ wstring TFxAttributes::getGroupName(bool fromEditor) //---------------------------------------------------------------------- -QStack TFxAttributes::getGroupNameStack() +QStack TFxAttributes::getGroupNameStack() { return m_groupName; } @@ -181,7 +181,7 @@ int TFxAttributes::getEditingGroupId() //---------------------------------------------------------------------- -wstring TFxAttributes::getEditingGroupName() +std::wstring TFxAttributes::getEditingGroupName() { if (!isGrouped() || m_groupSelector + 1 >= m_groupName.size()) return L""; diff --git a/toonz/sources/tnzbase/tfxutil.cpp b/toonz/sources/tnzbase/tfxutil.cpp index 82e9c6f..555976d 100644 --- a/toonz/sources/tnzbase/tfxutil.cpp +++ b/toonz/sources/tnzbase/tfxutil.cpp @@ -12,7 +12,7 @@ void TFxUtil::setParam( const TFxP &fx, - string paramName, + std::string paramName, double value) { TDoubleParamP param = TParamP(fx->getParams()->getParam(paramName)); @@ -24,7 +24,7 @@ void TFxUtil::setParam( void TFxUtil::setParam( const TFxP &fx, - string paramName, + std::string paramName, TPixel32 color) { TPixelParamP param = TParamP(fx->getParams()->getParam(paramName)); diff --git a/toonz/sources/tnzbase/trasterfx.cpp b/toonz/sources/tnzbase/trasterfx.cpp index 5887879..31f4294 100644 --- a/toonz/sources/tnzbase/trasterfx.cpp +++ b/toonz/sources/tnzbase/trasterfx.cpp @@ -235,11 +235,11 @@ public: //----------------------------------------------------------- - string getAlias(double frame, const TRenderSettings &info) const + std::string getAlias(double frame, const TRenderSettings &info) const { //NOTE: TrFx are not present at this recursive level. Affines dealing is currently handled by inserting the //rendering affine AFTER a getAlias call. Ever. - string alias = getFxType(); + std::string alias = getFxType(); return alias + "[" + m_fx->getAlias(frame, info) + "]"; } @@ -363,7 +363,7 @@ class FxResourceBuilder : public ResourceBuilder TRectD m_outRect; public: - FxResourceBuilder(const string &resourceName, + FxResourceBuilder(const std::string &resourceName, const TRasterFxP &fx, const TRenderSettings &rs, double frame) : ResourceBuilder(resourceName, fx.getPointer(), frame, rs), m_rfx(fx), m_frame(frame), m_rs(&rs), m_currTile(0) {} @@ -481,7 +481,7 @@ public: bool m_isEnabled; TRenderSettings m_info; - string m_interactiveCacheId; + std::string m_interactiveCacheId; mutable TThread::Mutex m_mutex; //brutto TRasterFxImp() : m_cacheEnabled(false), m_isEnabled(true), m_cachedTile(0) @@ -603,9 +603,9 @@ int TRasterFx::getMemoryRequirement(const TRectD &rect, double frame, const TRen //-------------------------------------------------- -string TRasterFx::getAlias(double frame, const TRenderSettings &info) const +std::string TRasterFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; // alias degli effetti connessi alle porte di input separati da virgole @@ -685,7 +685,7 @@ void TRasterFx::dryCompute(TRectD &rect, return; } - string alias = getAlias(frame, info) + "[" + ::traduce(info.m_affine) + "][" + ::toString(info.m_bpp) + "]"; + std::string alias = getAlias(frame, info) + "[" + ::traduce(info.m_affine) + "][" + ::toString(info.m_bpp) + "]"; int renderStatus = TRenderer::instance().getRenderStatus(TRenderer::renderId()); TFxCacheManager *cacheManager = TFxCacheManager::instance(); @@ -870,7 +870,7 @@ void TRasterFx::compute(TTile &tile, double frame, TRectD tilePlacement = myConvert(tile.getRaster()->getBounds()) + tile.m_pos; //Build the fx result alias (in other words, its name) - string alias = getAlias(frame, info) + "[" + ::traduce(info.m_affine) + "][" + ::toString(info.m_bpp) + "]"; //To be moved below + std::string alias = getAlias(frame, info) + "[" + ::traduce(info.m_affine) + "][" + ::toString(info.m_bpp) + "]"; //To be moved below TRectD bbox; getBBox(frame, bbox, info); @@ -1054,9 +1054,9 @@ TRenderSettings::~TRenderSettings() //------------------------------------------------------------------------------ -string TRenderSettings::toString() const +std::string TRenderSettings::toString() const { - string ss = + std::string ss = ::toString(m_bpp) + ";" + ::toString(m_quality) + ";" + ::toString(m_gamma) + ";" + diff --git a/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp b/toonz/sources/tnzbase/tscanner/TScannerIO/TUSBScannerIO_W.cpp index e252bee..5fbc822 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, std::ostrstream &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; + std::ostrstream 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; + std::ostrstream os; os.freeze(false); os << "send: size=" << size << " wrote = " << count << " buf="; buf2printable(buffer, size, os); diff --git a/toonz/sources/tnzbase/tscanner/tscanner.cpp b/toonz/sources/tnzbase/tscanner/tscanner.cpp index 12338a6..d5bfea3 100644 --- a/toonz/sources/tnzbase/tscanner/tscanner.cpp +++ b/toonz/sources/tnzbase/tscanner/tscanner.cpp @@ -37,9 +37,9 @@ void TScanParam::update(const TScanParam &model) // //------------------------------------------------------------------- -const string BlackAndWhite = "Black & White"; -const string Graytones = "Graytones"; -const string Rgbcolors = "RGB Color"; +const std::string BlackAndWhite = "Black & White"; +const std::string Graytones = "Graytones"; +const std::string Rgbcolors = "RGB Color"; //------------------------------------------------------------------- @@ -149,7 +149,7 @@ void TScannerParameters::setMaxPaperSize(double maxWidth, double maxHeight) //----------------------------------------------------------------------------- -void TScannerParameters::setPaperFormat(string paperFormat) +void TScannerParameters::setPaperFormat(std::string paperFormat) { TPaperFormatManager *formatManager = TPaperFormatManager::instance(); assert(formatManager->isValidFormat(paperFormat)); @@ -198,7 +198,7 @@ void TScannerParameters::adaptToCurrentScanner() void TScannerParameters::saveData(TOStream &os) const { - std::map attr; + std::map attr; attr["fmt"] = m_paperFormat; os.openCloseChild("paper", attr); @@ -213,7 +213,7 @@ void TScannerParameters::saveData(TOStream &os) const } if (m_scanType != None) { - string scanTypeString = Rgbcolors; + std::string scanTypeString = Rgbcolors; switch (m_scanType) { case BW: scanTypeString = BlackAndWhite; @@ -259,22 +259,22 @@ void TScannerParameters::saveData(TOStream &os) const void TScannerParameters::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "dpi") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (isDouble(s)) m_dpi.m_value = (float)toDouble(s); } else if (tagName == "brightness") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (isDouble(s)) m_brightness.m_value = (float)toDouble(s); } else if (tagName == "threshold") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (isDouble(s)) m_threshold.m_value = (float)toDouble(s); } else if (tagName == "contrast") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (isDouble(s)) m_contrast.m_value = (float)toDouble(s); } else if (tagName == "autoFeeder") { @@ -282,7 +282,7 @@ void TScannerParameters::loadData(TIStream &is) } else if (tagName == "reverseOrder") { m_reverseOrder = true; } else if (tagName == "mode") { - string scanTypeString = is.getTagAttribute("value"); + std::string scanTypeString = is.getTagAttribute("value"); m_scanType = None; if (scanTypeString == BlackAndWhite) m_scanType = BW; @@ -291,7 +291,7 @@ void TScannerParameters::loadData(TIStream &is) else if (scanTypeString == Rgbcolors) m_scanType = RGB24; } else if (tagName == "paper") { - string paperFormat = is.getTagAttribute("fmt"); + std::string paperFormat = is.getTagAttribute("fmt"); if (paperFormat != "") setPaperFormat(paperFormat); } @@ -486,7 +486,7 @@ bool TScanner::isScanningCanceled() namespace { -const std::pair defaultPaperFormat("A4 paper", TDimensionD(210.00, 297.00)); +const std::pair defaultPaperFormat("A4 paper", TDimensionD(210.00, 297.00)); } //----------------------------------------------------------------------------- @@ -509,7 +509,7 @@ TPaperFormatManager *TPaperFormatManager::instance() //----------------------------------------------------------------------------- -void TPaperFormatManager::getFormats(std::vector &names) const +void TPaperFormatManager::getFormats(std::vector &names) const { for (FormatTable::const_iterator it = m_formats.begin(); it != m_formats.end(); ++it) @@ -518,7 +518,7 @@ void TPaperFormatManager::getFormats(std::vector &names) const //----------------------------------------------------------------------------- -TDimensionD TPaperFormatManager::getSize(string name) const +TDimensionD TPaperFormatManager::getSize(std::string name) const { FormatTable::const_iterator it = m_formats.find(name); if (it == m_formats.end()) @@ -529,7 +529,7 @@ TDimensionD TPaperFormatManager::getSize(string name) const //----------------------------------------------------------------------------- -bool TPaperFormatManager::isValidFormat(string name) const +bool TPaperFormatManager::isValidFormat(std::string name) const { FormatTable::const_iterator it = m_formats.find(name); return it != m_formats.end(); @@ -537,7 +537,7 @@ bool TPaperFormatManager::isValidFormat(string name) const //----------------------------------------------------------------------------- -string TPaperFormatManager::getDefaultFormat() const +std::string TPaperFormatManager::getDefaultFormat() const { return defaultPaperFormat.first; } @@ -549,7 +549,7 @@ void TPaperFormatManager::readPaperFormat(const TFilePath &path) if (path.getType() != "pap") return; Tifstream is(path); - string name; + std::string name; TDimensionD size(0, 0); while (is) { char buffer[1024]; @@ -573,17 +573,17 @@ void TPaperFormatManager::readPaperFormat(const TFilePath &path) for (k = j; k < i && buffer[k] == ' '; k++) { } - string value; + std::string value; if (k < i) - value = string(buffer + k, i - k); + value = std::string(buffer + k, i - k); if (buffer[0] == '#') { if (k < i && name == "") name = value; - } else if (string(buffer).find("WIDTH") == 0) { + } else if (std::string(buffer).find("WIDTH") == 0) { if (isDouble(value)) size.lx = toDouble(value); - } else if (string(buffer).find("LENGTH") == 0) { + } else if (std::string(buffer).find("LENGTH") == 0) { if (isDouble(value)) size.ly = toDouble(value); } diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp index bb2dda1..d696a2b 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp @@ -78,13 +78,13 @@ class TScannerExpection : public TException TString m_scannerMsg; public: - TScannerExpection(const vector ¬Fatal, const string &fatal) + TScannerExpection(const std::vector ¬Fatal, const std::string &fatal) : TException("Scanner Expection") { m_scannerMsg = toWideString(fatal); for (int i = notFatal.size(); i; i--) m_scannerMsg += toWideString("\n") + toWideString(notFatal[i - 1]); - log(string("Exception created: ") + toString(m_scannerMsg)); + log(std::string("Exception created: ") + toString(m_scannerMsg)); } TString getMessage() const { return m_scannerMsg; } }; @@ -133,7 +133,7 @@ TScannerEpson::~TScannerEpson() void TScannerEpson::selectDevice() { - log(string("selectDevice; isOpened=") + (m_isOpened ? "true" : "false")); + log(std::string("selectDevice; isOpened=") + (m_isOpened ? "true" : "false")); if (!m_scannerIO->open()) { log("open() failed"); throw TException("unable to get handle to scanner"); @@ -322,7 +322,7 @@ void TScannerEpson::acquire(const TScannerParameters ¶ms, int paperCount) bytes_to_read = lines * counter; if (stx != 0x02) { - ostrstream os; + std::ostrstream os; os << "header corrupted (" << std::hex << stx << ")" << '\0'; throw TException(os.str()); } @@ -421,7 +421,7 @@ void TScannerEpson::acquire(const TScannerParameters ¶ms, int paperCount) if ((m_settingsMode == NEW_STYLE) && params.m_paperFeeder.m_supported && (params.m_paperFeeder.m_value == 1.)) { if (!ESCI_command_1b('e', 1, true)) { - vector notFatal; + std::vector notFatal; throw TScannerExpection(notFatal, "Scanner error (un)loading paper"); } unsigned char p = 0x0C; @@ -451,7 +451,7 @@ void TScannerEpson::doSettings(const TScannerParameters ¶ms, bool firstSheet { log("doSettings"); int retryCount = 3; - vector notFatal; + std::vector notFatal; while (retryCount--) { if (m_settingsMode == NEW_STYLE) { @@ -649,7 +649,7 @@ if (!resetScanner()) #ifdef _DEBUG memcpy(&status, &(buffer2[1]), 1); - ostrstream os; + std::ostrstream os; os.freeze(false); os << "stx = " << stx << " status = " << status << " counter=" << counter << '\n' << '\0'; #endif @@ -738,7 +738,7 @@ bool TScannerEpson::resetScanner() { log("resetScanner"); bool ret = ESCI_command('@', true); - log(string("resetScanner: ") + (ret ? "OK" : "FAILED")); + log(std::string("resetScanner: ") + (ret ? "OK" : "FAILED")); return ret; } @@ -767,13 +767,13 @@ bool TScannerEpson::expectACK() #ifdef _DEBUG if (ack != ACK) { - ostrstream os; + std::ostrstream os; os.freeze(false); os << "ack fails ret = 0x" << std::hex << (int)ack << '\n' << '\0'; TSystem::outputDebug(os.str()); } #endif - log(string("expectACK: ") + (ack == ACK ? "ACK" : "FAILED")); + log(std::string("expectACK: ") + (ack == ACK ? "ACK" : "FAILED")); return (ack == ACK); } @@ -953,7 +953,7 @@ void TScannerEpson::ESCI_readLineData(unsigned char &stx, unsigned char &status, status = buffer[1]; #ifdef _DEBUG - ostrstream os; + std::ostrstream os; os.freeze(false); os << "fatal=" << fatalError; @@ -987,7 +987,7 @@ void TScannerEpson::ESCI_readLineData2(unsigned char &stx, unsigned char &status status = buffer[1]; #ifdef _DEBUG - ostrstream os; + std::ostrstream os; os.freeze(false); os << "fatal=" << fatalError; diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.h b/toonz/sources/tnzbase/tscanner/tscannerepson.h index dce9e55..5657fc5 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerepson.h +++ b/toonz/sources/tnzbase/tscanner/tscannerepson.h @@ -40,7 +40,7 @@ private: void doSettings(const TScannerParameters ¶ms, bool isFirstSheet); void collectInformation(char *lev0, char *lev1, unsigned short *lowRes, unsigned short *hiRes, unsigned short *hMax, unsigned short *vMax); bool resetScanner(); - void reportError(string errMsg); // debug only + void reportError(std::string errMsg); // debug only char *ESCI_inquiry(char cmd); /* returns 0 if failed */ bool ESCI_command(char cmd, bool checkACK); diff --git a/toonz/sources/tnzext/DeformationSelector.h b/toonz/sources/tnzext/DeformationSelector.h index b751ce7..19f1f8a 100644 --- a/toonz/sources/tnzext/DeformationSelector.h +++ b/toonz/sources/tnzext/DeformationSelector.h @@ -22,7 +22,7 @@ namespace ToonzExt class DeformationSelector { typedef std::pair Deformation; - vector ref_; + std::vector ref_; DeformationSelector(); DeformationSelector(const DeformationSelector &); diff --git a/toonz/sources/tnzext/OverallDesigner.cpp b/toonz/sources/tnzext/OverallDesigner.cpp index 41175f3..1c50272 100644 --- a/toonz/sources/tnzext/OverallDesigner.cpp +++ b/toonz/sources/tnzext/OverallDesigner.cpp @@ -201,7 +201,7 @@ void showCorners(const TStroke *s, offset(20, 20); // show corners - vector + std::vector corners; ToonzExt::cornersDetector(s, diff --git a/toonz/sources/tnzext/StrokeDeformationImpl.cpp b/toonz/sources/tnzext/StrokeDeformationImpl.cpp index 38d51f0..c31e01c 100644 --- a/toonz/sources/tnzext/StrokeDeformationImpl.cpp +++ b/toonz/sources/tnzext/StrokeDeformationImpl.cpp @@ -392,7 +392,7 @@ bool StrokeDeformationImpl::activate_impl(const ContextStatus *status) return false; } - vector + std::vector splitParameter; splitParameter.push_back(extremes.first); splitParameter.push_back(extremes.second); @@ -606,7 +606,7 @@ StrokeDeformationImpl::deactivate_impl() //stroke2manipulate_->reduceControlPoints (reductionFactor); const int size = stroke2manipulate_->getControlPointCount(); - vector + std::vector pnt(size); for (int i = 0; i < size; diff --git a/toonz/sources/tnzext/plasticskeletondeformation.cpp b/toonz/sources/tnzext/plasticskeletondeformation.cpp index 4a248a3..cbe7506 100644 --- a/toonz/sources/tnzext/plasticskeletondeformation.cpp +++ b/toonz/sources/tnzext/plasticskeletondeformation.cpp @@ -208,7 +208,7 @@ void SkVD::saveData(TOStream &os) void SkVD::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { int p; diff --git a/toonz/sources/tnztools/autofillpli.cpp b/toonz/sources/tnztools/autofillpli.cpp index 405469a..f856ad2 100644 --- a/toonz/sources/tnztools/autofillpli.cpp +++ b/toonz/sources/tnztools/autofillpli.cpp @@ -107,11 +107,11 @@ public: //--------------------------------------------------------------------------------------------- -int match(vector &probsVector, int &from, int &to) +int match(std::vector &probsVector, int &from, int &to) { int i = 0, maxProb = 0; bool overlappingArea = false; - vector::iterator it, matchedProbs; + std::vector::iterator it, matchedProbs; for (it = probsVector.begin(); it != probsVector.end(); it++) { MatchingProbs probs = *it; if (probs.m_matched) @@ -133,7 +133,7 @@ int match(vector &probsVector, int &from, int &to) //--------------------------------------------------------------------------------------------- -void assignProbs(vector &probVector, const Region &reference, const Region &work, +void assignProbs(std::vector &probVector, const Region &reference, const Region &work, int from, int to) { double delta_posx1, delta_posy1, delta_posx2, delta_posy2; @@ -338,7 +338,7 @@ bool rect_autofill_apply(const TVectorImageP &imgToApply, const TRectD &rect, bo workB = TPointD(pbx / totalArea, pby / totalArea); - vector probVector; + std::vector probVector; RegionDataList::Iterator refIt, workIt; for (refIt = regionsReference.begin(); refIt != regionsReference.end(); refIt++) @@ -469,7 +469,7 @@ bool stroke_autofill_apply(const TVectorImageP &imgToApply, TStroke *stroke, boo workB = TPointD(pbx / totalArea, pby / totalArea); - vector probVector; + std::vector probVector; RegionDataList::Iterator refIt, workIt; for (refIt = regionsReference.begin(); refIt != regionsReference.end(); refIt++) diff --git a/toonz/sources/tnztools/bendertool.cpp b/toonz/sources/tnztools/bendertool.cpp index cb92dd9..660cc74 100644 --- a/toonz/sources/tnztools/bendertool.cpp +++ b/toonz/sources/tnztools/bendertool.cpp @@ -74,7 +74,7 @@ inline bool strokeIsConnected(const TStroke *s, double toll = TConsts::epsilon) /* Extract an value of a pair. */ -void extract(const vector &s, ArrayOfDouble &d, bool isFirstOrSecond = true) +void extract(const std::vector &s, ArrayOfDouble &d, bool isFirstOrSecond = true) { if (isFirstOrSecond) std::transform(s.begin(), s.end(), back_inserter(d), _extractFirst); @@ -113,9 +113,9 @@ inline bool isEven(UINT val) return !isOdd(val); } -void clearPointerMap(map *> &corners) +void clearPointerMap(std::map *> &corners) { - map *>::iterator it = corners.begin(); + std::map *>::iterator it = corners.begin(); for (; it != corners.end(); ++it) { delete it->second; } @@ -132,8 +132,8 @@ private: TUndo *m_undo; bool m_atLeastOneIsChanged; - vector m_directionIsChanged; - vector m_accumulator; + std::vector m_directionIsChanged; + std::vector m_accumulator; void increaseCP(TStroke *, int); bool m_active; @@ -162,8 +162,8 @@ private: // contains information about stroke which have // intersection with benderSegment - map m_metaStroke; - map *> m_hitStrokeCorners; + std::map m_metaStroke; + std::map *> m_hitStrokeCorners; bool m_showTangents; @@ -181,7 +181,7 @@ private: //! ArrayOfStroke m_strokesToBend; - vector m_changedStrokes; + std::vector m_changedStrokes; bool m_enableDragSelection; @@ -258,7 +258,7 @@ void BenderTool::leftButtonUp(const TPointD &pos, const TMouseEvent &) m_active = true; - vector oldStrokesArray(m_changedStrokes.size()); + std::vector oldStrokesArray(m_changedStrokes.size()); int i; for (i = 0; i < (int)m_changedStrokes.size(); i++) @@ -523,7 +523,7 @@ void BenderTool::findCurves(TVectorImageP &vi) TStroke *s = vi->getStroke(i); // a useful reference - vector pair_intersection; // informations about extremes + std::vector pair_intersection; // informations about extremes // if there is interesection between stroke and bender tool @@ -663,7 +663,7 @@ void BenderTool::findCurves(TVectorImageP &vi) } TStroke *tempForCorners = merge(tempAS); - vector *corners = new vector; + std::vector *corners = new std::vector; corners->push_back(0); detectCorners(tempForCorners, 20, *corners); corners->push_back(tempForCorners->getChunkCount()); diff --git a/toonz/sources/tnztools/bluredbrush.cpp b/toonz/sources/tnztools/bluredbrush.cpp index 9b2d31d..19d4efa 100644 --- a/toonz/sources/tnztools/bluredbrush.cpp +++ b/toonz/sources/tnztools/bluredbrush.cpp @@ -76,7 +76,7 @@ void putOnRasterCM(const TRasterCM32P &out, const TRaster32P &in, int styleId, b //---------------------------------------------------------------------------------- void eraseFromRasterCM(const TRasterCM32P &out, const TRaster32P &in, - bool selective, int selectedStyleId, const wstring &mode) + bool selective, int selectedStyleId, const std::wstring &mode) { if (!out.getPointer() || !in.getPointer()) return; @@ -343,7 +343,7 @@ void BluredBrush::updateDrawing(const TRasterCM32P rasCM, const TRasterCM32P ras //---------------------------------------------------------------------------------- void BluredBrush::eraseDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasBackupCM, const TRect &bbox, - bool selective, int selectedStyleId, const wstring &mode) const + bool selective, int selectedStyleId, const std::wstring &mode) const { if (!rasCM) return; @@ -359,7 +359,7 @@ void BluredBrush::eraseDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasB //---------------------------------------------------------------------------------- -TRect BluredBrush::getBoundFromPoints(const vector &points) const +TRect BluredBrush::getBoundFromPoints(const std::vector &points) const { assert(points.size() <= 3); TThickPoint p = points[0]; diff --git a/toonz/sources/tnztools/bluredbrush.h b/toonz/sources/tnztools/bluredbrush.h index d992205..01f10da 100644 --- a/toonz/sources/tnztools/bluredbrush.h +++ b/toonz/sources/tnztools/bluredbrush.h @@ -33,12 +33,12 @@ public: void addPoint(const TThickPoint &p, double opacity); void addArc(const TThickPoint &pa, const TThickPoint &pb, const TThickPoint &pc, double opacityA, double opacityC); - TRect getBoundFromPoints(const vector &points) const; + TRect getBoundFromPoints(const std::vector &points) const; //colormapped void updateDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasBackupCM, const TRect &bbox, int styleId, bool selective) const; void eraseDrawing(const TRasterCM32P rasCM, const TRasterCM32P rasBackupCM, const TRect &bbox, - bool selective, int selectedStyleId, const wstring &mode) const; + bool selective, int selectedStyleId, const std::wstring &mode) const; //fullcolor void updateDrawing(const TRasterP ras, const TRasterP rasBackup, const TPixel32 &color, diff --git a/toonz/sources/tnztools/brushtool.cpp b/toonz/sources/tnztools/brushtool.cpp index 8bcfc75..3ff7d9b 100644 --- a/toonz/sources/tnztools/brushtool.cpp +++ b/toonz/sources/tnztools/brushtool.cpp @@ -89,8 +89,8 @@ TEnv::DoubleVar RasterBrushHardness("RasterBrushHardness", 100); void split( TStroke *stroke, - const vector ¶meterValues, - vector &strokes) + const std::vector ¶meterValues, + std::vector &strokes) { TThickPoint p2; std::vector points; @@ -218,7 +218,7 @@ void findMaxCurvPoints( TStroke *stroke, const float &angoloLim, const float &curvMaxLim, - vector ¶meterValues) + std::vector ¶meterValues) { TPointD tg1, tg2; // Tangent vectors @@ -343,7 +343,7 @@ void addStroke(TTool::Application *application, const TVectorImageP &vi, TStroke TUndoManager::manager()->beginBlock(); for (int i = 0; i < n; i++) { - vector *fillInformation = new vector; + std::vector *fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, stroke->getBBox()); TStroke *str = new TStroke(*strokes[i]); vi->addStroke(str); @@ -351,7 +351,7 @@ void addStroke(TTool::Application *application, const TVectorImageP &vi, TStroke } TUndoManager::manager()->endBlock(); } else { - vector *fillInformation = new vector; + std::vector *fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, stroke->getBBox()); TStroke *str = new TStroke(*stroke); vi->addStroke(str); @@ -395,14 +395,14 @@ void addStrokeToImage(TTool::Application *application, const TVectorImageP &vi, class RasterBrushUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_selective; bool m_isPencil; public: RasterBrushUndo(TTileSetCM32 *tileSet, - const vector &points, + const std::vector &points, int styleId, bool selective, TXshSimpleLevel *level, const TFrameId &frameId, bool isPencil, bool isFrameCreated, bool isLevelCreated) @@ -442,14 +442,14 @@ public: class RasterBluredBrushUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_selective; int m_maxThick; double m_hardness; public: - RasterBluredBrushUndo(TTileSetCM32 *tileSet, const vector &points, + RasterBluredBrushUndo(TTileSetCM32 *tileSet, const std::vector &points, int styleId, bool selective, TXshSimpleLevel *level, const TFrameId &frameId, int maxThick, double hardness, bool isFrameCreated, bool isLevelCreated) : TRasterUndo(tileSet, level, frameId, isFrameCreated, isLevelCreated, 0), m_points(points), m_styleId(styleId), m_selective(selective), m_maxThick(maxThick), m_hardness(hardness) @@ -469,7 +469,7 @@ public: workRaster->clear(); BluredBrush brush(workRaster, m_maxThick, brushPad, false); - vector points; + std::vector points; points.push_back(m_points[0]); TRect bbox = brush.getBoundFromPoints(points); brush.addPoint(m_points[0], 1); @@ -548,7 +548,7 @@ int computeThickness(int pressure, const TIntPairProperty &property, bool isPath // //----------------------------------------------------------------------------- -BrushTool::BrushTool(string name, int targetType) +BrushTool::BrushTool(std::string name, int targetType) : TTool(name), m_thickness("Size", 0, 100, 0, 5), m_rasThickness("Size", 1, 100, 1, 5), m_accuracy("Accuracy:", 1, 100, 20), m_hardness("Hardness:", 0, 100, 100), m_preset("Preset:"), m_selective("Selective", false), m_breakAngles("Break", true), m_pencil("Pencil", false), m_pressure("Pressure", true), m_capStyle("Cap"), m_joinStyle("Join"), m_miterJoinLimit("Miter:", 0, 100, 4), m_rasterTrack(0), m_styleId(0), m_modifiedRegion(), m_bluredBrush(0), m_active(false), m_enabled(false), m_isPrompting(false), m_firstTime(true), m_presetsLoaded(false), m_workingFrameId(TFrameId()) { bind(targetType); @@ -927,9 +927,9 @@ void BrushTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e) if (isAdded) { m_tileSaver->save(m_rasterTrack->getLastRect()); m_rasterTrack->generateLastPieceOfStroke(m_pencil.getValue()); - vector brushPoints = m_rasterTrack->getPointsSequence(); + std::vector brushPoints = m_rasterTrack->getPointsSequence(); int m = (int)brushPoints.size(); - vector points; + std::vector points; if (m == 3) { points.push_back(brushPoints[0]); points.push_back(brushPoints[1]); @@ -955,7 +955,7 @@ void BrushTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e) TRect bbox; int m = (int)m_points.size(); - vector points; + std::vector points; if (m == 3) { // ho appena cominciato. devo disegnare un segmento TThickPoint pa = m_points.front(); @@ -1107,9 +1107,9 @@ void BrushTool::finishRasterBrush(const TPointD &pos, int pressureVal) m_tileSaver->save(m_rasterTrack->getLastRect()); m_rasterTrack->generateLastPieceOfStroke(m_pencil.getValue(), true); - vector brushPoints = m_rasterTrack->getPointsSequence(); + std::vector brushPoints = m_rasterTrack->getPointsSequence(); int m = (int)brushPoints.size(); - vector points; + std::vector points; if (m == 3) { points.push_back(brushPoints[0]); points.push_back(brushPoints[1]); @@ -1143,7 +1143,7 @@ void BrushTool::finishRasterBrush(const TPointD &pos, int pressureVal) TThickPoint point(pos + rasCenter, thickness); m_points.push_back(point); int m = m_points.size(); - vector points; + std::vector points; points.push_back(m_points[m - 3]); points.push_back(m_points[m - 2]); points.push_back(m_points[m - 1]); @@ -1369,7 +1369,7 @@ void BrushTool::setWorkAndBackupImages() //------------------------------------------------------------------ -bool BrushTool::onPropertyChanged(string propertyName) +bool BrushTool::onPropertyChanged(std::string propertyName) { //Set the following to true whenever a different piece of interface must //be refreshed - done once at the end. @@ -1547,7 +1547,7 @@ void BrushTool::addPreset(QString name) void BrushTool::removePreset() { - wstring name(m_preset.getValue()); + std::wstring name(m_preset.getValue()); if (name == CUSTOM_WSTR) return; @@ -1742,7 +1742,7 @@ void BrushPresetManager::addPreset(const BrushData &data) //------------------------------------------------------------------ -void BrushPresetManager::removePreset(const wstring &name) +void BrushPresetManager::removePreset(const std::wstring &name) { m_presets.erase(BrushData(name)); save(); diff --git a/toonz/sources/tnztools/brushtool.h b/toonz/sources/tnztools/brushtool.h index 5ae35c1..7c1f8e6 100644 --- a/toonz/sources/tnztools/brushtool.h +++ b/toonz/sources/tnztools/brushtool.h @@ -67,7 +67,7 @@ public: const std::set &presets() const { return m_presets; } void addPreset(const BrushData &data); - void removePreset(const wstring &name); + void removePreset(const std::wstring &name); }; //************************************************************************ @@ -79,7 +79,7 @@ class BrushTool : public TTool Q_DECLARE_TR_FUNCTIONS(BrushTool) public: - BrushTool(string name, int targetType); + BrushTool(std::string name, int targetType); ToolType getToolType() const { return TTool::LevelWriteTool; } @@ -104,7 +104,7 @@ public: int getCursorId() const { return ToolCursor::PenCursor; } TPropertyGroup *getProperties(int targetType); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); void setWorkAndBackupImages(); @@ -156,7 +156,7 @@ protected: TRasterCM32P m_backupRas; TRaster32P m_workRas; - vector m_points; + std::vector m_points; TRect m_strokeRect, m_lastRect; diff --git a/toonz/sources/tnztools/controlpointeditortool.cpp b/toonz/sources/tnztools/controlpointeditortool.cpp index 14cb1d6..4f88146 100644 --- a/toonz/sources/tnztools/controlpointeditortool.cpp +++ b/toonz/sources/tnztools/controlpointeditortool.cpp @@ -149,7 +149,7 @@ public: void initUndo(); - void getNearestStrokeColumnIndexes(vector &indexes, TPointD pos); + void getNearestStrokeColumnIndexes(std::vector &indexes, TPointD pos); void drawMovingSegment(); void drawControlPoint(); @@ -172,7 +172,7 @@ public: bool keyDown(int key, TUINT32 flags, const TPoint &pos); void onEnter(); void onLeave(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onActivate(); void onDeactivate(); @@ -223,12 +223,12 @@ void ControlPointEditorTool::initUndo() //--------------------------------------------------------------------------- -void ControlPointEditorTool::getNearestStrokeColumnIndexes(vector &indexes, TPointD pos) +void ControlPointEditorTool::getNearestStrokeColumnIndexes(std::vector &indexes, TPointD pos) { TTool::Application *app = TTool::getApplication(); TXsheet *xsh = app->getCurrentXsheet()->getXsheet(); int currentFrame = app->getCurrentFrame()->getFrameIndex(); - vector newIndexes; + std::vector newIndexes; TAffine aff = getMatrix(); int i = 0; for (i = 0; i < (int)indexes.size(); i++) { @@ -795,7 +795,7 @@ void ControlPointEditorTool::onLeave() //----------------------------------------------------------------------------- -bool ControlPointEditorTool::onPropertyChanged(string propertyName) +bool ControlPointEditorTool::onPropertyChanged(std::string propertyName) { AutoSelectDrawing = (int)(m_autoSelectDrawing.getValue()); return true; diff --git a/toonz/sources/tnztools/controlpointselection.cpp b/toonz/sources/tnztools/controlpointselection.cpp index c423490..66c9e96 100644 --- a/toonz/sources/tnztools/controlpointselection.cpp +++ b/toonz/sources/tnztools/controlpointselection.cpp @@ -287,7 +287,7 @@ void ControlPointEditorStroke::updatePoints() } //Se e' self loop devo aggiungere un punto in piu' al cpCount - vector points; + std::vector points; int cpCount = selfLoop ? m_controlPoints.size() + 1 : m_controlPoints.size(); if (cpCount == 1) @@ -341,7 +341,7 @@ void ControlPointEditorStroke::updateDependentPoint(int index) if (!stroke) return; - vector> points; + std::vector> points; getDependentPoints(index, points); int i; @@ -692,7 +692,7 @@ int ControlPointEditorStroke::addControlPoint(const TPointD &pos) ControlPoint precCp = m_controlPoints[index]; assert(precCp.m_pointIndex >= 0); - vector points; + std::vector points; for (i = 0; i < cpCount; i++) { if (i != precCp.m_pointIndex + 1 && i != precCp.m_pointIndex + 2 && i != precCp.m_pointIndex + 3) diff --git a/toonz/sources/tnztools/cuttertool.cpp b/toonz/sources/tnztools/cuttertool.cpp index 7402d29..e61de91 100644 --- a/toonz/sources/tnztools/cuttertool.cpp +++ b/toonz/sources/tnztools/cuttertool.cpp @@ -40,8 +40,8 @@ class UndoCutter : public ToolUtils::TToolUndo VIStroke *m_oldStroke; - vector *m_fillInformation; - vector *m_sortedWRanges; + std::vector *m_fillInformation; + std::vector *m_sortedWRanges; int m_row; int m_column; @@ -53,8 +53,8 @@ public: int pos, int newStrokeId1, int newStrokeId2, - vector *fillInformation, - vector *sortedWRanges) + std::vector *fillInformation, + std::vector *sortedWRanges) : TToolUndo(level, frameId), m_oldStroke(oldStroke), m_newStrokeId1(newStrokeId1), m_newStrokeId2(newStrokeId2), m_pos(pos), m_fillInformation(fillInformation), m_sortedWRanges(sortedWRanges) { TTool::Application *app = TTool::getApplication(); diff --git a/toonz/sources/tnztools/edittool.cpp b/toonz/sources/tnztools/edittool.cpp index 68003ea..4d58d38 100644 --- a/toonz/sources/tnztools/edittool.cpp +++ b/toonz/sources/tnztools/edittool.cpp @@ -743,7 +743,7 @@ public: void onActivate(); void onDeactivate(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void computeBBox(); @@ -759,7 +759,7 @@ public: setMatrix(getCurrentObjectParentMatrix2()); // getCurrentObjectParentMatrix()); } - void drawText(const TPointD &p, double unit, string text); + void drawText(const TPointD &p, double unit, std::string text); }; //----------------------------------------------------------------------------- @@ -1139,7 +1139,7 @@ void drawZArrow() //----------------------------------------------------------------------------- -void EditTool::drawText(const TPointD &p, double unit, string text) +void EditTool::drawText(const TPointD &p, double unit, std::string text) { glPushMatrix(); glTranslated(p.x, p.y, 0.0); @@ -1273,7 +1273,7 @@ void EditTool::draw() /*-- Object名を表示 --*/ TStageObject *pegbar = xsh->getStageObject(objId); - string name = pegbar->getFullName(); + std::string name = pegbar->getFullName(); if (objId.isColumn() || objId.isPegbar() || objId.isTable()) { glScaled(unit * 2, unit * 1.5, 1); tglDrawText(TPointD(0, 0), name); @@ -1366,7 +1366,7 @@ void EditTool::onDeactivate() //----------------------------------------------------------------------------- -bool EditTool::onPropertyChanged(string propertyName) +bool EditTool::onPropertyChanged(std::string propertyName) { if (propertyName == m_lockCenterX.getName()) LockCenterX = (int)m_lockCenterX.getValue(); diff --git a/toonz/sources/tnztools/filltool.cpp b/toonz/sources/tnztools/filltool.cpp index 3488400..60e82d5 100644 --- a/toonz/sources/tnztools/filltool.cpp +++ b/toonz/sources/tnztools/filltool.cpp @@ -73,7 +73,7 @@ TEnv::IntVar FillRange("InknpaintFillRange", 0); namespace { -inline int vectorFill(const TVectorImageP &img, const wstring &type, const TPointD &point, int style, bool emptyOnly = false) +inline int vectorFill(const TVectorImageP &img, const std::wstring &type, const TPointD &point, int style, bool emptyOnly = false) { if (type == ALL || type == LINES) { int oldStyleId = img->fillStrokes(point, style); @@ -96,7 +96,7 @@ class VectorFillUndo : public TToolUndo int m_oldColorStyle; int m_newColorStyle; TPointD m_point; - wstring m_type; + std::wstring m_type; int m_row; int m_column; @@ -104,7 +104,7 @@ public: VectorFillUndo( int newColorStyle, int oldColorStyle, - wstring fillType, + std::wstring fillType, TPointD clickPoint, TXshSimpleLevel *sl, const TFrameId &fid) @@ -190,8 +190,8 @@ public: class VectorRectFillUndo : public TToolUndo { - vector *m_regionFillInformation; - vector> *m_strokeFillInformation; + std::vector *m_regionFillInformation; + std::vector> *m_strokeFillInformation; TRectD m_selectionArea; int m_styleId; bool m_unpaintedOnly; @@ -209,8 +209,8 @@ public: } VectorRectFillUndo( - vector *regionFillInformation, - vector> *strokeFillInformation, + std::vector *regionFillInformation, + std::vector> *strokeFillInformation, TRectD selectionArea, TStroke *stroke, int styleId, @@ -300,7 +300,7 @@ class RasterFillUndo : public TRasterUndo public: /*RasterFillUndo(TTileSetCM32 *tileSet, TPoint fillPoint, int paintId, int fillDepth, - wstring fillType, bool isSegment, + std::wstring fillType, bool isSegment, bool selective, bool isShiftFill, TXshSimpleLevel* sl, const TFrameId& fid)*/ RasterFillUndo(TTileSetCM32 *tileSet, const FillParameters ¶ms, @@ -370,7 +370,7 @@ class RasterRectFillUndo : public TRasterUndo { TRect m_fillArea; int m_paintId; - wstring m_colorType; + std::wstring m_colorType; TStroke *m_s; bool m_onlyUnfilled; TPalette *m_palette; @@ -385,7 +385,7 @@ public: RasterRectFillUndo(TTileSetCM32 *tileSet, TStroke *s, TRect fillArea, int paintId, TXshSimpleLevel *level, - wstring colorType, bool onlyUnfilled, + std::wstring colorType, bool onlyUnfilled, const TFrameId &fid, TPalette *palette) : TRasterUndo(tileSet, level, fid, false, false, 0), m_fillArea(fillArea), m_paintId(paintId), m_colorType(colorType), m_onlyUnfilled(onlyUnfilled), m_palette(palette) { @@ -548,7 +548,7 @@ public: class VectorAutoFillUndo : public TToolUndo { - vector *m_regionFillInformation; + std::vector *m_regionFillInformation; TRectD m_selectionArea; TStroke *m_selectingStroke; bool m_unpaintedOnly; @@ -566,7 +566,7 @@ public: } VectorAutoFillUndo( - vector *regionFillInformation, + std::vector *regionFillInformation, TRectD selectionArea, TStroke *selectingStroke, bool unpaintedOnly, @@ -692,7 +692,7 @@ void doRectAutofill(const TImageP &img, const TRectD selectingRect, bool onlyUnf TVectorImageP onionImg(sl->getFrame(onionFid, false)); if (!onionImg) return; - vector *regionFillInformation = new vector; + std::vector *regionFillInformation = new std::vector; ImageUtils::getFillingInformationInArea(vi, *regionFillInformation, selectingRect); onionImg->findRegions(); vi->findRegions(); @@ -781,7 +781,7 @@ void doStrokeAutofill(const TImageP &img, TStroke *selectingStroke, bool onlyUnf TVectorImageP onionImg(sl->getFrame(onionFid, false)); if (!onionImg) return; - vector *regionFillInformation = new vector; + std::vector *regionFillInformation = new std::vector; ImageUtils::getFillingInformationInArea(vi, *regionFillInformation, selectingStroke->getBBox()); onionImg->findRegions(); vi->findRegions(); @@ -812,7 +812,7 @@ void fillAreaWithUndo( const TRectD &area, TStroke *stroke, bool onlyUnfilled, - wstring colorType, + std::wstring colorType, TXshSimpleLevel *sl, const TFrameId &fid, int cs) @@ -871,14 +871,14 @@ void fillAreaWithUndo( vi->findRegions(); - vector *regionFillInformation = 0; - vector> *strokeFillInformation = 0; + std::vector *regionFillInformation = 0; + std::vector> *strokeFillInformation = 0; if (colorType != LINES) { - regionFillInformation = new vector; + regionFillInformation = new std::vector; ImageUtils::getFillingInformationInArea(vi, *regionFillInformation, selArea); } if (colorType != AREAS) { - strokeFillInformation = new vector>; + strokeFillInformation = new std::vector>; ImageUtils::getStrokeStyleInformationInArea(vi, *strokeFillInformation, selArea); } @@ -1030,7 +1030,7 @@ void SequencePainter::processSequence(TXshSimpleLevel *sl, TFrameId firstFid, TF backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; sl->getFids(allFids); std::vector::iterator i0 = allFids.begin(); @@ -1042,7 +1042,7 @@ void SequencePainter::processSequence(TXshSimpleLevel *sl, TFrameId firstFid, TF while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); @@ -1076,7 +1076,7 @@ class MultiAreaFiller : public SequencePainter { TRectD m_firstRect, m_lastRect; bool m_unfilledOnly; - wstring m_colorType; + std::wstring m_colorType; TVectorImageP m_firstImage, m_lastImage; int m_styleIndex; @@ -1085,7 +1085,7 @@ public: const TRectD &firstRect, const TRectD &lastRect, bool unfilledOnly, - wstring colorType, + std::wstring colorType, int styleIndex) : m_firstRect(firstRect), m_lastRect(lastRect), m_unfilledOnly(unfilledOnly), m_colorType(colorType), m_firstImage(), m_lastImage(), m_styleIndex(styleIndex) { @@ -1103,7 +1103,7 @@ public: TStroke *&firstStroke, TStroke *&lastStroke, bool unfilledOnly, - wstring colorType, + std::wstring colorType, int styleIndex) : m_firstRect(), m_lastRect(), m_unfilledOnly(unfilledOnly), m_colorType(colorType), m_styleIndex(styleIndex) { @@ -1188,7 +1188,7 @@ public: // AreaFillTool //----------------------------------------------------------------------------- -void drawPolyline(const vector &points) +void drawPolyline(const std::vector &points) { if (points.empty()) return; @@ -1221,10 +1221,10 @@ private: TXshSimpleLevelP m_level; TFrameId m_firstFrameId, m_veryFirstFrameId; TTool *m_parent; - wstring m_colorType; + std::wstring m_colorType; std::pair m_currCell; StrokeGenerator m_track; - vector m_polyline; + std::vector m_polyline; bool m_isPath; bool m_active; bool m_enabled; @@ -1368,7 +1368,7 @@ public: m_polyline.push_back(pos); if (m_polyline.back() != m_polyline.front()) m_polyline.push_back(m_polyline.front()); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 1)); @@ -1615,7 +1615,7 @@ public: } /*--Normal以外のTypeが選択された場合に呼ばれる--*/ - bool onPropertyChanged(bool multi, bool onlyUnfilled, bool onion, Type type, wstring colorType) + bool onPropertyChanged(bool multi, bool onlyUnfilled, bool onion, Type type, std::wstring colorType) { m_frameRange = multi; m_onlyUnfilled = onlyUnfilled; @@ -1807,7 +1807,7 @@ class FillTool : public TTool TPropertyGroup m_prop; std::pair m_currCell; #ifdef _DEBUG - vector m_rects; + std::vector m_rects; #endif public: @@ -1828,7 +1828,7 @@ public: void leftButtonDoubleClick(const TPointD &pos, const TMouseEvent &e); void resetMulti(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); void draw(); @@ -2112,7 +2112,7 @@ void FillTool::resetMulti() //----------------------------------------------------------------------------- -bool FillTool::onPropertyChanged(string propertyName) +bool FillTool::onPropertyChanged(std::string propertyName) { /*--- m_rectFill->onPropertyChangedを呼ぶかどうかのフラグ fillType, frameRange, selective, colorTypeが変わったときに呼ぶ---*/ diff --git a/toonz/sources/tnztools/fingertool.cpp b/toonz/sources/tnztools/fingertool.cpp index e882c3a..4a5366d 100644 --- a/toonz/sources/tnztools/fingertool.cpp +++ b/toonz/sources/tnztools/fingertool.cpp @@ -60,13 +60,13 @@ namespace class FingerUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_invert; public: FingerUndo(TTileSetCM32 *tileSet, - const vector &points, + const std::vector &points, int styleId, bool invert, TXshSimpleLevel *level, const TFrameId &frameId) @@ -248,7 +248,7 @@ public: void onLeave(); void onActivate(); void onDeactivate(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); TPropertyGroup *getProperties(int targetType) { return &m_prop; } ToolType getToolType() const { return TTool::LevelWriteTool; } @@ -316,7 +316,7 @@ const UINT pointCount = 20; //----------------------------------------------------------------------------- -bool FingerTool::onPropertyChanged(string propertyName) +bool FingerTool::onPropertyChanged(std::string propertyName) { /*-- サイズ --*/ if (propertyName == m_toolSize.getName()) { diff --git a/toonz/sources/tnztools/fullcolorbrushtool.cpp b/toonz/sources/tnztools/fullcolorbrushtool.cpp index 1915438..6ac1ae5 100644 --- a/toonz/sources/tnztools/fullcolorbrushtool.cpp +++ b/toonz/sources/tnztools/fullcolorbrushtool.cpp @@ -142,7 +142,7 @@ public: // FullColor Brush Tool implementation //************************************************************************ -FullColorBrushTool::FullColorBrushTool(string name) +FullColorBrushTool::FullColorBrushTool(std::string name) : TTool(name), m_thickness("Thickness", 1, 100, 1, 5, false), m_pressure("Pressure Sensitivity", true), m_opacity("Opacity:", 0, 100, 100, 100, true), m_hardness("Hardness:", 0, 100, 100), m_preset("Preset:"), m_styleId(0), m_oldOpacity(1), m_brush(0), m_tileSet(0), m_tileSaver(0), m_notifier(0), m_presetsLoaded(false), m_firstTime(true) { bind(TTool::RasterImage | TTool::EmptyTarget); @@ -351,7 +351,7 @@ void FullColorBrushTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e if (m == 3) { // ho appena cominciato. devo disegnare un segmento TThickPoint pa = m_points.front(); - vector points; + std::vector points; points.push_back(pa); points.push_back(mid); invalidateRect = ToolUtils::getBounds(points, maxThickness); @@ -362,7 +362,7 @@ void FullColorBrushTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e m_lastRect += bbox; } else { // caso generale: disegno un arco - vector points; + std::vector points; points.push_back(m_points[m - 4]); points.push_back(old); points.push_back(mid); @@ -397,7 +397,7 @@ void FullColorBrushTool::leftButtonUp(const TPointD &pos, const TMouseEvent &e) TThickPoint point(pos + rasCenter, thickness); m_points.push_back(point); int m = m_points.size(); - vector points; + std::vector points; points.push_back(m_points[m - 3]); points.push_back(m_points[m - 2]); points.push_back(m_points[m - 1]); @@ -571,7 +571,7 @@ void FullColorBrushTool::setWorkAndBackupImages() //------------------------------------------------------------------ -bool FullColorBrushTool::onPropertyChanged(string propertyName) +bool FullColorBrushTool::onPropertyChanged(std::string propertyName) { m_minThick = m_thickness.getValue().first; m_maxThick = m_thickness.getValue().second; @@ -677,7 +677,7 @@ void FullColorBrushTool::addPreset(QString name) void FullColorBrushTool::removePreset() { - wstring name(m_preset.getValue()); + std::wstring name(m_preset.getValue()); if (name == CUSTOM_WSTR) return; diff --git a/toonz/sources/tnztools/fullcolorbrushtool.h b/toonz/sources/tnztools/fullcolorbrushtool.h index 6eada76..19bf119 100644 --- a/toonz/sources/tnztools/fullcolorbrushtool.h +++ b/toonz/sources/tnztools/fullcolorbrushtool.h @@ -25,7 +25,7 @@ class FullColorBrushTool : public TTool Q_DECLARE_TR_FUNCTIONS(FullColorBrushTool) public: - FullColorBrushTool(string name); + FullColorBrushTool(std::string name); ToolType getToolType() const { return TTool::LevelWriteTool; } @@ -50,7 +50,7 @@ public: int getCursorId() const { return ToolCursor::PenCursor; } TPropertyGroup *getProperties(int targetType); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); void setWorkAndBackupImages(); @@ -91,7 +91,7 @@ protected: QRadialGradient m_brushPad; - vector m_points; + std::vector m_points; BluredBrush *m_brush; TTileSetFullColor *m_tileSet; diff --git a/toonz/sources/tnztools/fullcolorerasertool.cpp b/toonz/sources/tnztools/fullcolorerasertool.cpp index 4463229..a079ecd 100644 --- a/toonz/sources/tnztools/fullcolorerasertool.cpp +++ b/toonz/sources/tnztools/fullcolorerasertool.cpp @@ -124,12 +124,12 @@ class RectFullColorUndo : public TFullColorRasterUndo { TRectD m_modifyArea; TStroke *m_stroke; - wstring m_eraseType; + std::wstring m_eraseType; bool m_invert; public: RectFullColorUndo(TTileSetFullColor *tileSet, const TRectD &modifyArea, TStroke stroke, - wstring eraseType, + std::wstring eraseType, TXshSimpleLevel *level, bool invert, const TFrameId &frameId) : TFullColorRasterUndo(tileSet, level, frameId, false, false, 0), m_modifyArea(modifyArea), m_eraseType(eraseType), m_invert(invert) @@ -187,14 +187,14 @@ public: class FullColorEraserUndo : public TFullColorRasterUndo { - vector m_points; + std::vector m_points; int m_size; double m_hardness; double m_opacity; public: FullColorEraserUndo(TTileSetFullColor *tileSet, - const vector &points, + const std::vector &points, TXshSimpleLevel *level, const TFrameId &frameId, int size, double hardness, double opacity) : TFullColorRasterUndo(tileSet, level, frameId, false, false, 0), m_points(points), m_size(size), m_hardness(hardness), m_opacity(opacity) {} @@ -211,7 +211,7 @@ public: workRaster->clear(); BluredBrush brush(workRaster, m_size, brushPad, false); - vector points; + std::vector points; points.push_back(m_points[0]); TRect bbox = brush.getBoundFromPoints(points); brush.addPoint(m_points[0], 1); @@ -256,7 +256,7 @@ public: //---------------------------------------------------------------------------------- -void eraseStroke(const TRasterImageP &ri, TStroke *stroke, wstring eraseType, +void eraseStroke(const TRasterImageP &ri, TStroke *stroke, std::wstring eraseType, bool invert, const TXshSimpleLevelP &level, const TFrameId &frameId) { assert(stroke); @@ -294,7 +294,7 @@ class FullColorEraserTool : public TTool Q_DECLARE_TR_FUNCTIONS(FullColorEraserTool) public: - FullColorEraserTool(string name); + FullColorEraserTool(std::string name); ~FullColorEraserTool(); ToolType getToolType() const { return TTool::LevelWriteTool; } @@ -316,7 +316,7 @@ public: TPropertyGroup *getProperties(int targetType) { return &m_prop; } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); void onEnter(); @@ -355,14 +355,14 @@ private: QRadialGradient m_brushPad; - vector m_points; + std::vector m_points; BluredBrush *m_brush; TTileSetFullColor *m_tileSet; TTileSaverFullColor *m_tileSaver; StrokeGenerator m_track; - vector m_polyline; + std::vector m_polyline; TStroke *m_firstStroke; TRectD m_selectingRect, @@ -383,7 +383,7 @@ private: //=================================================================================================== -FullColorEraserTool::FullColorEraserTool(string name) +FullColorEraserTool::FullColorEraserTool(std::string name) : TTool(name), m_size("Size:", 1, 100, 5, false), m_opacity("Opacity:", 0, 100, 100), m_hardness("Hardness:", 0, 100, 100), m_eraseType("Type:"), m_invertOption("Invert", false), m_multi("Frame Range", false), m_currCell(-1, -1), m_brush(0), m_tileSet(0), m_tileSaver(0), m_thick(0.5), m_firstTime(true), m_selecting(false), m_firstFrameSelected(false), m_isXsheetCell(false) { bind(TTool::RasterImage); @@ -556,14 +556,14 @@ void FullColorEraserTool::leftButtonDrag(const TPointD &pos, const TMouseEvent & double opacity = m_opacity.getValue() * 0.01; TThickPoint pa = m_points.front(); - vector points; + std::vector points; points.push_back(pa); points.push_back(mid); TRect bbox; TRectD invalidateRect; if (m == 3) { TThickPoint pa = m_points.front(); - vector points; + std::vector points; points.push_back(pa); points.push_back(mid); invalidateRect = ToolUtils::getBounds(points, thickness); @@ -571,7 +571,7 @@ void FullColorEraserTool::leftButtonDrag(const TPointD &pos, const TMouseEvent & m_tileSaver->save(bbox); m_brush->addArc(pa, (mid + pa) * 0.5, mid, 1, 1); } else { - vector points; + std::vector points; points.push_back(m_points[m - 4]); points.push_back(old); points.push_back(mid); @@ -629,7 +629,7 @@ void FullColorEraserTool::leftButtonUp(const TPointD &pos, const TMouseEvent &e) TThickPoint point(pos + rasCenter, m_size.getValue()); m_points.push_back(point); int m = m_points.size(); - vector points; + std::vector points; points.push_back(m_points[m - 3]); points.push_back(m_points[m - 2]); points.push_back(m_points[m - 1]); @@ -813,7 +813,7 @@ void FullColorEraserTool::leftButtonDoubleClick(const TPointD &pos, const TMouse m_polyline.push_back(pos); if (m_polyline.back() != m_polyline.front()) m_polyline.push_back(m_polyline.front()); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 1)); @@ -950,7 +950,7 @@ void FullColorEraserTool::draw() //---------------------------------------------------------------------------------------------------------- -bool FullColorEraserTool::onPropertyChanged(string propertyName) +bool FullColorEraserTool::onPropertyChanged(std::string propertyName) { FullcolorEraseSize = m_size.getValue(); FullcolorEraseHardness = m_hardness.getValue(); @@ -1051,7 +1051,7 @@ void FullColorEraserTool::multiUpdate(const TRectD firstRect, const TRectD lastR backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; m_level->getFids(allFids); std::vector::iterator i0 = allFids.begin(); @@ -1063,7 +1063,7 @@ void FullColorEraserTool::multiUpdate(const TRectD firstRect, const TRectD lastR while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); @@ -1126,7 +1126,7 @@ void FullColorEraserTool::multiAreaEraser(TFrameId &firstFid, TFrameId &lastFid, backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; m_level->getFids(allFids); std::vector::iterator i0 = allFids.begin(); @@ -1138,7 +1138,7 @@ void FullColorEraserTool::multiAreaEraser(TFrameId &firstFid, TFrameId &lastFid, while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); TUndoManager::manager()->beginBlock(); diff --git a/toonz/sources/tnztools/geometrictool.cpp b/toonz/sources/tnztools/geometrictool.cpp index bebbde7..3b8fc3e 100644 --- a/toonz/sources/tnztools/geometrictool.cpp +++ b/toonz/sources/tnztools/geometrictool.cpp @@ -124,7 +124,7 @@ TRect drawBluredBrush(const TRasterImageP &ri, TStroke *stroke, int thick, doubl int i, chunkCount = s->getChunkCount(); for (i = 0; i < chunkCount; i++) { const TThickQuadratic *q = s->getChunk(i); - vector points; + std::vector points; points.push_back(q->getThickP0()); points.push_back(q->getThickP1()); points.push_back(q->getThickP2()); @@ -166,7 +166,7 @@ TRect drawBluredBrush(const TToonzImageP &ti, TStroke *stroke, int thick, double int i, chunkCount = s->getChunkCount(); for (i = 0; i < chunkCount; i++) { const TThickQuadratic *q = s->getChunk(i); - vector points; + std::vector points; points.push_back(q->getThickP0()); points.push_back(q->getThickP1()); points.push_back(q->getThickP2()); @@ -187,12 +187,12 @@ TRect drawBluredBrush(const TToonzImageP &ti, TStroke *stroke, int thick, double class MultilinePrimitiveUndo : public TUndo { - vector m_oldVertex; - vector m_newVertex; + std::vector m_oldVertex; + std::vector m_newVertex; MultiLinePrimitive *m_tool; public: - MultilinePrimitiveUndo(const vector &vertex, MultiLinePrimitive *tool) + MultilinePrimitiveUndo(const std::vector &vertex, MultiLinePrimitive *tool) : TUndo(), m_oldVertex(vertex), m_tool(tool), m_newVertex() { } @@ -201,7 +201,7 @@ public: void undo() const; void redo() const; - void setNewVertex(const vector &vertex) + void setNewVertex(const std::vector &vertex) { m_newVertex = vertex; } @@ -268,7 +268,7 @@ class CMBluredPrimitiveUndo : public UndoRasterPencil public: CMBluredPrimitiveUndo(TXshSimpleLevel *level, const TFrameId &frameId, TStroke *stroke, int thickness, double hardness, bool selective, bool doAntialias, bool createdFrame, bool createdLevel, - string primitiveName) + std::string primitiveName) : UndoRasterPencil(level, frameId, stroke, selective, false, doAntialias, createdFrame, createdLevel, primitiveName), m_thickness(thickness), m_hardness(hardness), m_selective(selective) @@ -423,7 +423,7 @@ public: void setIsPrompting(bool value) { m_isPrompting = value; } - virtual string getName() const = 0; + virtual std::string getName() const = 0; virtual ~Primitive() {} @@ -460,7 +460,7 @@ public: { } - virtual string getName() const { return "Rectangle"; } // W_ToolOptions_ShapeRect"; } + virtual std::string getName() const { return "Rectangle"; } // W_ToolOptions_ShapeRect"; } TStroke *makeStroke() const; void draw(); @@ -488,7 +488,7 @@ public: { } - virtual string getName() const { return "Circle"; } // W_ToolOptions_ShapeCircle";} + virtual std::string getName() const { return "Circle"; } // W_ToolOptions_ShapeCircle";} void draw(); void leftButtonDown(const TPointD &pos, const TMouseEvent &); @@ -508,7 +508,7 @@ const double joinDistance = 5.0; class MultiLinePrimitive : public Primitive { protected: - vector m_vertex; + std::vector m_vertex; TPointD m_mousePosition; TPixel32 m_color; bool m_closed, m_isSingleLine; @@ -523,7 +523,7 @@ public: { } - virtual string getName() const { return "Polyline"; } // W_ToolOptions_ShapePolyline";} + virtual std::string getName() const { return "Polyline"; } // W_ToolOptions_ShapePolyline";} void addVertex(const TPointD &pos); void moveSpeed(const TPointD &delta); @@ -545,7 +545,7 @@ public: } void onEnter(); void onImageChanged(); - void setVertexes(const vector &vertex) + void setVertexes(const std::vector &vertex) { m_vertex = vertex; }; @@ -598,7 +598,7 @@ public: m_isSingleLine = true; } - string getName() const { return "Line"; } // W_ToolOptions_ShapePolyline";} + std::string getName() const { return "Line"; } // W_ToolOptions_ShapePolyline";} void draw(); void leftButtonDown(const TPointD &pos, const TMouseEvent &e); @@ -624,7 +624,7 @@ public: { } - virtual string getName() const { return "Ellipse"; } // W_ToolOptions_ShapeEllipse";} + virtual std::string getName() const { return "Ellipse"; } // W_ToolOptions_ShapeEllipse";} void draw(); void leftButtonDown(const TPointD &pos, const TMouseEvent &); @@ -658,7 +658,7 @@ public: delete m_stroke; } - virtual string getName() const { return "Arc"; } // _ToolOptions_ShapeArc";} + virtual std::string getName() const { return "Arc"; } // _ToolOptions_ShapeArc";} TStroke *makeStroke() const; void draw(); @@ -683,7 +683,7 @@ public: { } - virtual string getName() const { return "Polygon"; } // W_ToolOptions_ShapePolygon";} + virtual std::string getName() const { return "Polygon"; } // W_ToolOptions_ShapePolygon";} TStroke *makeStroke() const; void draw(); @@ -700,9 +700,9 @@ class GeometricTool : public TTool { protected: Primitive *m_primitive; - map m_primitiveTable; + std::map m_primitiveTable; PrimitiveParam m_param; - wstring m_typeCode; + std::wstring m_typeCode; bool m_active; bool m_firstTime; @@ -735,7 +735,7 @@ public: ~GeometricTool() { - map::iterator it; + std::map::iterator it; for (it = m_primitiveTable.begin(); it != m_primitiveTable.end(); ++it) delete it->second; } @@ -750,16 +750,16 @@ public: void addPrimitive(Primitive *p) { // TODO: aggiungere il controllo per evitare nomi ripetuti - wstring name = toWideString(p->getName()); + std::wstring name = toWideString(p->getName()); //wstring name = TStringTable::translate(p->getName()); m_primitiveTable[name] = p; m_param.m_type.addValue(name); } - void changeType(wstring name) + void changeType(std::wstring name) { - map::iterator it = m_primitiveTable.find(name); + std::map::iterator it = m_primitiveTable.find(name); if (it != m_primitiveTable.end()) m_primitive = it->second; } @@ -838,7 +838,7 @@ public: m_param.m_selective.setValue(GeometricSelective ? 1 : 0); m_param.m_autogroup.setValue(GeometricGroupIt ? 1 : 0); m_param.m_autofill.setValue(GeometricAutofill ? 1 : 0); - wstring typeCode = toWideString((GeometricType.getValue())); + std::wstring typeCode = toWideString((GeometricType.getValue())); m_param.m_type.setValue(typeCode); GeometricType = toString(typeCode); m_typeCode = typeCode; @@ -886,7 +886,7 @@ public: return &m_param.m_prop[idx]; } - bool onPropertyChanged(string propertyName) + bool onPropertyChanged(std::string propertyName) { /*--- 変更されたPropertyごとに処理を分ける。 注意:m_toolSizeとm_rasterToolSizeは同じName(="Size:")なので、 @@ -899,7 +899,7 @@ public: else GeometricSize = m_param.m_toolSize.getValue(); } else if (propertyName == m_param.m_type.getName()) { - wstring typeCode = m_param.m_type.getValue(); + std::wstring typeCode = m_param.m_type.getValue(); GeometricType = toString(typeCode); if (typeCode != m_typeCode) { m_typeCode = typeCode; @@ -1006,7 +1006,7 @@ public: if (styleId >= 0) stroke->setStyle(styleId); QMutexLocker lock(vi->getMutex()); - vector *fillInformation = new vector; + std::vector *fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, stroke->getBBox()); vi->addStroke(stroke); TUndoManager::manager()->add(new UndoPencil(vi->getStroke(vi->getStrokeCount() - 1), fillInformation, sl, id, @@ -1162,7 +1162,7 @@ TStroke *RectanglePrimitive::makeStroke() const TStroke *stroke = 0; if (m_param->m_targetType & TTool::Vectors) { - vector points(17); + std::vector points(17); points[0] = TThickPoint(selArea.x1, selArea.y1, thick); points[1] = TThickPoint(selArea.x1, selArea.y1, thick) + TPointD(-0.01, 0); @@ -1189,7 +1189,7 @@ TStroke *RectanglePrimitive::makeStroke() const stroke = new TStroke(points); } else if (m_param->m_targetType & TTool::ToonzImage || m_param->m_targetType & TTool::RasterImage) { - vector points(9); + std::vector points(9); double middleX = (selArea.x0 + selArea.x1) * 0.5; double middleY = (selArea.y0 + selArea.y1) * 0.5; @@ -1620,7 +1620,7 @@ TStroke *MultiLinePrimitive::makeStroke() const TUndoManager::manager()->popUndo((size - 1) / 4 + 1); TStroke *stroke = 0; - vector points; + std::vector points; int i; for (i = 0; i < (int)size; i++) { TPointD vertex = m_vertex[i]; @@ -1962,7 +1962,7 @@ void ArcPrimitive::leftButtonUp(const TPointD &pos, const TMouseEvent &) if (!app) return; - vector points(9); + std::vector points(9); double thick = getThickness(); switch (m_clickNumber) { @@ -2150,7 +2150,7 @@ TStroke *PolygonPrimitive::makeStroke() const TStroke *stroke = 0; if (m_param->m_targetType & TTool::Vectors) { - vector points(4 * edgeCount + 1); + std::vector points(4 * edgeCount + 1); int i; //Posiziono gli angoli for (i = 0; i <= (int)points.size(); i += 4) { @@ -2171,7 +2171,7 @@ TStroke *PolygonPrimitive::makeStroke() const } stroke = new TStroke(points); } else if (m_param->m_targetType & TTool::ToonzImage || m_param->m_targetType & TTool::RasterImage) { - vector points(edgeCount + edgeCount + 1); + std::vector points(edgeCount + edgeCount + 1); points[0] = TThickPoint(m_centre + TPointD(cos(angle) * m_radius, sin(angle) * m_radius), thick); for (int i = 1; i <= edgeCount; i++) { angle += angleDiff; diff --git a/toonz/sources/tnztools/hookselection.cpp b/toonz/sources/tnztools/hookselection.cpp index 91596e7..aa18d93 100644 --- a/toonz/sources/tnztools/hookselection.cpp +++ b/toonz/sources/tnztools/hookselection.cpp @@ -112,7 +112,7 @@ HooksData *HooksData::clone() const //--------------------------------------------------------------------------- -void HooksData::storeHookPositions(const vector &ids) +void HooksData::storeHookPositions(const std::vector &ids) { if (ids.empty()) return; @@ -299,7 +299,7 @@ void HookSelection::copySelectedHooks() { if (isEmpty()) return; - vector ids; + std::vector ids; std::set>::iterator it; for (it = m_hooks.begin(); it != m_hooks.end(); it++) { if (std::find(ids.begin(), ids.end(), it->first) == ids.end()) diff --git a/toonz/sources/tnztools/hookselection.h b/toonz/sources/tnztools/hookselection.h index 9b36203..487b23b 100644 --- a/toonz/sources/tnztools/hookselection.h +++ b/toonz/sources/tnztools/hookselection.h @@ -47,7 +47,7 @@ class HooksData : public DvMimeData : m_id(id), m_aPos(aPos), m_bPos(bPos) {} }; - vector m_hookPositions; + std::vector m_hookPositions; TXshLevelP m_level; public: @@ -55,7 +55,7 @@ public: ~HooksData(); HooksData *clone() const; - void storeHookPositions(const vector &ids); + void storeHookPositions(const std::vector &ids); void restoreHookPositions() const; }; diff --git a/toonz/sources/tnztools/hooktool.cpp b/toonz/sources/tnztools/hooktool.cpp index 0eb58e0..1bace70 100644 --- a/toonz/sources/tnztools/hooktool.cpp +++ b/toonz/sources/tnztools/hooktool.cpp @@ -85,7 +85,7 @@ class HookTool : public TTool TBoolProperty m_snappedActive; TPointD m_snappedPos; - string m_snappedReason; + std::string m_snappedReason; TRectD m_shapeBBox; bool m_snapped, m_hookSetChanged; @@ -347,7 +347,7 @@ void HookTool::draw() } TPixel32 balloonColor(200, 220, 205, 200); TPoint balloonOffset(20, 20); - string hookName = toString(i + 1); + std::string hookName = toString(i + 1); drawBalloon(p0, hookName, balloonColor, balloonOffset, false, &balloons); if (!linked) drawBalloon(p1, hookName, balloonColor, balloonOffset, false, &balloons); @@ -751,7 +751,7 @@ bool HookTool::snap(TPointD &pos, double &range2) void HookTool::mouseMove(const TPointD &pos, const TMouseEvent &e) { - string oldReason = m_snappedReason; + std::string oldReason = m_snappedReason; TPointD oldPos = m_snappedPos; m_snappedPos = TPointD(); diff --git a/toonz/sources/tnztools/imagegrouping.cpp b/toonz/sources/tnztools/imagegrouping.cpp index 12eadea..060c8bf 100644 --- a/toonz/sources/tnztools/imagegrouping.cpp +++ b/toonz/sources/tnztools/imagegrouping.cpp @@ -159,11 +159,11 @@ class MoveGroupUndo : public ToolUtils::TToolUndo UCHAR m_moveType; int m_refStroke, m_count, m_moveBefore; - vector> m_selectedGroups; + std::vector> m_selectedGroups; public: MoveGroupUndo(TXshSimpleLevel *level, const TFrameId &frameId, UCHAR moveType, - int refStroke, int count, int moveBefore, const vector> &selectedGroups) + int refStroke, int count, int moveBefore, const std::vector> &selectedGroups) : ToolUtils::TToolUndo(level, frameId), m_moveType(moveType), m_refStroke(refStroke), m_count(count), m_moveBefore(moveBefore), m_selectedGroups(selectedGroups) { } @@ -267,21 +267,21 @@ public: namespace { -vector> getSelectedGroups(TVectorImage *vimg, StrokeSelection *sel) +std::vector> getSelectedGroups(TVectorImage *vimg, StrokeSelection *sel) { UINT i, j; - vector> ret; + std::vector> ret; for (i = 0; i < vimg->getStrokeCount(); i++) if (sel->isSelected(i)) { if (vimg->isStrokeGrouped(i)) { for (j = i + 1; j < vimg->getStrokeCount() && vimg->sameSubGroup(i, j); j++) if (!sel->isSelected(j)) - return vector>(); - ret.push_back(pair(vimg->getStroke(i), j - i)); + return std::vector>(); + ret.push_back(std::pair(vimg->getStroke(i), j - i)); i = j - 1; } else - ret.push_back(pair(vimg->getStroke(i), 1)); + ret.push_back(std::pair(vimg->getStroke(i), 1)); } return ret; } @@ -305,7 +305,7 @@ UCHAR TGroupCommand::getGroupingOptions() //spostamento: si possono spostare solo gruppi interi oppure stroke non gruppate - vector> strokeIndexes = getSelectedGroups(vimg, m_sel); + std::vector> strokeIndexes = getSelectedGroups(vimg, m_sel); /* //spostamento: si puo' spostare solo un gruppo(e uno solo per volta) oppure una stroke singola non gruppata @@ -424,7 +424,7 @@ UCHAR TGroupCommand::getGroupingOptions() UINT i, j; bool valid = true; //spostamento: si puo' spostare solo un gruppo(e uno solo per volta) oppure una stroke singola non gruppata - vector> groups; + std::vector> groups; for (i = 0; i < vimg->getStrokeCount() && valid;) if (m_sel->isSelected(i)) { @@ -666,7 +666,7 @@ bool cantMove1(TVectorImage* vimg, int refStroke, int count, int moveBefore, boo if(count==0) return; */ -int doMoveGroup(UCHAR moveType, TVectorImage *vimg, const vector> &selectedGroups, int index) +int doMoveGroup(UCHAR moveType, TVectorImage *vimg, const std::vector> &selectedGroups, int index) { int refStroke = vimg->getStrokeIndex(selectedGroups[index].first); int count = selectedGroups[index].second; @@ -722,7 +722,7 @@ void TGroupCommand::moveGroup(UCHAR moveType) if (!vimg) return; - vector> selectedGroups = getSelectedGroups(vimg, m_sel); + std::vector> selectedGroups = getSelectedGroups(vimg, m_sel); if (selectedGroups.empty()) return; diff --git a/toonz/sources/tnztools/irontool.cpp b/toonz/sources/tnztools/irontool.cpp index 8ee0044..cf8cf6c 100644 --- a/toonz/sources/tnztools/irontool.cpp +++ b/toonz/sources/tnztools/irontool.cpp @@ -369,21 +369,21 @@ public: senza lasciare ingrati compiti alla reuceControlPoints Altrimenti non si fa altro che aumentarli i punti di controllo */ - vector corners; + std::vector corners; corners.push_back(0); detectCorners(m_strokeRef, 45, corners); corners.push_back(m_strokeRef->getChunkCount()); m_strokeRef->reduceControlPoints(2.0 * getPixelSize(), corners); } else { if (m_cpIndexMin < m_cpIndexMax) { - vector hitPoints(m_cpIndexMax - m_cpIndexMin + 1); + std::vector hitPoints(m_cpIndexMax - m_cpIndexMin + 1); count = 0; for (i = m_cpIndexMin; i <= m_cpIndexMax; i++) { hitPoints[count++] = m_strokeRef->getControlPoint(i); } TStroke *newStroke = new TStroke(hitPoints); - vector corners; + std::vector corners; corners.push_back(0); detectCorners(newStroke, 45, corners); corners.push_back(newStroke->getChunkCount()); @@ -410,14 +410,14 @@ public: } else { assert(m_cpIndexMin != m_cpIndexMax); - vector hitPoints(cpCount - m_cpIndexMin); + std::vector hitPoints(cpCount - m_cpIndexMin); count = 0; for (i = m_cpIndexMin; i < (int)cpCount; i++) { hitPoints[count++] = m_strokeRef->getControlPoint(i); } TStroke *newStroke1 = new TStroke(hitPoints); - vector corners; + std::vector corners; corners.push_back(0); detectCorners(newStroke1, 45, corners); corners.push_back(newStroke1->getChunkCount()); diff --git a/toonz/sources/tnztools/magnettool.cpp b/toonz/sources/tnztools/magnettool.cpp index 3a599b0..b464d0b 100644 --- a/toonz/sources/tnztools/magnettool.cpp +++ b/toonz/sources/tnztools/magnettool.cpp @@ -137,13 +137,13 @@ class MagnetTool : public TTool ArrayOfStroke m_splittedToMove; } strokeCollection; - vector m_strokeToModify; + std::vector m_strokeToModify; //vector m_info; - vector m_strokeHit, m_oldStrokesArray; + std::vector m_strokeHit, m_oldStrokesArray; - vector m_changedStrokes; + std::vector m_changedStrokes; - vector *> m_hitStrokeCorners, m_strokeToModifyCorners; + std::vector *> m_hitStrokeCorners, m_strokeToModifyCorners; TDoubleProperty m_toolSize; TPropertyGroup m_prop; @@ -206,7 +206,7 @@ public: m_changedStrokes.clear(); m_strokeToModify.clear(); - vector strokeUndo; + std::vector strokeUndo; TStroke *ref; @@ -221,7 +221,7 @@ public: TStroke *stroke = vi->getStroke(i); ref = stroke; // calcola le intersezioni - vector intersections; + std::vector intersections; intersect(*ref, p, m_pointSize, intersections); if (intersections.empty()) { @@ -230,7 +230,7 @@ public: m_changedStrokes.push_back(i); m_strokeHit.push_back(ref); - vector *corners = new vector; + std::vector *corners = new std::vector; corners->push_back(0); detectCorners(ref, 20, *corners); corners->push_back(ref->getChunkCount()); @@ -258,7 +258,7 @@ public: bool test = increaseControlPoints(*temp, TStrokePointDeformation(p, m_pointSize)); assert(test); - vector *corners = new vector; + std::vector *corners = new std::vector; corners->push_back(0); detectCorners(temp, 20, *corners); corners->push_back(temp->getChunkCount()); diff --git a/toonz/sources/tnztools/paintbrushtool.cpp b/toonz/sources/tnztools/paintbrushtool.cpp index 27f4958..fd15b3d 100644 --- a/toonz/sources/tnztools/paintbrushtool.cpp +++ b/toonz/sources/tnztools/paintbrushtool.cpp @@ -64,13 +64,13 @@ namespace class BrushUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_selective; ColorType m_colorType; public: - BrushUndo(TTileSetCM32 *tileSet, const vector &points, + BrushUndo(TTileSetCM32 *tileSet, const std::vector &points, ColorType colorType, int styleId, bool selective, TXshSimpleLevel *level, const TFrameId &frameId) @@ -249,7 +249,7 @@ public: void onLeave(); void onActivate(); void onDeactivate(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); TPropertyGroup *getProperties(int targetType) { return &m_prop; } @@ -337,7 +337,7 @@ const UINT pointCount = 20; //----------------------------------------------------------------------------- -bool PaintBrushTool::onPropertyChanged(string propertyName) +bool PaintBrushTool::onPropertyChanged(std::string propertyName) { /*-- Size ---*/ if (propertyName == m_toolSize.getName()) { diff --git a/toonz/sources/tnztools/plastictool.h b/toonz/sources/tnztools/plastictool.h index fdc5d86..4e47827 100644 --- a/toonz/sources/tnztools/plastictool.h +++ b/toonz/sources/tnztools/plastictool.h @@ -188,7 +188,7 @@ public: void reset(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); public: // Methods reimplemented in each interaction mode diff --git a/toonz/sources/tnztools/pumptool.cpp b/toonz/sources/tnztools/pumptool.cpp index fbc2eca..fb842f2 100644 --- a/toonz/sources/tnztools/pumptool.cpp +++ b/toonz/sources/tnztools/pumptool.cpp @@ -38,7 +38,7 @@ class PumpTool : public TTool int m_strokeStyleId, m_strokeIndex; //!< Edited stroke indices TStroke *m_inStroke, *m_outStroke; //!< Input/Output strokes - vector m_splitStrokes; //!< Merging these, m_inStroke is reformed + std::vector m_splitStrokes; //!< Merging these, m_inStroke is reformed int m_stroke1Idx, m_stroke2Idx; //!< Indices of deformed strokes among split ones TUndo *m_undo; //!< Undo to be added upon non-trivial button up @@ -47,8 +47,8 @@ class PumpTool : public TTool double m_actionS1, m_actionS2; //!< Action center length in m_stroke double m_actionRadius; //!< Tool action radius in curve length - vector m_splitPars; //!< Split parameters for action localization - vector m_cpLenDiff1, m_cpLenDiff2; //!< Distorted CPs' length distances from action center + std::vector m_splitPars; //!< Split parameters for action localization + std::vector m_cpLenDiff1, m_cpLenDiff2; //!< Distorted CPs' length distances from action center bool m_active; //!< Whether a stroke is currently being edited bool m_enabled; //!< Tells whether the image allows editing diff --git a/toonz/sources/tnztools/rastererasertool.cpp b/toonz/sources/tnztools/rastererasertool.cpp index 5a5ca1d..74b4f22 100644 --- a/toonz/sources/tnztools/rastererasertool.cpp +++ b/toonz/sources/tnztools/rastererasertool.cpp @@ -88,14 +88,14 @@ class RectRasterUndo : public TRasterUndo TRectD m_modifyArea; TStroke *m_stroke; int m_styleId; - wstring m_colorType; - wstring m_eraseType; + std::wstring m_colorType; + std::wstring m_eraseType; bool m_selective; bool m_invert; public: RectRasterUndo(TTileSetCM32 *tileSet, const TRectD &modifyArea, TStroke stroke, - int styleId, wstring eraseType, wstring colorType, + int styleId, std::wstring eraseType, std::wstring colorType, TXshSimpleLevel *level, bool selective, bool invert, const TFrameId &frameId) : TRasterUndo(tileSet, level, frameId, false, false, 0), m_modifyArea(modifyArea), m_styleId(styleId), m_eraseType(eraseType), m_colorType(colorType), m_selective(selective), m_invert(invert) @@ -159,7 +159,7 @@ public: */ class RasterEraserUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_selective; bool m_isPencil; @@ -167,7 +167,7 @@ class RasterEraserUndo : public TRasterUndo int m_colorSelected; public: - RasterEraserUndo(TTileSetCM32 *tileSet, const vector &points, + RasterEraserUndo(TTileSetCM32 *tileSet, const std::vector &points, ColorType colorType, int styleId, bool selective, int colorSelected, TXshSimpleLevel *level, const TFrameId &frameId, bool isPencil) @@ -207,19 +207,19 @@ public: class RasterBluredEraserUndo : public TRasterUndo { - vector m_points; + std::vector m_points; int m_styleId; bool m_selective; int m_size; double m_hardness; - wstring m_mode; + std::wstring m_mode; public: RasterBluredEraserUndo(TTileSetCM32 *tileSet, - const vector &points, + const std::vector &points, int styleId, bool selective, TXshSimpleLevel *level, const TFrameId &frameId, - int size, double hardness, const wstring &mode) + int size, double hardness, const std::wstring &mode) : TRasterUndo(tileSet, level, frameId, false, false, 0), m_points(points), m_styleId(styleId), m_selective(selective), m_size(size), m_hardness(hardness), m_mode(mode) { } @@ -235,7 +235,7 @@ public: QRadialGradient brushPad = ToolUtils::getBrushPad(m_size, m_hardness); workRaster->clear(); BluredBrush brush(workRaster, m_size, brushPad, false); - vector points; + std::vector points; points.push_back(m_points[0]); TRect bbox = brush.getBoundFromPoints(points); brush.addPoint(m_points[0], 1); @@ -278,8 +278,8 @@ public: } }; -void eraseStroke(const TToonzImageP &ti, TStroke *stroke, wstring eraseType, - wstring colorType, bool invert, bool selective, +void eraseStroke(const TToonzImageP &ti, TStroke *stroke, std::wstring eraseType, + std::wstring colorType, bool invert, bool selective, int styleId, const TXshSimpleLevelP &level, const TFrameId &frameId) { assert(stroke); @@ -413,7 +413,7 @@ class EraserTool : public TTool Q_DECLARE_TR_FUNCTIONS(EraserTool) public: - EraserTool(string name); + EraserTool(std::string name); ~EraserTool() { if (m_firstStroke) @@ -446,7 +446,7 @@ public: void onEnter(); void onLeave(); void onActivate(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); void multiUpdate(const TXshSimpleLevelP &level, TFrameId firstFrameId, TFrameId lastFrameId, TRectD firstRect, TRectD lastRect); @@ -510,13 +510,13 @@ private: m_brushPos, m_firstPos; - vector m_polyline; + std::vector m_polyline; //gestione cancellino blurato TRasterCM32P m_backupRas; TRaster32P m_workRas; QRadialGradient m_brushPad; - vector m_points; + std::vector m_points; BluredBrush *m_bluredBrush; double m_pointSize, @@ -549,7 +549,7 @@ EraserTool inkPaintEraserTool("T_Eraser"); // //------------------------------------------------------------------------ -EraserTool::EraserTool(string name) +EraserTool::EraserTool(std::string name) : TTool(name), m_toolSize("Size:", 1, 100, 10, false) //W_ToolOptions_EraserToolSize , m_hardness("Hardness:", 0, 100, 100), m_eraseType("Type:") //W_ToolOptions_Erasetype @@ -703,7 +703,7 @@ void EraserTool::multiUpdate(const TXshSimpleLevelP &level, TFrameId firstFid, T backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; level->getFids(allFids); /*-- フレーム範囲に対応するFIdを取得 --*/ @@ -716,11 +716,11 @@ void EraserTool::multiUpdate(const TXshSimpleLevelP &level, TFrameId firstFid, T while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); - wstring levelName = level->getName(); + std::wstring levelName = level->getName(); /*-- FrameRangeの各フレームについて --*/ TUndoManager::manager()->beginBlock(); @@ -779,7 +779,7 @@ void EraserTool::update(const TToonzImageP &ti, TRectD selArea, const TXshSimple tileSet->add(raster, ToonzImageUtils::convertWorldToRaster(selArea, ti)); TUndo *undo; - wstring inkPaint = m_colorType.getValue(); + std::wstring inkPaint = m_colorType.getValue(); undo = new RectRasterUndo(tileSet, selArea, TStroke(), selective ? styleId : -1, m_eraseType.getValue(), inkPaint, level.getPointer(), selective, m_invertOption.getValue(), frameId); @@ -950,9 +950,9 @@ void EraserTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e) if (ti && isAdded) { m_tileSaver->save(m_normalEraser->getLastRect()); m_normalEraser->generateLastPieceOfStroke(m_pencil.getValue() || m_colorType.getValue() == AREAS); - vector brushPoints = m_normalEraser->getPointsSequence(); + std::vector brushPoints = m_normalEraser->getPointsSequence(); int m = (int)brushPoints.size(); - vector points; + std::vector points; if (m == 3) { points.push_back(brushPoints[0]); points.push_back(brushPoints[1]); @@ -985,14 +985,14 @@ void EraserTool::leftButtonDrag(const TPointD &pos, const TMouseEvent &e) if (m == 3) { // ho appena cominciato. devo disegnare un segmento TThickPoint pa = m_points.front(); - vector points; + std::vector points; points.push_back(pa); points.push_back(mid); invalidateRect = ToolUtils::getBounds(points, thickness); bbox = m_bluredBrush->getBoundFromPoints(points); m_bluredBrush->addArc(pa, (mid + pa) * 0.5, mid, 1, 1); } else { - vector points; + std::vector points; points.push_back(m_points[m - 4]); points.push_back(old); points.push_back(mid); @@ -1150,7 +1150,7 @@ void EraserTool::leftButtonUp(const TPointD &pos, const TMouseEvent &e) TThickPoint point(pos + rasCenter, m_toolSize.getValue()); m_points.push_back(point); int m = m_points.size(); - vector points; + std::vector points; points.push_back(m_points[m - 3]); points.push_back(m_points[m - 2]); points.push_back(m_points[m - 1]); @@ -1266,7 +1266,7 @@ void EraserTool::leftButtonDoubleClick(const TPointD &pos, const TMouseEvent &e) m_polyline.push_back(pos); if (m_polyline.back() != m_polyline.front()) m_polyline.push_back(m_polyline.front()); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 1)); @@ -1327,7 +1327,7 @@ void EraserTool::leftButtonDoubleClick(const TPointD &pos, const TMouseEvent &e) //---------------------------------------------------------------------- -bool EraserTool::onPropertyChanged(string propertyName) +bool EraserTool::onPropertyChanged(std::string propertyName) { /*--- 変更されたPropertyに合わせて処理を分ける ---*/ if (propertyName == m_eraseType.getName()) { @@ -1507,7 +1507,7 @@ void EraserTool::multiAreaEraser(const TXshSimpleLevelP &sl, TFrameId &firstFid, backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; sl->getFids(allFids); std::vector::iterator i0 = allFids.begin(); @@ -1519,7 +1519,7 @@ void EraserTool::multiAreaEraser(const TXshSimpleLevelP &sl, TFrameId &firstFid, while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); TUndoManager::manager()->beginBlock(); diff --git a/toonz/sources/tnztools/rasterselection.cpp b/toonz/sources/tnztools/rasterselection.cpp index 5a9f774..cdc0c28 100644 --- a/toonz/sources/tnztools/rasterselection.cpp +++ b/toonz/sources/tnztools/rasterselection.cpp @@ -111,7 +111,7 @@ TRasterPT getImageFromStroke(TRasterPT ras, const TStroke &strok TRasterPT buffer(regionsBox.getSize()); buffer->clear(); - //Compute regions created by the vector + //Compute regions created by the std::vector TVectorImage app; app.addStroke(new TStroke(stroke)); app.findRegions(); @@ -126,7 +126,7 @@ TRasterPT getImageFromStroke(TRasterPT ras, const TStroke &strok PIXEL2 *selectedLine = ras->pixels(y); int startY = y - regionsBox.y0; PIXEL1 *bufferLine = buffer->pixels(startY >= 0 ? startY : 0); - vector intersections; + std::vector intersections; app.getRegion(reg)->computeScanlineIntersections(y, intersections); if (intersections.empty()) app.getRegion(reg)->computeScanlineIntersections(y + 0.9, intersections); @@ -175,7 +175,7 @@ TRasterPT getImageFromSelection(TRasterPT &ras, RasterSelection rSelectionBound *= ras->getBounds(); TRasterPT selectedRaster(rSelectionBound.getSize()); selectedRaster->clear(); - vector strokes = selection.getStrokes(); + std::vector strokes = selection.getStrokes(); TPoint startPosition = rSelectionBound.getP00(); unsigned int i; for (i = 0; i < strokes.size(); i++) { @@ -217,7 +217,7 @@ TRasterP getImageFromSelection(const TImageP &image, RasterSelection &selection) //----------------------------------------------------------------------------- template -void deleteSelectionWithoutUndo(TRasterPT &ras, const vector &strokes, PIXEL emptyValue) +void deleteSelectionWithoutUndo(TRasterPT &ras, const std::vector &strokes, PIXEL emptyValue) { if (!ras) return; @@ -231,7 +231,7 @@ void deleteSelectionWithoutUndo(TRasterPT &ras, const vector &st if (!strokeRect.overlaps(ras->getBounds())) continue; - //Compute regions created by the vector + //Compute regions created by the std::vector TVectorImage app; app.addStroke(new TStroke(s)); app.findRegions(); @@ -246,7 +246,7 @@ void deleteSelectionWithoutUndo(TRasterPT &ras, const vector &st for (y = bBox.y0; y <= bBox.y1; y++) { PIXEL *selectedLine = ras->pixels(y); int startY = y - strokeRect.y0; - vector intersections; + std::vector intersections; app.getRegion(reg)->computeScanlineIntersections(y, intersections); if (intersections.empty()) app.getRegion(reg)->computeScanlineIntersections(y + 0.9, intersections); @@ -266,7 +266,7 @@ void deleteSelectionWithoutUndo(TRasterPT &ras, const vector &st //----------------------------------------------------------------------------- -void deleteSelectionWithoutUndo(const TImageP &image, const vector &strokes) +void deleteSelectionWithoutUndo(const TImageP &image, const std::vector &strokes) { if (TToonzImageP toonzImage = (TToonzImageP)image) { TRasterPT ras = toonzImage->getRaster(); @@ -308,9 +308,9 @@ class UndoDeleteSelection : public TUndo static int m_id; TXshSimpleLevelP m_level; TFrameId m_frameId; - string m_erasedImageId; + std::string m_erasedImageId; TPoint m_erasePoint; - vector m_strokes; + std::vector m_strokes; TTool *m_tool; public: @@ -439,8 +439,8 @@ class UndoPasteFloatingSelection : public TUndo TXshCell m_imageCell; //!< Level/frame pair to the pasted-to image //!< (seemingly cached as m_imageId) TPaletteP m_oldPalette, m_newPalette; - string m_imageId, m_floatingImageId, m_undoImageId, m_oldFloatingImageId; - vector m_strokes; + std::string m_imageId, m_floatingImageId, m_undoImageId, m_oldFloatingImageId; + std::vector m_strokes; TRectD m_selectionRect; TAffine m_transformation; TPoint m_startPos; @@ -780,7 +780,7 @@ TStroke getStrokeByRect(TRectD r) TStroke stroke; if (r.isEmpty()) return stroke; - vector points; + std::vector points; points.push_back(r.getP00()); points.push_back((r.getP00() + r.getP01()) * 0.5); points.push_back(r.getP01()); diff --git a/toonz/sources/tnztools/rasterselectiontool.cpp b/toonz/sources/tnztools/rasterselectiontool.cpp index f03ed5c..4746fb8 100644 --- a/toonz/sources/tnztools/rasterselectiontool.cpp +++ b/toonz/sources/tnztools/rasterselectiontool.cpp @@ -853,7 +853,7 @@ void RasterSelectionTool::computeBBox() m_centers.clear(); { - vector strokes = m_rasterSelection.getStrokes(); + std::vector strokes = m_rasterSelection.getStrokes(); TRectD strokesRect = m_rasterSelection.getStrokesBound(strokes); DragSelectionTool::FourPoints p; p = strokesRect; @@ -970,7 +970,7 @@ void RasterSelectionTool::onActivate() //----------------------------------------------------------------------------- -bool RasterSelectionTool::onPropertyChanged(string propertyName) +bool RasterSelectionTool::onPropertyChanged(std::string propertyName) { if (!SelectionTool::onPropertyChanged(propertyName)) return false; diff --git a/toonz/sources/tnztools/rasterselectiontool.h b/toonz/sources/tnztools/rasterselectiontool.h index 08061fb..6348abc 100644 --- a/toonz/sources/tnztools/rasterselectiontool.h +++ b/toonz/sources/tnztools/rasterselectiontool.h @@ -49,9 +49,9 @@ class UndoRasterDeform : public TUndo { static int m_id; RasterSelectionTool *m_tool; - string m_oldFloatingImageId, m_newFloatingImageId; - vector m_newStrokes; - vector m_oldStrokes; + std::string m_oldFloatingImageId, m_newFloatingImageId; + std::vector m_newStrokes; + std::vector m_oldStrokes; DragSelectionTool::DeformValues m_oldDeformValues, m_newDeformValues; FourPoints m_oldBBox, m_newBBox; TPointD m_oldCenter, m_newCenter; @@ -251,7 +251,7 @@ public: return &m_modifySavebox; return 0; } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); bool getNoAntialiasingValue() { return m_noAntialiasing.getValue(); } protected: diff --git a/toonz/sources/tnztools/rastertapetool.cpp b/toonz/sources/tnztools/rastertapetool.cpp index 6d502c1..7537bf4 100644 --- a/toonz/sources/tnztools/rastertapetool.cpp +++ b/toonz/sources/tnztools/rastertapetool.cpp @@ -145,7 +145,7 @@ class RasterTapeTool : public TTool double m_thick; TStroke *m_stroke; TStroke *m_firstStroke; - vector m_polyline; + std::vector m_polyline; bool m_firstTime; public: @@ -221,7 +221,7 @@ public: params.m_closingDistance = (int)(m_distance.getValue()); params.m_spotAngle = (int)(m_angle.getValue()); params.m_opacity = m_opacity.getValue(); - string inkString = toString(m_inkIndex.getValue()); + std::string inkString = toString(m_inkIndex.getValue()); int inkIndex = TTool::getApplication()->getCurrentLevelStyleIndex(); //TApp::instance()->getCurrentPalette()->getStyleIndex(); if (isInt(inkString)) inkIndex = toInt(inkString); @@ -255,14 +255,14 @@ public: TAutocloser ac(ras, params.m_closingDistance, params.m_spotAngle, params.m_inkIndex, params.m_opacity); - vector segments; + std::vector segments; ac.compute(segments); if ((m_closeType.getValue() == FREEHAND_CLOSE || m_closeType.getValue() == POLYLINE_CLOSE) && stroke) checkSegments(segments, stroke, raux, delta); - vector segments2(segments); + std::vector segments2(segments); /*-- segmentが取得できなければfalseを返す --*/ if (segments2.empty()) @@ -310,7 +310,7 @@ public: backward = true; } assert(firstFid <= lastFid); - vector allFids; + std::vector allFids; m_level->getFids(allFids); std::vector::iterator i0 = allFids.begin(); @@ -322,7 +322,7 @@ public: while (i1 != allFids.end() && *i1 <= lastFid) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); @@ -490,7 +490,7 @@ public: //------------------------------------------------------------ - bool onPropertyChanged(string propertyName) + bool onPropertyChanged(std::string propertyName) { if (propertyName == m_closeType.getName()) { AutocloseVectorType = toString(m_closeType.getValue()); @@ -618,7 +618,7 @@ public: if (m_closeType.getValue() == POLYLINE_CLOSE && ti) { closePolyline(pos); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 1)); @@ -806,7 +806,7 @@ public: //------------------------------------------------------------------- //! Elimina i segmenti che non sono contenuti all'interno dello stroke!!! - void checkSegments(vector &segments, TStroke *stroke, + void checkSegments(std::vector &segments, TStroke *stroke, const TRasterCM32P &ras, const TPoint &delta) { TVectorImage vi; @@ -815,7 +815,7 @@ public: app->transform(TTranslation(convert(ras->getCenter()))); vi.addStroke(app); vi.findRegions(); - vector::iterator it = segments.begin(); + std::vector::iterator it = segments.begin(); for (; it < segments.end(); it++) { if (it == segments.end()) break; diff --git a/toonz/sources/tnztools/rgbpickertool.cpp b/toonz/sources/tnztools/rgbpickertool.cpp index a63f056..dfeea8c 100644 --- a/toonz/sources/tnztools/rgbpickertool.cpp +++ b/toonz/sources/tnztools/rgbpickertool.cpp @@ -113,7 +113,7 @@ public: private: void updateLevel() const { - vector fids; + std::vector fids; if (!m_level) return; m_level->getFids(fids); @@ -177,7 +177,7 @@ void setCurrentColorWithUndo(const TPixel32 &color) setCurrentColor(color); if (level) { - vector fids; + std::vector fids; level->getFids(fids); invalidateIcons(level, fids); } @@ -239,7 +239,7 @@ void RGBPickerTool::onImageChanged() TUndoManager::manager()->add(new UndoPickRGBM(palette, styleId, m_currentValue, level)); setCurrentColor(m_currentValue); if (level) { - vector fids; + std::vector fids; level->getFids(fids); invalidateIcons(level, fids); } @@ -361,7 +361,7 @@ void RGBPickerTool::leftButtonDoubleClick(const TPointD &pos, const TMouseEvent return; if (m_pickType.getValue() == POLYLINE_PICK) { closePolyline(pos, convert(e.m_pos)); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_workingPolyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_workingPolyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_workingPolyline[i] + m_workingPolyline[i + 1]), 1)); @@ -522,7 +522,7 @@ void RGBPickerTool::pickStroke() TUndoManager::manager()->add(new UndoPickRGBM(palette, styleId, m_currentValue, level)); setCurrentColor(m_currentValue); if (level) { - vector fids; + std::vector fids; level->getFids(fids); invalidateIcons(level, fids); } @@ -531,7 +531,7 @@ void RGBPickerTool::pickStroke() //--------------------------------------------------------- -bool RGBPickerTool::onPropertyChanged(string propertyName) +bool RGBPickerTool::onPropertyChanged(std::string propertyName) { if (propertyName == m_pickType.getName()) PickVectorType = toString(m_pickType.getValue()); diff --git a/toonz/sources/tnztools/rgbpickertool.h b/toonz/sources/tnztools/rgbpickertool.h index 3921d97..cea7b34 100644 --- a/toonz/sources/tnztools/rgbpickertool.h +++ b/toonz/sources/tnztools/rgbpickertool.h @@ -22,7 +22,7 @@ class RGBPickerTool : public TTool TEnumProperty m_pickType; TBoolProperty m_passivePick; - vector m_toolOptionsBox; + std::vector m_toolOptionsBox; //Aggiunte per disegnare il lazzo a la polyline StrokeGenerator m_drawingTrack; @@ -32,8 +32,8 @@ class RGBPickerTool : public TTool double m_thick; TStroke *m_stroke; TStroke *m_firstStroke; - vector m_drawingPolyline; - vector m_workingPolyline; + std::vector m_drawingPolyline; + std::vector m_workingPolyline; bool m_makePick; public: @@ -71,7 +71,7 @@ public: void pickStroke(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onActivate(); diff --git a/toonz/sources/tnztools/rulertool.h b/toonz/sources/tnztools/rulertool.h index f2ea998..971349d 100644 --- a/toonz/sources/tnztools/rulertool.h +++ b/toonz/sources/tnztools/rulertool.h @@ -27,7 +27,7 @@ class RulerTool : public TTool bool m_justClicked; - vector m_toolOptionsBox; + std::vector m_toolOptionsBox; public: RulerTool(); diff --git a/toonz/sources/tnztools/selectiontool.cpp b/toonz/sources/tnztools/selectiontool.cpp index f24e4a5..d8a8a3b 100644 --- a/toonz/sources/tnztools/selectiontool.cpp +++ b/toonz/sources/tnztools/selectiontool.cpp @@ -75,7 +75,7 @@ namespace //----------------------------------------------------------------------------- //Return index of point with min x or y -int tminPoint(vector points, bool isX) +int tminPoint(std::vector points, bool isX) { int i; int index = 0; @@ -93,7 +93,7 @@ int tminPoint(vector points, bool isX) int tminPoint(TPointD p0, TPointD p1, bool isX) { - vector v; + std::vector v; v.push_back(p0); v.push_back(p1); return tminPoint(v, isX); @@ -111,13 +111,13 @@ FourPoints DragSelectionTool::FourPoints::orderedPoints() const { FourPoints newPoints; int i; - vector allPoints; + std::vector allPoints; allPoints.push_back(m_p00); allPoints.push_back(m_p01); allPoints.push_back(m_p10); allPoints.push_back(m_p11); int minXindex1 = tminPoint(allPoints, true); - vector points; + std::vector points; for (i = 0; i < 4; i++) if (i != minXindex1) points.push_back(allPoints[i]); @@ -131,7 +131,7 @@ FourPoints DragSelectionTool::FourPoints::orderedPoints() const newPoints.setP00(newPoint1); newPoints.setP01(newPoint2); - vector points2; + std::vector points2; for (i = 0; i < 3; i++) if (i != minXindex2) points2.push_back(points[i]); @@ -1292,7 +1292,7 @@ void SelectionTool::onSelectionChanged() //----------------------------------------------------------------------------- -bool SelectionTool::onPropertyChanged(string propertyName) +bool SelectionTool::onPropertyChanged(std::string propertyName) { if (propertyName == m_strokeSelectionType.getName()) { SelectionType = toString(m_strokeSelectionType.getValue()); @@ -1406,7 +1406,7 @@ void SelectionTool::closePolyline(const TPointD &pos) if (m_polyline.back() != m_polyline.front()) m_polyline.push_back(m_polyline.front()); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 0)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 0)); diff --git a/toonz/sources/tnztools/selectiontool.h b/toonz/sources/tnztools/selectiontool.h index e771408..699b439 100644 --- a/toonz/sources/tnztools/selectiontool.h +++ b/toonz/sources/tnztools/selectiontool.h @@ -38,7 +38,7 @@ protected: TPointD m_originalP00; TPointD m_originalP11; - vector m_newPoints; + std::vector m_newPoints; public: FreeDeformer() {} @@ -319,7 +319,7 @@ protected: DragSelectionTool::DragTool *m_dragTool; StrokeGenerator m_track; - vector m_polyline; + std::vector m_polyline; TPointD m_mousePosition; TStroke *m_stroke; @@ -442,7 +442,7 @@ public: TPropertyGroup *getProperties(int targetType) { return &m_prop; } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); }; #endif //SELECTIONTOOL_INCLUDED diff --git a/toonz/sources/tnztools/skeletontool.cpp b/toonz/sources/tnztools/skeletontool.cpp index c0df85a..ce0c906 100644 --- a/toonz/sources/tnztools/skeletontool.cpp +++ b/toonz/sources/tnztools/skeletontool.cpp @@ -255,7 +255,7 @@ SkeletonTool::~SkeletonTool() //------------------------------------------------------------------- -bool SkeletonTool::onPropertyChanged(string propertyName) +bool SkeletonTool::onPropertyChanged(std::string propertyName) { SkeletonGlobalKeyFrame = (int)(m_globalKeyframes.getValue()); // SkeletonInverseKinematics=(int)(m_ikEnabled.getValue()); @@ -724,7 +724,7 @@ void SkeletonTool::drawSkeleton(const Skeleton &skeleton, int row) bool changingParent = dynamic_cast(m_dragTool) != 0; TStageObjectId currentObjectId = TTool::getApplication()->getCurrentObject()->getObjectId(); - string currentHandle = xsh->getStageObject(currentObjectId)->getHandle(); + std::string currentHandle = xsh->getStageObject(currentObjectId)->getHandle(); for (i = 0; i < (int)showBoneIndex.size(); i++) { Skeleton::Bone *bone = skeleton.getBone(showBoneIndex[i]); @@ -1226,7 +1226,7 @@ void SkeletonTool::drawDrawingBrowser(const TXshCell &cell, const TPointD ¢e return; double pixelSize = getPixelSize(); - string name = toString(cell.m_level->getName()) + "." + toString(cell.m_frameId.getNumber()); + std::string name = toString(cell.m_level->getName()) + "." + toString(cell.m_frameId.getNumber()); QString qText = QString::fromStdString(name); QFont font("Arial", 10); // ,QFont::Bold); diff --git a/toonz/sources/tnztools/skeletontool.h b/toonz/sources/tnztools/skeletontool.h index 8dc78d5..fa55e2d 100644 --- a/toonz/sources/tnztools/skeletontool.h +++ b/toonz/sources/tnztools/skeletontool.h @@ -102,7 +102,7 @@ public: m_temporaryPinnedColumns.clear(); } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void draw(); diff --git a/toonz/sources/tnztools/strokeselection.cpp b/toonz/sources/tnztools/strokeselection.cpp index 7d35b2c..0dd98ce 100644 --- a/toonz/sources/tnztools/strokeselection.cpp +++ b/toonz/sources/tnztools/strokeselection.cpp @@ -139,13 +139,13 @@ bool pasteStrokesWithoutUndo(TVectorImageP image, std::set &outIndexes, void deleteStrokesWithoutUndo(TVectorImageP image, std::set &indexes) { QMutexLocker lock(image->getMutex()); - vector indexesV(indexes.begin(), indexes.end()); + std::vector indexesV(indexes.begin(), indexes.end()); TRectD bbox; UINT i = 0; for (; i < indexesV.size(); i++) bbox += image->getStroke(indexesV[i])->getBBox(); - vector regions; + std::vector regions; ImageUtils::getFillingInformationOverlappingArea(image, regions, bbox); TVectorImageP other = image->splitImage(indexesV, true); @@ -272,12 +272,12 @@ class RemoveEndpointsUndo : public TUndo { TXshSimpleLevelP m_level; TFrameId m_frameId; - vector> m_strokes; + std::vector> m_strokes; public: RemoveEndpointsUndo(TXshSimpleLevel *level, const TFrameId &frameId, - vector> strokes) + std::vector> strokes) : m_level(level), m_frameId(frameId), m_strokes(strokes) { @@ -479,14 +479,14 @@ void StrokeSelection::removeEndpoints() if (m_indexes.empty()) return; - vector> undoData; + std::vector> undoData; m_vi->findRegions(); set::iterator it = m_indexes.begin(); for (; it != m_indexes.end(); ++it) { TStroke *s = m_vi->removeEndpoints(*it); if (s) - undoData.push_back(pair(*it, s)); + undoData.push_back(std::pair(*it, s)); } TTool *tool = TTool::getApplication()->getCurrentTool()->getTool(); TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); @@ -670,8 +670,8 @@ namespace class UndoSetStrokeStyle : public TUndo { TVectorImageP m_image; - vector m_strokeIndexes; - vector m_oldStyles; + std::vector m_strokeIndexes; + std::vector m_oldStyles; int m_newStyle; public: diff --git a/toonz/sources/tnztools/stylepicker.cpp b/toonz/sources/tnztools/stylepicker.cpp index 4f916cd..ac741f3 100644 --- a/toonz/sources/tnztools/stylepicker.cpp +++ b/toonz/sources/tnztools/stylepicker.cpp @@ -183,7 +183,7 @@ TPixel32 getAverageColor(const TRect &rect) #error "unknown channel order!" #endif UINT r = 0, g = 0, b = 0, m = 0; - vector buffer(rect.getLx() * rect.getLy()); + std::vector buffer(rect.getLx() * rect.getLy()); glReadPixels(rect.x0, rect.y0, rect.getLx(), rect.getLy(), fmt, GL_UNSIGNED_BYTE, &buffer[0]); int size = rect.getLx() * rect.getLy(); for (int i = 0; i < size; i++) { @@ -216,7 +216,7 @@ TPixel32 getAverageColor(TStroke *stroke) //leggo il buffer e mi prendo i pixels UINT r = 0, g = 0, b = 0, m = 0; TRect rect = convert(stroke->getBBox()); - vector buffer(rect.getLx() * rect.getLy()); + std::vector buffer(rect.getLx() * rect.getLy()); glReadPixels(rect.x0, rect.y0, rect.getLx(), rect.getLy(), fmt, GL_UNSIGNED_BYTE, &buffer[0]); //calcolo le regioni dello stroke @@ -231,7 +231,7 @@ TPixel32 getAverageColor(TStroke *stroke) TRegion *reg = aux.getRegion(j); TRect regRect = convert(reg->getBBox()); for (int y = regRect.y0; y < regRect.y1; y++) { - vector intersections; + std::vector intersections; reg->computeScanlineIntersections(y, intersections); assert(!(intersections.size() & 0x1)); for (UINT i = 0; i < intersections.size(); i += 2) { diff --git a/toonz/sources/tnztools/tool.cpp b/toonz/sources/tnztools/tool.cpp index f35a281..2a21fca 100644 --- a/toonz/sources/tnztools/tool.cpp +++ b/toonz/sources/tnztools/tool.cpp @@ -130,14 +130,14 @@ std::vector TTool::m_cellsData; // TTool implementation //***************************************************************************************** -TTool::TTool(string name) +TTool::TTool(std::string name) : m_name(name), m_viewer(0), m_targetType(NoTarget), m_enabled(true), m_active(false), m_picking(false) { } //------------------------------------------------------------------- -TTool *TTool::getTool(string toolName, ToolTargetType targetType) +TTool *TTool::getTool(std::string toolName, ToolTargetType targetType) { if (!toolTable) return 0; diff --git a/toonz/sources/tnztools/tooloptions.cpp b/toonz/sources/tnztools/tooloptions.cpp index 28b37c2..77eb1f6 100644 --- a/toonz/sources/tnztools/tooloptions.cpp +++ b/toonz/sources/tnztools/tooloptions.cpp @@ -121,7 +121,7 @@ QLabel *ToolOptionsBox::addLabel(QString name) //----------------------------------------------------------------------------- -void ToolOptionsBox::addLabel(string propName, QLabel *label) +void ToolOptionsBox::addLabel(std::string propName, QLabel *label) { m_labels[propName] = label; } @@ -157,7 +157,7 @@ ToolOptionControl *ToolOptionsBox::control(const std::string &controlName) const void ToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -311,7 +311,7 @@ void ToolOptionControlBuilder::visit(TBoolProperty *p) m_panel->addControl(control); if (p->getId() != "") { - string actionName = "A_ToolOption_" + p->getId(); + std::string actionName = "A_ToolOption_" + p->getId(); QAction *a = CommandManager::instance()->getAction(actionName.c_str()); if (a) { control->addAction(a); @@ -367,7 +367,7 @@ void ToolOptionControlBuilder::visit(TEnumProperty *p) hLayout()->addSpacing(5); if (p->getId() != "") { - string actionName = "A_ToolOption_" + p->getId(); + std::string actionName = "A_ToolOption_" + p->getId(); QAction *a = CommandManager::instance()->getAction(actionName.c_str()); if (a) { @@ -380,8 +380,8 @@ void ToolOptionControlBuilder::visit(TEnumProperty *p) QSignalMapper *signalMapper = 0; int index = 0; for (it = range.begin(); it != range.end(); ++it, ++index) { - string item = toString(*it); - string itemActionName = actionName + ":" + item; + std::string item = toString(*it); + std::string itemActionName = actionName + ":" + item; a = CommandManager::instance()->getAction(itemActionName.c_str()); if (a) { widget->addAction(a); @@ -776,7 +776,7 @@ ArrowToolOptionsBox::ArrowToolOptionsBox(QWidget *parent, TTool *tool, TProperty /* --- Assigning shortcut keys --- */ if (activeAxisProp->getId() != "") { - string actionName = "A_ToolOption_" + activeAxisProp->getId(); + std::string actionName = "A_ToolOption_" + activeAxisProp->getId(); QAction *a = CommandManager::instance()->getAction(actionName.c_str()); if (a) { @@ -789,8 +789,8 @@ ArrowToolOptionsBox::ArrowToolOptionsBox(QWidget *parent, TTool *tool, TProperty QSignalMapper *signalMapper = 0; int index = 0; for (it = range.begin(); it != range.end(); ++it, ++index) { - string item = toString(*it); - string itemActionName = actionName + ":" + item; + std::string item = toString(*it); + std::string itemActionName = actionName + ":" + item; a = CommandManager::instance()->getAction(itemActionName.c_str()); if (a) { m_chooseActiveAxisCombo->addAction(a); @@ -1094,7 +1094,7 @@ SelectionToolOptionsBox::SelectionToolOptionsBox(QWidget *parent, TTool *tool, T void SelectionToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); @@ -1242,7 +1242,7 @@ GeometricToolOptionsBox::GeometricToolOptionsBox(QWidget *parent, TTool *tool, T void GeometricToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -1312,7 +1312,7 @@ TypeToolOptionsBox::TypeToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHan void TypeToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -1356,7 +1356,7 @@ PaintbrushToolOptionsBox::PaintbrushToolOptionsBox(QWidget *parent, TTool *tool, void PaintbrushToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -1428,7 +1428,7 @@ FillToolOptionsBox::FillToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHan void FillToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -1574,7 +1574,7 @@ BrushToolOptionsBox::BrushToolOptionsBox(QWidget *parent, TTool *tool, TPaletteH void BrushToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); @@ -1702,7 +1702,7 @@ EraserToolOptionsBox::EraserToolOptionsBox(QWidget *parent, TTool *tool, TPalett void EraserToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -1949,7 +1949,7 @@ TapeToolOptionsBox::TapeToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHan void TapeToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -2091,7 +2091,7 @@ RGBPickerToolOptionsBox::RGBPickerToolOptionsBox(QWidget *parent, TTool *tool, T void RGBPickerToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } @@ -2148,7 +2148,7 @@ StylePickerToolOptionsBox::StylePickerToolOptionsBox(QWidget *parent, TTool *too void StylePickerToolOptionsBox::updateStatus() { - QMap::iterator it; + QMap::iterator it; for (it = m_controls.begin(); it != m_controls.end(); it++) it.value()->updateStatus(); } diff --git a/toonz/sources/tnztools/tooloptionscontrols.cpp b/toonz/sources/tnztools/tooloptionscontrols.cpp index 28ef7dd..1ed72b8 100644 --- a/toonz/sources/tnztools/tooloptionscontrols.cpp +++ b/toonz/sources/tnztools/tooloptionscontrols.cpp @@ -46,7 +46,7 @@ using namespace DVGui; // ToolOptionControl implementation //*********************************************************************************** -ToolOptionControl::ToolOptionControl(TTool *tool, string propertyName, ToolHandle *toolHandle) +ToolOptionControl::ToolOptionControl(TTool *tool, std::string propertyName, ToolHandle *toolHandle) : m_tool(tool), m_propertyName(propertyName), m_toolHandle(toolHandle) { } @@ -614,7 +614,7 @@ void ToolOptionCombo::onActivated(int index) if (index < 0 || index >= (int)range.size()) return; - wstring item = range[index]; + std::wstring item = range[index]; m_property->setValue(item); notifyTool(); } @@ -696,7 +696,7 @@ void ToolOptionPopupButton::onActivated(int index) if (index < 0 || index >= (int)range.size()) return; - wstring item = range[index]; + std::wstring item = range[index]; m_property->setValue(item); notifyTool(); } @@ -980,7 +980,7 @@ MeasuredValueField::~MeasuredValueField() //----------------------------------------------------------------------------- -void MeasuredValueField::setMeasure(string name) +void MeasuredValueField::setMeasure(std::string name) { // for reproducing the precision int oldPrec = -1; diff --git a/toonz/sources/tnztools/tooloptionscontrols.h b/toonz/sources/tnztools/tooloptionscontrols.h index 4c60b07..f3d2bff 100644 --- a/toonz/sources/tnztools/tooloptionscontrols.h +++ b/toonz/sources/tnztools/tooloptionscontrols.h @@ -335,7 +335,7 @@ public: MeasuredValueField(QWidget *parent, QString name = "numfield"); ~MeasuredValueField(); - void setMeasure(string name); + void setMeasure(std::string name); void enableGlobalKeyframe(bool isGlobalKeyframe) { m_isGlobalKeyframe = isGlobalKeyframe; } diff --git a/toonz/sources/tnztools/toolutils.cpp b/toonz/sources/tnztools/toolutils.cpp index 18e96b2..d51951c 100644 --- a/toonz/sources/tnztools/toolutils.cpp +++ b/toonz/sources/tnztools/toolutils.cpp @@ -53,10 +53,10 @@ namespace { //!Riempie il vettore \b theVect con gli indici degli stroke contenuti nel mapping \b theMap. -void mapToVector(const map &theMap, vector &theVect) +void mapToVector(const std::map &theMap, std::vector &theVect) { assert(theMap.size() == theVect.size()); - map::const_iterator it = theMap.begin(); + std::map::const_iterator it = theMap.begin(); UINT i = 0; for (; it != theMap.end(); ++it) { theVect[i++] = it->first; @@ -427,7 +427,7 @@ TRaster32P ToolUtils::convertStrokeToImage(TStroke *stroke, const TRect &imageBo TStroke *ToolUtils::merge(const ArrayOfStroke &a) { - vector v; + std::vector v; TStroke *ref = 0; int controlPoints = 0; @@ -602,7 +602,7 @@ void ToolUtils::TToolUndo::notifyImageChanged() const IconGenerator::instance()->invalidateSceneIcon(); if (m_level && m_level->getType() == PLI_XSHLEVEL) { - string id = m_level->getImageId(m_frameId) + "_rasterized"; + std::string id = m_level->getImageId(m_frameId) + "_rasterized"; ImageManager::instance()->invalidate(id); } } @@ -718,7 +718,7 @@ void ToolUtils::TFullColorRasterUndo::undo() const TRasterImageP image = getImage(); if (!image) return; - vector rects = paste(image, m_tiles); + std::vector rects = paste(image, m_tiles); int i; TRect resRect = rects[0]; for (i = 1; i < (int)rects.size(); i++) @@ -733,9 +733,9 @@ void ToolUtils::TFullColorRasterUndo::undo() const //----------------------------------------------------------------------------- -vector ToolUtils::TFullColorRasterUndo::paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet) const +std::vector ToolUtils::TFullColorRasterUndo::paste(const TRasterImageP &ti, const TTileSetFullColor *tileSet) const { - vector rects; + std::vector rects; TRasterP raster = ti->getRaster(); for (int i = 0; i < tileSet->getTileCount(); i++) { const TTileSetFullColor::Tile *tile = tileSet->getTile(i); @@ -899,7 +899,7 @@ void ToolUtils::UndoModifyStrokeAndPaint::onAdd() UndoModifyStroke::onAdd(); TStroke *stroke = image->getStroke(m_strokeIndex); - m_fillInformation = new vector; + m_fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(image, *m_fillInformation, m_oldBBox, stroke->getBBox()); } @@ -955,7 +955,7 @@ int ToolUtils::UndoModifyStrokeAndPaint::getSize() const //----------------------------------------------------------------------------- ToolUtils::UndoModifyListStroke::UndoModifyListStroke(TXshSimpleLevel *level, const TFrameId &frameId, - const vector &strokeVect) + const std::vector &strokeVect) : TToolUndo(level, frameId), m_fillInformation(0) { UINT strokeNum = strokeVect.size(); @@ -983,7 +983,7 @@ ToolUtils::UndoModifyListStroke::~UndoModifyListStroke() void ToolUtils::UndoModifyListStroke::onAdd() { - list::iterator it = m_beginIt; + std::list::iterator it = m_beginIt; TRectD newBBox; TVectorImageP image = m_level->getFrame(m_frameId, true); @@ -995,7 +995,7 @@ void ToolUtils::UndoModifyListStroke::onAdd() TStroke *s = image->getStroke((*it)->m_strokeIndex); (*it)->onAdd(); } - m_fillInformation = new vector; + m_fillInformation = new std::vector; if (m_beginIt != m_endIt) ImageUtils::getFillingInformationOverlappingArea(image, *m_fillInformation, m_oldBBox, newBBox); @@ -1009,7 +1009,7 @@ void ToolUtils::UndoModifyListStroke::undo() const if (!app) return; - list::iterator stroke_it = m_beginIt; + std::list::iterator stroke_it = m_beginIt; if (m_beginIt == m_endIt) return; @@ -1050,7 +1050,7 @@ void ToolUtils::UndoModifyListStroke::redo() const if (!app) return; - list::iterator it = m_beginIt; + std::list::iterator it = m_beginIt; for (; it != m_endIt; ++it) { (*it)->redo(); @@ -1066,7 +1066,7 @@ int ToolUtils::UndoModifyListStroke::getSize() const { int sum = 0; - list::iterator it = m_beginIt; + std::list::iterator it = m_beginIt; for (; it != m_endIt; ++it) { sum += (*it)->getSize(); @@ -1081,7 +1081,7 @@ int ToolUtils::UndoModifyListStroke::getSize() const //============================================================================================= ToolUtils::UndoPencil::UndoPencil(TStroke *stroke, - vector *fillInformation, + std::vector *fillInformation, TXshSimpleLevel *level, const TFrameId &frameId, bool createdFrame, bool createdLevel, bool autogroup, bool autofill) @@ -1201,7 +1201,7 @@ int ToolUtils::UndoPencil::getSize() const ToolUtils::UndoRasterPencil::UndoRasterPencil(TXshSimpleLevel *level, const TFrameId &frameId, TStroke *stroke, bool selective, bool filled, bool doAntialias, bool createdFrame, - bool createdLevel, string primitiveName) + bool createdLevel, std::string primitiveName) : TRasterUndo(0, level, frameId, createdFrame, createdLevel, 0), m_selective(selective), m_filled(filled), m_doAntialias(doAntialias), m_primitiveName(primitiveName) { TRasterCM32P raster = getImage()->getRaster(); @@ -1798,7 +1798,7 @@ TRectD ToolUtils::interpolateRect(const TRectD &rect1, const TRectD &rect2, doub //----------------------------------------------------------------------------- /* -bool ToolUtils::isASubRegion(int reg, const vector ®ions) +bool ToolUtils::isASubRegion(int reg, const std::vector ®ions) { TRegion *region=regions[reg]; for (int i=0; i<(int)regions.size(); i++) @@ -1812,7 +1812,7 @@ bool ToolUtils::isASubRegion(int reg, const vector ®ions) */ //----------------------------------------------------------------------------- -TRectD ToolUtils::getBounds(const vector &points, double maxThickness) +TRectD ToolUtils::getBounds(const std::vector &points, double maxThickness) { TThickPoint p = points[0]; double radius = maxThickness == 0 ? p.thick * 0.5 : maxThickness * 0.5; diff --git a/toonz/sources/tnztools/trackertool.cpp b/toonz/sources/tnztools/trackertool.cpp index 2418d4c..c05fed9 100644 --- a/toonz/sources/tnztools/trackertool.cpp +++ b/toonz/sources/tnztools/trackertool.cpp @@ -224,7 +224,7 @@ public: TPropertyGroup *getProperties(int targetType) { return &m_prop; } void onSelectionChanged() { invalidate(); } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); bool select(const TSelection *) { return false; } bool pick(int &hookIndex, const TPointD &pos); @@ -342,7 +342,7 @@ void TrackerTool::draw() char *objectChar = (char *)malloc(2); objectChar[0] = (char)(objectId + 65); objectChar[1] = '\0'; - string text(objectChar); + std::string text(objectChar); tglDrawText(TPointD(-15, 10), text); glPopMatrix(); } @@ -351,7 +351,7 @@ void TrackerTool::draw() TPointD p1 = hook->getBPos(fid); bool linked = p0 == p1; drawHook(p0, linked ? ToolUtils::NormalHook : ToolUtils::PassHookA, m_hookSelectedIndex == i); - string hookName = toString(i + 1); + std::string hookName = toString(i + 1); TPixel32 balloonColor(200, 220, 205, 200); TPoint balloonOffset(20, 20); drawBalloon(p0, hookName, balloonColor, balloonOffset, false, &balloons); diff --git a/toonz/sources/tnztools/typetool.cpp b/toonz/sources/tnztools/typetool.cpp index e9bf9c0..9e0ca3f 100644 --- a/toonz/sources/tnztools/typetool.cpp +++ b/toonz/sources/tnztools/typetool.cpp @@ -100,13 +100,13 @@ const double cBorderSize = 15; class UndoTypeTool : public ToolUtils::TToolUndo { - vector m_strokes; - vector *m_fillInformationBefore, *m_fillInformationAfter; + std::vector m_strokes; + std::vector *m_fillInformationBefore, *m_fillInformationAfter; TVectorImageP m_image; public: - UndoTypeTool(vector *fillInformationBefore, - vector *fillInformationAfter, + UndoTypeTool(std::vector *fillInformationBefore, + std::vector *fillInformationAfter, TXshSimpleLevel *level, const TFrameId &frameId, bool isFrameCreated, bool isLevelCreated) : ToolUtils::TToolUndo(level, frameId, isFrameCreated, isLevelCreated), m_fillInformationBefore(fillInformationBefore), m_fillInformationAfter(fillInformationAfter) @@ -333,8 +333,8 @@ class TypeTool : public TTool // valori correnti di alcune Properties, // duplicati per permettere controlli sulla validita' o per ottimizzazione - wstring m_fontFamily; - wstring m_typeface; + std::wstring m_fontFamily; + std::wstring m_typeface; double m_dimension; bool m_validFonts; //false iff there are problems with font loading @@ -344,7 +344,7 @@ class TypeTool : public TTool int m_styleId; double m_pixelSize; - vector m_string; + std::vector m_string; int m_cursorIndex; // indice del carattere successivo al cursore std::pair m_preeditRange; @@ -371,9 +371,9 @@ public: void initTypeFaces(); void loadFonts(); - void setFont(wstring fontFamily); - void setTypeface(wstring typeface); - void setSize(wstring size); + void setFont(std::wstring fontFamily); + void setTypeface(std::wstring typeface); + void setSize(std::wstring size); void setVertical(bool vertical); void draw(); @@ -388,14 +388,14 @@ public: void mouseMove(const TPointD &pos, const TMouseEvent &); void leftButtonDown(const TPointD &pos, const TMouseEvent &); void rightButtonDown(const TPointD &pos, const TMouseEvent &); - bool keyDown(int key, wstring unicodeChar, TUINT32 flags, const TPoint &pos); + bool keyDown(int key, std::wstring unicodeChar, TUINT32 flags, const TPoint &pos); void onInputText(std::wstring preedit, std::wstring commit, int replacementStart, int replacementLen); // cancella gli StrokeChar fra from e to-1 e inserisce nuovi StrokeChar // corrispondenti a text a partire da from - void replaceText(wstring text, int from, int to); + void replaceText(std::wstring text, int from, int to); - void addBaseChar(wstring text); + void addBaseChar(std::wstring text); void addReturn(); void cursorUp(); void cursorDown(); @@ -418,7 +418,7 @@ public: return m_cursorId; } - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); TPropertyGroup *getProperties(int targetType) { @@ -480,7 +480,7 @@ void TypeTool::updateTranslation() //--------------------------------------------------------- -bool TypeTool::onPropertyChanged(string propertyName) +bool TypeTool::onPropertyChanged(std::string propertyName) { if (!m_validFonts) return false; @@ -539,14 +539,14 @@ void TypeTool::loadFonts() if (!m_validFonts) return; - vector names; + std::vector names; instance->getAllFamilies(names); - for (vector::iterator it = names.begin(); it != names.end(); ++it) + for (std::vector::iterator it = names.begin(); it != names.end(); ++it) m_fontFamilyMenu.addValue(*it); - string favFontApp = EnvCurrentFont; - wstring favouriteFont = toWideString(favFontApp); + std::string favFontApp = EnvCurrentFont; + std::wstring favouriteFont = toWideString(favFontApp); if (m_fontFamilyMenu.isValue(favouriteFont)) { m_fontFamilyMenu.setValue(favouriteFont); setFont(favouriteFont); @@ -562,11 +562,11 @@ void TypeTool::loadFonts() void TypeTool::initTypeFaces() { TFontManager *instance = TFontManager::instance(); - vector typefaces; + std::vector typefaces; instance->getAllTypefaces(typefaces); - wstring oldTypeface = m_typeFaceMenu.getValue(); + std::wstring oldTypeface = m_typeFaceMenu.getValue(); m_typeFaceMenu.deleteAllValues(); - for (vector::iterator it = typefaces.begin(); it != typefaces.end(); ++it) + for (std::vector::iterator it = typefaces.begin(); it != typefaces.end(); ++it) m_typeFaceMenu.addValue(*it); if (m_typeFaceMenu.isValue(oldTypeface)) m_typeFaceMenu.setValue(oldTypeface); @@ -574,7 +574,7 @@ void TypeTool::initTypeFaces() //--------------------------------------------------------- -void TypeTool::setFont(wstring family) +void TypeTool::setFont(std::wstring family) { if (m_fontFamily == family) return; @@ -583,7 +583,7 @@ void TypeTool::setFont(wstring family) instance->setFamily(family); m_fontFamily = family; - wstring oldTypeface = m_typeFaceMenu.getValue(); + std::wstring oldTypeface = m_typeFaceMenu.getValue(); initTypeFaces(); if (oldTypeface != m_typeFaceMenu.getValue()) { if (m_typeFaceMenu.isValue(L"Regular")) { @@ -613,7 +613,7 @@ void TypeTool::setFont(wstring family) //--------------------------------------------------------- -void TypeTool::setTypeface(wstring typeface) +void TypeTool::setTypeface(std::wstring typeface) { if (m_typeface == typeface) return; @@ -632,7 +632,7 @@ void TypeTool::setTypeface(wstring typeface) //--------------------------------------------------------- -void TypeTool::setSize(wstring strSize) +void TypeTool::setSize(std::wstring strSize) { // font e tool fields update @@ -976,12 +976,12 @@ void TypeTool::addTextToVectorImage(const TVectorImageP ¤tImage, std::vect { UINT oldSize = currentImage->getStrokeCount(); - vector *fillInformationBefore = new vector; + std::vector *fillInformationBefore = new std::vector; ImageUtils::getFillingInformationOverlappingArea(currentImage, *fillInformationBefore, m_textBox); currentImage->mergeImage(images); - vector *fillInformationAfter = new vector; + std::vector *fillInformationAfter = new std::vector; ImageUtils::getFillingInformationOverlappingArea(currentImage, *fillInformationAfter, m_textBox); UINT newSize = currentImage->getStrokeCount(); @@ -1273,7 +1273,7 @@ void TypeTool::rightButtonDown(const TPointD &pos, const TMouseEvent &) // cancella [from,to[ da m_string e lo rimpiazza con text // n.b. NON fa updateCharPositions() -void TypeTool::replaceText(wstring text, int from, int to) +void TypeTool::replaceText(std::wstring text, int from, int to) { int stringLength = m_string.size(); from = tcrop(from, 0, stringLength); @@ -1362,7 +1362,7 @@ void TypeTool::addReturn() //--------------------------------------------------------- -void TypeTool::addBaseChar(wstring text) +void TypeTool::addBaseChar(std::wstring text) { TFontManager *instance = TFontManager::instance(); @@ -1496,7 +1496,7 @@ void TypeTool::deleteKey() //--------------------------------------------------------- -bool TypeTool::keyDown(int key, wstring unicodeChar, TUINT32 flags, const TPoint &pos) +bool TypeTool::keyDown(int key, std::wstring unicodeChar, TUINT32 flags, const TPoint &pos) { // per sicurezza m_preeditRange = std::make_pair(0, 0); diff --git a/toonz/sources/tnztools/vectorerasertool.cpp b/toonz/sources/tnztools/vectorerasertool.cpp index 03025e2..408b1e0 100644 --- a/toonz/sources/tnztools/vectorerasertool.cpp +++ b/toonz/sources/tnztools/vectorerasertool.cpp @@ -61,10 +61,10 @@ const double minDistance2 = 16.0; //4 pixel //----------------------------------------------------------------------------- -void mapToVector(const map &theMap, vector &theVect) +void mapToVector(const std::map &theMap, std::vector &theVect) { assert(theMap.size() == theVect.size()); - map::const_iterator it = theMap.begin(); + std::map::const_iterator it = theMap.begin(); UINT i = 0; for (; it != theMap.end(); ++it) { theVect[i++] = it->first; @@ -75,14 +75,14 @@ void mapToVector(const map &theMap, vector &theVect) class UndoEraser : public ToolUtils::TToolUndo { - vector m_oldFillInformation, m_newFillInformation; + std::vector m_oldFillInformation, m_newFillInformation; int m_row; int m_column; public: - map m_originalStrokes; - map m_newStrokes; + std::map m_originalStrokes; + std::map m_newStrokes; UndoEraser(TXshSimpleLevel *level, const TFrameId &frameId) : ToolUtils::TToolUndo(level, frameId) @@ -109,7 +109,7 @@ public: ~UndoEraser() { - map::const_iterator it; + std::map::const_iterator it; for (it = m_originalStrokes.begin(); it != m_originalStrokes.end(); ++it) deleteVIStroke(it->second); for (it = m_newStrokes.begin(); it != m_newStrokes.end(); ++it) @@ -119,13 +119,13 @@ public: void addOldStroke(int index, VIStroke *stroke) { VIStroke *s = cloneVIStroke(stroke); - m_originalStrokes.insert(map::value_type(index, s)); + m_originalStrokes.insert(std::map::value_type(index, s)); } void addNewStroke(int index, VIStroke *stroke) { VIStroke *s = cloneVIStroke(stroke); - m_newStrokes.insert(map::value_type(index, s)); + m_newStrokes.insert(std::map::value_type(index, s)); } void undo() const @@ -149,12 +149,12 @@ public: if (!image) return; QMutexLocker lock(image->getMutex()); - vector newStrokeIndex(m_newStrokes.size()); + std::vector newStrokeIndex(m_newStrokes.size()); mapToVector(m_newStrokes, newStrokeIndex); image->removeStrokes(newStrokeIndex, true, false); - map::const_iterator it = m_originalStrokes.begin(); + std::map::const_iterator it = m_originalStrokes.begin(); UINT i = 0; VIStroke *s; for (; it != m_originalStrokes.end(); ++it) { @@ -206,12 +206,12 @@ public: return; QMutexLocker lock(image->getMutex()); - vector oldStrokeIndex(m_originalStrokes.size()); + std::vector oldStrokeIndex(m_originalStrokes.size()); mapToVector(m_originalStrokes, oldStrokeIndex); image->removeStrokes(oldStrokeIndex, true, false); - map::const_iterator it = m_newStrokes.begin(); + std::map::const_iterator it = m_newStrokes.begin(); UINT i = 0; VIStroke *s; for (; it != m_newStrokes.end(); ++it) { @@ -287,7 +287,7 @@ public: void leftButtonUp(const TPointD &pos, const TMouseEvent &); void leftButtonDoubleClick(const TPointD &pos, const TMouseEvent &e); void mouseMove(const TPointD &pos, const TMouseEvent &e); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onEnter(); void onLeave(); void onActivate(); @@ -318,7 +318,7 @@ private: m_firstPos; //!< Either The first point inserted either in m_track or m_polyline //! (depending on selected erase mode). UndoEraser *m_undo; - vector m_indexes; + std::vector m_indexes; TRectD m_selectingRect, m_firstRect; @@ -331,7 +331,7 @@ private: StrokeGenerator m_track; //!< Lazo selection generator. - vector m_polyline; //!< Polyline points. + std::vector m_polyline; //!< Polyline points. TStroke *m_stroke; //!< Stores the stroke generated by m_track. TStroke *m_firstStroke; //!< Stores the first stroke in the "frame range" case. @@ -531,10 +531,10 @@ void EraserTool::erase(TVectorImageP vi, const TPointD &pos) return; } - vector intersections; - vector sortedWRanges; + std::vector intersections; + std::vector sortedWRanges; - vector splitStrokes; + std::vector splitStrokes; double rectEdge_2 = m_pointSize * TConsts::sqrt2_2; //quadrato iscritto nella circonferenza @@ -543,7 +543,7 @@ void EraserTool::erase(TVectorImageP vi, const TPointD &pos) UINT i = 0; double pointSize2 = sq(m_pointSize); - vector oneStrokeIndex(1); + std::vector oneStrokeIndex(1); int index = TTool::getApplication()->getCurrentLevelStyleIndex(); QMutexLocker lock(vi->getMutex()); while (i < vi->getStrokeCount()) { @@ -639,7 +639,7 @@ void EraserTool::erase(TVectorImageP vi, const TPointD &pos) } UINT cI; - vector points; + std::vector points; if (w1 == 0) { for (cI = chunckIndex; cI < (UINT)chunck; cI++) { points.push_back(oldStroke->getChunk(cI)->getThickP0()); @@ -745,7 +745,7 @@ void EraserTool::erase(TVectorImageP vi, TRectD &rect) tswap(rect.y1, rect.y0); int i = 0; int index = TTool::getApplication()->getCurrentLevelStyleIndex(); - vector eraseStrokes; + std::vector eraseStrokes; TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); m_undo = new UndoEraser(level, getCurrentFid()); @@ -856,7 +856,7 @@ void EraserTool::multiEraseRect(TFrameId firstFrameId, TFrameId lastFrameId, if ((r1 - r0) < 1) return; - vector allFids; + std::vector allFids; m_level->getFids(allFids); std::vector::iterator i0 = allFids.begin(); while (i0 != allFids.end() && *i0 < firstFrameId) @@ -867,7 +867,7 @@ void EraserTool::multiEraseRect(TFrameId firstFrameId, TFrameId lastFrameId, while (i1 != allFids.end() && *i1 <= lastFrameId) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); @@ -997,7 +997,7 @@ void EraserTool::leftButtonDoubleClick(const TPointD &pos, const TMouseEvent &e) if (m_eraseType.getValue() == POLYLINE_ERASE) { closePolyline(pos); - vector strokePoints; + std::vector strokePoints; for (UINT i = 0; i < m_polyline.size() - 1; i++) { strokePoints.push_back(TThickPoint(m_polyline[i], 1)); strokePoints.push_back(TThickPoint(0.5 * (m_polyline[i] + m_polyline[i + 1]), 1)); @@ -1058,7 +1058,7 @@ void EraserTool::mouseMove(const TPointD &pos, const TMouseEvent &e) //---------------------------------------------------------------------- -bool EraserTool::onPropertyChanged(string propertyName) +bool EraserTool::onPropertyChanged(std::string propertyName) { EraseVectorType = toString(m_eraseType.getValue()); EraseVectorSize = m_toolSize.getValue(); @@ -1243,7 +1243,7 @@ void EraserTool::eraseRegion(const TVectorImageP vi, TStroke *stroke) //, const eraseImg.findRegions(); int strokeIndex, regionIndex, colorStyle; colorStyle = TTool::getApplication()->getCurrentLevelStyleIndex(); - vector eraseStrokes; + std::vector eraseStrokes; TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); m_undo = new UndoEraser(level, getCurrentFid()); @@ -1313,7 +1313,7 @@ void EraserTool::doMultiErase(TFrameId &firstFrameId, TFrameId &lastFrameId, } assert(firstFrameId <= lastFrameId); - vector allFids; + std::vector allFids; sl->getFids(allFids); std::vector::iterator i0 = allFids.begin(); while (i0 != allFids.end() && *i0 < firstFrameId) @@ -1324,7 +1324,7 @@ void EraserTool::doMultiErase(TFrameId &firstFrameId, TFrameId &lastFrameId, while (i1 != allFids.end() && *i1 <= lastFrameId) i1++; assert(i0 < i1); - vector fids(i0, i1); + std::vector fids(i0, i1); int m = fids.size(); assert(m > 0); diff --git a/toonz/sources/tnztools/vectorselectiontool.cpp b/toonz/sources/tnztools/vectorselectiontool.cpp index 140d233..001d7c1 100644 --- a/toonz/sources/tnztools/vectorselectiontool.cpp +++ b/toonz/sources/tnztools/vectorselectiontool.cpp @@ -433,10 +433,10 @@ int DragSelectionTool::UndoChangeStrokes::getSize() const class UndoChangeOutlineStyle : public ToolUtils::TToolUndo { - vector m_oldOptions, m_newOptions; + std::vector m_oldOptions, m_newOptions; FourPoints m_oldBBox, m_newBBox; VectorSelectionTool *m_tool; - vector m_indexes; + std::vector m_indexes; int m_selectionCount; public: @@ -1953,7 +1953,7 @@ TPropertyGroup *VectorSelectionTool::getProperties(int idx) //----------------------------------------------------------------------------- -bool VectorSelectionTool::onPropertyChanged(string propertyName) +bool VectorSelectionTool::onPropertyChanged(std::string propertyName) { if (SelectionTool::onPropertyChanged(propertyName)) return true; diff --git a/toonz/sources/tnztools/vectorselectiontool.h b/toonz/sources/tnztools/vectorselectiontool.h index 7f40c24..6fab636 100644 --- a/toonz/sources/tnztools/vectorselectiontool.h +++ b/toonz/sources/tnztools/vectorselectiontool.h @@ -248,7 +248,7 @@ public: class VectorChangeThicknessTool : public DragTool { TPointD m_curPos, m_firstPos; - std::map> m_strokesThickness; + std::map> m_strokesThickness; double m_thicknessChange; tcg::unique_ptr m_undo; @@ -340,7 +340,7 @@ protected: void updateAction(TPointD pos, const TMouseEvent &e); void onSelectedFramesChanged(); - bool onPropertyChanged(string propertyName); + bool onPropertyChanged(std::string propertyName); void onImageChanged(); private: diff --git a/toonz/sources/tnztools/vectortapetool.cpp b/toonz/sources/tnztools/vectortapetool.cpp index b04f0fa..ce4da6e 100644 --- a/toonz/sources/tnztools/vectortapetool.cpp +++ b/toonz/sources/tnztools/vectortapetool.cpp @@ -50,18 +50,18 @@ class UndoAutoclose : public ToolUtils::TToolUndo VIStroke *m_oldStroke1; VIStroke *m_oldStroke2; - vector *m_fillInformation; + std::vector *m_fillInformation; int m_row; int m_column; - vector m_changedStrokes; + std::vector m_changedStrokes; public: VIStroke *m_newStroke; int m_newStrokeId; int m_newStrokePos; - UndoAutoclose(TXshSimpleLevel *level, const TFrameId &frameId, int pos1, int pos2, vector *fillInformation, const vector &changedStrokes) + UndoAutoclose(TXshSimpleLevel *level, const TFrameId &frameId, int pos1, int pos2, std::vector *fillInformation, const std::vector &changedStrokes) : ToolUtils::TToolUndo(level, frameId), m_oldStroke1(0), m_oldStroke2(0), m_pos1(pos1), m_pos2(pos2), m_newStrokePos(-1), m_fillInformation(fillInformation), m_changedStrokes(changedStrokes) { TVectorImageP image = level->getFrame(m_frameId, true); @@ -115,7 +115,7 @@ public: if (m_oldStroke2) image->insertStrokeAt(cloneVIStroke(m_oldStroke2), m_pos2); - image->notifyChangedStrokes(m_changedStrokes, vector()); + image->notifyChangedStrokes(m_changedStrokes, std::vector()); if (!m_isLastInBlock) return; @@ -161,7 +161,7 @@ public: VIStroke *stroke = cloneVIStroke(m_newStroke); image->insertStrokeAt(stroke, m_pos1 == -1 ? m_newStrokePos : m_pos1, false); - image->notifyChangedStrokes(m_changedStrokes, vector()); + image->notifyChangedStrokes(m_changedStrokes, std::vector()); app->getCurrentXsheet()->notifyXsheetChanged(); notifyImageChanged(); @@ -242,11 +242,11 @@ public: //----------------------------------------------------------------------------- - bool onPropertyChanged(string propertyName) + bool onPropertyChanged(std::string propertyName) { TapeMode = toString(m_mode.getValue()); TapeSmooth = (int)(m_smooth.getValue()); - wstring s = m_type.getValue(); + std::wstring s = m_type.getValue(); if (!s.empty()) TapeType = toString(s); TapeJoinStrokes = (int)(m_joinStrokes.getValue()); @@ -473,7 +473,7 @@ public: //----------------------------------------------------------------------------- - void joinPointToPoint(const TVectorImageP &vi, vector *fillInfo) + void joinPointToPoint(const TVectorImageP &vi, std::vector *fillInfo) { int minindex = tmin(m_strokeIndex1, m_strokeIndex2); int maxindex = tmax(m_strokeIndex1, m_strokeIndex2); @@ -484,7 +484,7 @@ public: undo = new UndoPath(getXsheet()->getStageObject(getObjectId())->getSpline()); else { TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); - vector v(1); + std::vector v(1); v[0] = minindex; autoCloseUndo = new UndoAutoclose(level, getCurrentFid(), minindex, maxindex, fillInfo, v); } @@ -506,14 +506,14 @@ public: //----------------------------------------------------------------------------- - void joinPointToLine(const TVectorImageP &vi, vector *fillInfo) + void joinPointToLine(const TVectorImageP &vi, std::vector *fillInfo) { TUndo *undo = 0; UndoAutoclose *autoCloseUndo = 0; if (TTool::getApplication()->getCurrentObject()->isSpline()) undo = new UndoPath(getXsheet()->getStageObject(getObjectId())->getSpline()); else { - vector v(2); + std::vector v(2); v[0] = m_strokeIndex1; v[1] = m_strokeIndex2; TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); @@ -539,23 +539,23 @@ public: //----------------------------------------------------------------------------- - void joinLineToLine(const TVectorImageP &vi, vector *fillInfo) + void joinLineToLine(const TVectorImageP &vi, std::vector *fillInfo) { if (TTool::getApplication()->getCurrentObject()->isSpline()) - return; //Caanot add vectros to spline... Spline can be only one vector + return; //Caanot add vectros to spline... Spline can be only one std::vector TThickPoint p1 = vi->getStroke(m_strokeIndex1)->getThickPoint(m_w1); TThickPoint p2 = vi->getStroke(m_strokeIndex2)->getThickPoint(m_w2); UndoAutoclose *autoCloseUndo = 0; - vector v(2); + std::vector v(2); v[0] = m_strokeIndex1; v[1] = m_strokeIndex2; TXshSimpleLevel *level = TTool::getApplication()->getCurrentLevel()->getSimpleLevel(); autoCloseUndo = new UndoAutoclose(level, getCurrentFid(), -1, -1, fillInfo, v); - vector points(3); + std::vector points(3); points[0] = p1; points[1] = 0.5 * (p1 + p2); points[2] = p2; @@ -571,14 +571,14 @@ public: autoCloseUndo->m_newStrokePos = pos; autoCloseUndo->m_newStroke = cloneVIStroke(newStroke); autoCloseUndo->m_newStrokeId = vi->getStroke(pos)->getId(); - vi->notifyChangedStrokes(v, vector()); + vi->notifyChangedStrokes(v, std::vector()); notifyImageChanged(); TUndoManager::manager()->add(autoCloseUndo); } //----------------------------------------------------------------------------- - void inline rearrangeClosingPoints(const TVectorImageP &vi, pair &closingPoint, const TPointD &p) + void inline rearrangeClosingPoints(const TVectorImageP &vi, std::pair &closingPoint, const TPointD &p) { int erasedIndex = tmax(m_strokeIndex1, m_strokeIndex2); int joinedIndex = tmin(m_strokeIndex1, m_strokeIndex2); @@ -601,17 +601,17 @@ public: void tapeRect(const TVectorImageP &vi, const TRectD &rect) { - vector *fillInformation = new vector; + std::vector *fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, rect); bool initUndoBlock = false; - vector> startPoints, endPoints; + std::vector> startPoints, endPoints; getClosingPoints(rect, m_autocloseFactor.getValue(), vi, startPoints, endPoints); assert(startPoints.size() == endPoints.size()); - vector startP(startPoints.size()), endP(startPoints.size()); + std::vector startP(startPoints.size()), endP(startPoints.size()); if (!startPoints.empty()) { TUndoManager::manager()->beginBlock(); @@ -645,7 +645,7 @@ public: TUndoManager::manager()->endBlock(); } - int doTape(const TVectorImageP &vi, vector *fillInformation, bool joinStrokes) + int doTape(const TVectorImageP &vi, std::vector *fillInformation, bool joinStrokes) { int type; if (!joinStrokes) @@ -694,7 +694,7 @@ public: } QMutexLocker lock(vi->getMutex()); m_secondPoint = false; - vector *fillInformation = new vector; + std::vector *fillInformation = new std::vector; ImageUtils::getFillingInformationOverlappingArea(vi, *fillInformation, vi->getStroke(m_strokeIndex1)->getBBox() + vi->getStroke(m_strokeIndex2)->getBBox()); @@ -728,7 +728,7 @@ public: if (!m_firstTime) return; - wstring s = toWideString(TapeMode.getValue()); + std::wstring s = toWideString(TapeMode.getValue()); if (s != L"") m_mode.setValue(s); s = toWideString(TapeType.getValue()); diff --git a/toonz/sources/toonz/ObjectTracker.cpp b/toonz/sources/toonz/ObjectTracker.cpp index 3363549..7df177b 100644 --- a/toonz/sources/toonz/ObjectTracker.cpp +++ b/toonz/sources/toonz/ObjectTracker.cpp @@ -1159,7 +1159,7 @@ bool CObjectTracker::GetInit() return m_initialized; } -string CObjectTracker::GetVisibility() +std::string CObjectTracker::GetVisibility() { return m_visible; } diff --git a/toonz/sources/toonz/ObjectTracker.h b/toonz/sources/toonz/ObjectTracker.h index b9adb41..8cca51f 100644 --- a/toonz/sources/toonz/ObjectTracker.h +++ b/toonz/sources/toonz/ObjectTracker.h @@ -75,7 +75,7 @@ private: NEIGHBOUR neighbours[30]; Predict3D::Point initial; bool m_initialized; - string m_visible; + std::string m_visible; int m_K_dist; //-------------------------------------------------------------------------------------------------------- @@ -147,10 +147,10 @@ public: bool GetInit(); //-------------------------------------------------------------------------------------------------------- - string GetVisibility(); + std::string GetVisibility(); //-------------------------------------------------------------------------------------------------------- - void SetVisibility(string visibily); + void SetVisibility(std::string visibily); //-------------------------------------------------------------------------------------------------------- Predict3D::Point GetInitials(); diff --git a/toonz/sources/toonz/batches.cpp b/toonz/sources/toonz/batches.cpp index 7d6c855..9c16950 100644 --- a/toonz/sources/toonz/batches.cpp +++ b/toonz/sources/toonz/batches.cpp @@ -255,7 +255,7 @@ void TaskRunner::doRun(TFarmTask *task) commandline += " -id " + task->m_id;*/ QProcess *process = new QProcess(); - map::iterator it; + std::map::iterator it; { QMutexLocker sl(&TasksMutex); @@ -624,7 +624,7 @@ void BatchesController::setDirtyFlag(bool state) //------------------------------------------------------------------------------ -void BatchesController::getTasks(const QString &parentId, vector &tasks) const +void BatchesController::getTasks(const QString &parentId, std::vector &tasks) const { std::map::const_iterator it = m_tasks.begin(); for (; it != m_tasks.end(); ++it) { @@ -707,7 +707,7 @@ void BatchesController::start(const QString &taskId) m_controller->restartTask(farmTaskId); if (dynamic_cast(task)) { - vector subtasks; + std::vector subtasks; m_controller->getTasks(farmTaskId, subtasks); if (!subtasks.empty()) { @@ -724,7 +724,7 @@ void BatchesController::start(const QString &taskId) m_farmIdsTable.insert(std::make_pair(task->m_id, id)); if (dynamic_cast(task)) { - vector subtasks; + std::vector subtasks; m_controller->getTasks(id, subtasks); assert((int)subtasks.size() == task->getTaskCount()); @@ -878,16 +878,16 @@ void BatchesController::doLoad(const TFilePath &fp) m_filepath = fp; - string tagName = ""; + std::string tagName = ""; if (!is.matchTag(tagName)) throw TException("Bad file format"); if (tagName == "tnzbatches") { - string rootTagName = tagName; - string v = is.getTagAttribute("version"); + std::string rootTagName = tagName; + std::string v = is.getTagAttribute("version"); while (is.matchTag(tagName)) { if (tagName == "generator") { - string program = is.getString(); + std::string program = is.getString(); } else if (tagName == "batch") { while (!is.eos()) { TPersist *p = 0; @@ -961,7 +961,7 @@ void BatchesController::doSave(const TFilePath &_fp) TOStream os(fp); - map attr; + std::map attr; attr["version"] = "1.0"; os.openChild("tnzbatches", attr); @@ -1118,7 +1118,7 @@ public: { } - QString execute(const vector &argv); + QString execute(const std::vector &argv); QString addTask(const TFarmTask &task, bool suspended); void removeTask(const QString &id); @@ -1127,8 +1127,8 @@ public: void restartTask(const QString &id); void getTasks(vector &tasks); - void getTasks(const QString &parentId, vector &tasks); - void getTasks(const QString &parentId, vector &tasks); + void getTasks(const QString &parentId, std::vector &tasks); + void getTasks(const QString &parentId, std::vector &tasks); void queryTaskInfo(const QString &id, TFarmTask &task); @@ -1189,10 +1189,10 @@ public: } private: - map m_tasks; + std::map m_tasks; }; -QString MyLocalController::execute(const vector &argv) +QString MyLocalController::execute(const std::vector &argv) { if (argv.size() > 5 && argv[0] == "taskProgress") { int step, stepCount, frameNumber; @@ -1248,12 +1248,12 @@ void MyLocalController::getTasks(vector &tasks) assert(false); } -void MyLocalController::getTasks(const QString &parentId, vector &tasks) +void MyLocalController::getTasks(const QString &parentId, std::vector &tasks) { assert(false); } -void MyLocalController::getTasks(const QString &parentId, vector &tasks) +void MyLocalController::getTasks(const QString &parentId, std::vector &tasks) { assert(false); } diff --git a/toonz/sources/toonz/batches.h b/toonz/sources/toonz/batches.h index 6ff544e..d327241 100644 --- a/toonz/sources/toonz/batches.h +++ b/toonz/sources/toonz/batches.h @@ -51,7 +51,7 @@ public: TaskState getTaskStatus(const QString &id) const; void loadTask(bool isRenderTask); - void getTasks(const QString &parentId, vector &tasks) const; + void getTasks(const QString &parentId, std::vector &tasks) const; void setTasksTree(TaskTreeModel *tree); TaskTreeModel *getTasksTree() { return m_tasksTree; } @@ -96,11 +96,11 @@ protected: private: bool m_dirtyFlag; TFilePath m_filepath; - map m_tasks; + std::map m_tasks; set m_observers; int m_localControllerPortNumber; TFarmController *m_controller; - map m_farmIdsTable; + std::map m_farmIdsTable; TaskTreeModel *m_tasksTree; TThread::Executor m_localExecutor; diff --git a/toonz/sources/toonz/batchserversviewer.cpp b/toonz/sources/toonz/batchserversviewer.cpp index 2d6ac1a..530d604 100644 --- a/toonz/sources/toonz/batchserversviewer.cpp +++ b/toonz/sources/toonz/batchserversviewer.cpp @@ -47,9 +47,9 @@ void FarmServerListView::update() TFarmController *controller = getTFarmController(); - vector servers; + std::vector servers; controller->getServers(servers); - vector::iterator it = servers.begin(); + std::vector::iterator it = servers.begin(); for (; it != servers.end(); ++it) { ServerIdentity sid = *it; new MyListItem(sid.m_id, sid.m_name, this); diff --git a/toonz/sources/toonz/camerasettingspopup.cpp b/toonz/sources/toonz/camerasettingspopup.cpp index 2e3dc7f..c97dc97 100644 --- a/toonz/sources/toonz/camerasettingspopup.cpp +++ b/toonz/sources/toonz/camerasettingspopup.cpp @@ -222,8 +222,8 @@ void CameraSettingsPopup::onNameChanged() TStageObject *cameraObject = getCameraObject(); if (!cameraObject) return; - string name = m_nameFld->text().toStdString(); - string curName = cameraObject->getName(); + std::string name = m_nameFld->text().toStdString(); + std::string curName = cameraObject->getName(); if (curName == name) return; cameraObject->setName(name); diff --git a/toonz/sources/toonz/canvassizepopup.cpp b/toonz/sources/toonz/canvassizepopup.cpp index d077936..24d5644 100644 --- a/toonz/sources/toonz/canvassizepopup.cpp +++ b/toonz/sources/toonz/canvassizepopup.cpp @@ -44,7 +44,7 @@ class ResizeCanvasUndo : public TUndo { TXshSimpleLevelP m_level; TFrameId m_fid; - string m_oldImageId, m_newImageId; + std::string m_oldImageId, m_newImageId; TDimension m_oldDim, m_newDim; static int m_idCount; int m_undoSize; @@ -104,7 +104,7 @@ public: m_level->setFrame(m_fid, img); IconGenerator::instance()->invalidate(m_level.getPointer(), m_fid); m_level->touchFrame(m_fid); - vector fids; + std::vector fids; m_level->getFids(fids); if (fids.back() == m_fid) { m_level->getProperties()->setImageRes(m_newDim); @@ -672,7 +672,7 @@ void CanvasSizePopup::onOkBtn() pos.y = newDim.ly - dim.ly; int i; - vector fids; + std::vector fids; m_sl->getFids(fids); TUndoManager::manager()->beginBlock(); for (i = 0; i < (int)fids.size(); i++) { diff --git a/toonz/sources/toonz/castviewer.cpp b/toonz/sources/toonz/castviewer.cpp index 6718800..3d1b1e1 100644 --- a/toonz/sources/toonz/castviewer.cpp +++ b/toonz/sources/toonz/castviewer.cpp @@ -62,12 +62,12 @@ namespace class MoveLevelToFolderUndo : public TUndo { TLevelSet *m_levelSet; - wstring m_levelName; + std::wstring m_levelName; TFilePath m_oldFolder; TFilePath m_newFolder; public: - MoveLevelToFolderUndo(TLevelSet *levelSet, wstring levelName, TFilePath newFolder) + MoveLevelToFolderUndo(TLevelSet *levelSet, std::wstring levelName, TFilePath newFolder) : m_levelSet(levelSet), m_levelName(levelName), m_newFolder(newFolder) { TXshLevel *level = m_levelSet->getLevel(m_levelName); @@ -221,7 +221,7 @@ void CastTreeViewer::onSceneNameChanged() ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); QString rootName = QString("Root"); if (scene) { - wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); + std::wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); rootName = rootName.fromStdWString(name); } root->setText(0, rootName); @@ -249,7 +249,7 @@ void CastTreeViewer::rebuildCastTree() ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); QString rootName = QString("Root"); if (scene) { - wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); + std::wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); rootName = rootName.fromStdWString(name); } @@ -315,7 +315,7 @@ void CastTreeViewer::dragMoveEvent(QDragMoveEvent *event) ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); QString rootName = QString("Root"); if (scene) { - wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); + std::wstring name = (scene->isUntitled()) ? L"Untitled" : scene->getSceneName(); rootName = rootName.fromStdWString(name); } if (m_dropTargetItem && m_dropTargetItem->data(0, Qt::DisplayRole).toString() == AudioFolderName || @@ -369,7 +369,7 @@ void CastTreeViewer::dropEvent(QDropEvent *event) CastItem *item = castItems->getItem(i); if (LevelCastItem *li = dynamic_cast(item)) { TXshLevel *level = li->getLevel(); - wstring levelName = level->getName(); + std::wstring levelName = level->getName(); MoveLevelToFolderUndo *undo = new MoveLevelToFolderUndo(levelSet, levelName, folderPath); levelSet->moveLevelToFolder(folderPath, level); TUndoManager::manager()->add(undo); diff --git a/toonz/sources/toonz/celldata.cpp b/toonz/sources/toonz/celldata.cpp index cc8d629..54f8926 100644 --- a/toonz/sources/toonz/celldata.cpp +++ b/toonz/sources/toonz/celldata.cpp @@ -160,7 +160,7 @@ void TCellData::cloneZeraryFx(int index, std::vector &cells) const assert(fxColumn); TFx *zeraryFx = fxColumn->getZeraryColumnFx()->getZeraryFx(); if (zeraryFx) { - wstring fxName = zeraryFx->getName(); + std::wstring fxName = zeraryFx->getName(); TFx *newZeraryFx = zeraryFx->clone(false); fxColumn->getXsheet()->getFxDag()->assignUniqueId(newZeraryFx); newZeraryFx->setName(fxName); diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index 43db55e..a770a5e 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -806,8 +806,8 @@ bool pasteRasterImageInCellWithoutUndo(int row, int col, const RasterImageData * ri->getDpi(imgDpiX, imgDpiY); } double dpiX, dpiY; - vector rects; - vector strokes; + std::vector rects; + std::vector strokes; std::vector originalStrokes; TAffine affine; rasterImageData->getData(ras, dpiX, dpiY, rects, strokes, originalStrokes, affine, img->getPalette()); diff --git a/toonz/sources/toonz/cleanuppopup.cpp b/toonz/sources/toonz/cleanuppopup.cpp index 121c922..59e14d5 100644 --- a/toonz/sources/toonz/cleanuppopup.cpp +++ b/toonz/sources/toonz/cleanuppopup.cpp @@ -214,13 +214,13 @@ void addCleanupDefaultPalette(TXshSimpleLevelP sl) return; } - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "palette") { DVGui::warning(QString("CleanupDefaultPalette file: This is not palette file")); return; } - string gname; + std::string gname; is.getTagParam("name", gname); TPalette *defaultPalette = new TPalette(); defaultPalette->loadData(is); @@ -917,8 +917,8 @@ QString CleanupPopup::setupLevel() sl->getImageId(fid, 0), sl->getImageId(fid, TXshSimpleLevel::Scanned)); - const string &oldIconId = sl->getIconId(fid, 0); - const string &newIconId = sl->getIconId(fid, TXshSimpleLevel::Scanned); + const std::string &oldIconId = sl->getIconId(fid, 0); + const std::string &newIconId = sl->getIconId(fid, TXshSimpleLevel::Scanned); IconGenerator::instance()->remap(newIconId, oldIconId); } @@ -944,7 +944,7 @@ QString CleanupPopup::setupLevel() TFileStatus pfs(targetPalettePath); if (pfs.doesExist() && pfs.isReadable()) { TIStream is(targetPalettePath); - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "palette") { DVGui::warning(QString("CleanupDefaultPalette file: This is not palette file")); return NULL; @@ -1111,7 +1111,7 @@ void CleanupPopup::closeLevel() ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); TFilePath decodedPath(scene->decodeFilePath(outputPath)); - if (outputPath.getLevelNameW().find(L"-np.") == wstring::npos && + if (outputPath.getLevelNameW().find(L"-np.") == std::wstring::npos && TFileStatus(decodedPath).doesExist()) { saveUnpaintedLevel(decodedPath, sl, m_cleanuppedLevelFrames, (m_keepOriginalPalette && m_originalPalette)); } diff --git a/toonz/sources/toonz/cleanupsettingsmodel.cpp b/toonz/sources/toonz/cleanupsettingsmodel.cpp index 7860297..dc2ea28 100644 --- a/toonz/sources/toonz/cleanupsettingsmodel.cpp +++ b/toonz/sources/toonz/cleanupsettingsmodel.cpp @@ -640,7 +640,7 @@ bool CleanupSettingsModel::loadSettings(CleanupParameters *params, const TFilePa CleanupParameters defaultParameters; params->assign(&defaultParameters); - string tagName; + std::string tagName; is->matchTag(tagName); if (tagName == "version") { int minor, major; diff --git a/toonz/sources/toonz/cleanupsettingspopup.cpp b/toonz/sources/toonz/cleanupsettingspopup.cpp index a89ae7b..0000a07 100644 --- a/toonz/sources/toonz/cleanupsettingspopup.cpp +++ b/toonz/sources/toonz/cleanupsettingspopup.cpp @@ -98,7 +98,7 @@ CleanupTab::CleanupTab() m_fieldGuideOm->setFixedHeight(DVGui::WidgetHeight); m_fieldGuideOm->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Maximum); - std::vector fdgNames; + std::vector fdgNames; CleanupParameters::getFdgNames(fdgNames); for (int i = 0; i < (int)fdgNames.size(); i++) diff --git a/toonz/sources/toonz/colormodelviewer.cpp b/toonz/sources/toonz/colormodelviewer.cpp index 5acd0ea..c6322bb 100644 --- a/toonz/sources/toonz/colormodelviewer.cpp +++ b/toonz/sources/toonz/colormodelviewer.cpp @@ -115,7 +115,7 @@ void ColorModelViewer::dragEnterEvent(QDragEnterEvent *event) foreach (QUrl url, mimeData->urls()) { TFilePath fp(url.toLocalFile().toStdWString()); - string type = fp.getType(); + std::string type = fp.getType(); if (type == "scr" || type == "tpl") return; } diff --git a/toonz/sources/toonz/columncommand.cpp b/toonz/sources/toonz/columncommand.cpp index 7b51021..ff92c7c 100644 --- a/toonz/sources/toonz/columncommand.cpp +++ b/toonz/sources/toonz/columncommand.cpp @@ -130,7 +130,7 @@ void cloneNotColumnLinkedFxsAndOutputsFx(TXsheet *xsh, TXsheet *newXsh) FxDag *newFxDag = newXsh->getFxDag(); //aggiungo nel mapping tutti gli effetti che non sono connessi da un cammino con una colonna - vector fxs, newFxs; + std::vector fxs, newFxs; fxDag->getFxs(fxs); newFxDag->getFxs(newFxs); QList notColumnLinkedClonedFxs; @@ -271,7 +271,7 @@ bool pasteColumnsWithoutUndo(std::set *indices, bool doClone, const StageOb return false; } - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(*indices, restoredSplineIds, xsh, doClone ? StageObjectsData::eDoClone : 0); app->getCurrentXsheet()->notifyXsheetChanged(); app->getCurrentObject()->notifyObjectIdSwitched(); @@ -343,8 +343,8 @@ void deleteColumnsWithoutUndo(std::set *indices, bool onlyColumns = false) if (TZeraryFx *zeraryFx = dynamic_cast(outFx)) outFx = zeraryFx->getColumnFx(); - vector::iterator it = std::find(fxsToKill.begin(), fxsToKill.end(), outFx); - set::iterator it2 = std::find(leaves.begin(), leaves.end(), outFx); + std::vector::iterator it = std::find(fxsToKill.begin(), fxsToKill.end(), outFx); + std::set::iterator it2 = std::find(leaves.begin(), leaves.end(), outFx); if (it == fxsToKill.end() && it2 == leaves.end()) port->setFx(0); @@ -376,7 +376,7 @@ void resetColumns(const QMimeData *mimeData, std::set *indices, const QMap< return; TApp *app = TApp::instance(); TXsheet *xsh = app->getCurrentXsheet()->getXsheet(); - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(*indices, restoredSplineIds, xsh, 0); QMap::const_iterator it; for (it = columnFxLinks.begin(); it != columnFxLinks.end(); it++) @@ -424,7 +424,7 @@ TXshChildLevel *cloneChildLevel(TXshChildLevel *cl) StageObjectsData *data = new StageObjectsData(); data->storeColumns(indices, childXsh, 0); data->storeColumnFxs(indices, childXsh, 0); - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(indices, restoredSplineIds, newChildXsh, StageObjectsData::eDoClone); delete data; @@ -1152,7 +1152,7 @@ void ColumnCmd::cloneChild(int index) StageObjectsData *data = new StageObjectsData(); data->storeColumns(indices, childXsh, 0); data->storeColumnFxs(indices, childXsh, 0); - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(indices, restoredSplineIds, newChildXsh, StageObjectsData::eDoClone); delete data; diff --git a/toonz/sources/toonz/columnselection.cpp b/toonz/sources/toonz/columnselection.cpp index ab55ef9..fc0e839 100644 --- a/toonz/sources/toonz/columnselection.cpp +++ b/toonz/sources/toonz/columnselection.cpp @@ -127,8 +127,8 @@ bool canMergeColumns(int column, int mColumn, bool forMatchlines) if (start > end) return false; - vector cell(end - start + 1); - vector mCell(end - start + 1); + std::vector cell(end - start + 1); + std::vector mCell(end - start + 1); xsh->getCells(start, column, cell.size(), &(cell[0])); xsh->getCells(start, mColumn, cell.size(), &(mCell[0])); diff --git a/toonz/sources/toonz/convertpopup.cpp b/toonz/sources/toonz/convertpopup.cpp index 0653a40..a248911 100644 --- a/toonz/sources/toonz/convertpopup.cpp +++ b/toonz/sources/toonz/convertpopup.cpp @@ -58,7 +58,7 @@ TEnv::IntVar ConvertPopupSaveToNopaint("ConvertPopupSaveToNopaint", 1); // convertPopup //----------------------------------------------------------------------------- -QMap ConvertPopup::m_formatProperties; +QMap ConvertPopup::m_formatProperties; /* TRANSLATOR namespace::ConvertPopup @@ -210,7 +210,7 @@ void ConvertPopup::Converter::convertLevelWithConvert2Tlv(const TFilePath &sourc tlvConverter->m_levelOut = unpaintedLevelPath; } - string errorMessage; + std::string errorMessage; if (!tlvConverter->init(errorMessage)) { DVGui::warning(QString::fromStdString(errorMessage)); tlvConverter->abort(); @@ -584,7 +584,7 @@ void ConvertPopup::onAntialiasSelected(int index) void ConvertPopup::onFileInChanged() { assert(m_convertFileFld); - vector fps; + std::vector fps; TProject *project = TProjectManager::instance()->getCurrentProject().getPointer(); ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); fps.push_back(scene->decodeFilePath(TFilePath(m_convertFileFld->getPath().toStdString()))); @@ -637,7 +637,7 @@ void ConvertPopup::onFormatSelected(const QString &format) //------------------------------------------------------------------ -void ConvertPopup::setFiles(const vector &fps) +void ConvertPopup::setFiles(const std::vector &fps) { m_okBtn->setEnabled(true); m_fileFormat->setEnabled(true); @@ -749,7 +749,7 @@ Convert2Tlv *ConvertPopup::makeTlvConverter(const TFilePath &sourceFilePath) else unpaintedFolder = TFilePath(m_unpaintedFolder->getPath().toStdString()); - string basename = sourceFilePath.getName() + suffixString.toStdString(); + std::string basename = sourceFilePath.getName() + suffixString.toStdString(); unpaintedfilePath = sc->decodeFilePath(sourceFilePath.withParentDir(unpaintedFolder).withName(basename)); } int from = -1, to = -1; @@ -790,7 +790,7 @@ void ConvertPopup::convertToTlv(bool toPainted) TFilePath::setUnderscoreFormatAllowed(!m_unpaintedSuffix->text().contains('_')); - vector converters; + std::vector converters; for (i = 0; i < m_srcFilePaths.size(); i++) { Convert2Tlv *converter = makeTlvConverter(m_srcFilePaths[i]); if (TSystem::doesExistFileOrLevel(converter->m_levelOut)) { @@ -815,7 +815,7 @@ void ConvertPopup::convertToTlv(bool toPainted) ProgressDialog pb("", tr("Cancel"), 0, totFrames); int j, l, k = 0; for (i = 0; i < converters.size(); i++) { - string errorMessage; + std::string errorMessage; if (!converters[i]->init(errorMessage)) { converters[i]->abort(); DVGui::error(QString::fromStdString(errorMessage)); @@ -831,7 +831,7 @@ void ConvertPopup::convertToTlv(bool toPainted) pb.show(); for (j = 0; j < count; j++) { - string errorMessage = ""; + std::string errorMessage = ""; if (!converters[i]->convertNext(errorMessage) || pb.wasCanceled()) { for (l = i; l < converters.size(); l++) { converters[l]->abort(); @@ -1080,7 +1080,7 @@ void ConvertPopup::onLevelConverted(const TFilePath &fullPath) //------------------------------------------------------------------- -TPropertyGroup *ConvertPopup::getFormatProperties(const string &ext) +TPropertyGroup *ConvertPopup::getFormatProperties(const std::string &ext) { if (m_formatProperties.contains(ext)) return m_formatProperties[ext]; @@ -1093,7 +1093,7 @@ TPropertyGroup *ConvertPopup::getFormatProperties(const string &ext) void ConvertPopup::onOptionsClicked() { - string ext = m_fileFormat->currentText().toStdString(); + std::string ext = m_fileFormat->currentText().toStdString(); TPropertyGroup *props = getFormatProperties(ext); openFormatSettingsPopup(this, ext, props, m_srcFilePaths.size() == 1 ? m_srcFilePaths[0] : TFilePath()); diff --git a/toonz/sources/toonz/convertpopup.h b/toonz/sources/toonz/convertpopup.h index d709c5a..b1ebc39 100644 --- a/toonz/sources/toonz/convertpopup.h +++ b/toonz/sources/toonz/convertpopup.h @@ -134,13 +134,13 @@ private: DVGui::ProgressDialog *m_progressDialog; std::vector m_srcFilePaths; - static QMap m_formatProperties; bool m_isConverting; private: - TPropertyGroup *getFormatProperties(const string &ext); + TPropertyGroup *getFormatProperties(const std::string &ext); QFrame *createTlvSettings(); QFrame *createSvgSettings(); diff --git a/toonz/sources/toonz/curveio.cpp b/toonz/sources/toonz/curveio.cpp index 8aee7b6..55f3402 100644 --- a/toonz/sources/toonz/curveio.cpp +++ b/toonz/sources/toonz/curveio.cpp @@ -262,7 +262,7 @@ void loadCurve(TDoubleParam *curve) //------------------------------------------ -void exportCurve(TDoubleParam *curve, const string &name) +void exportCurve(TDoubleParam *curve, const std::string &name) { #ifdef BRAVODEMO DVGui::featureNotAvelaible(); diff --git a/toonz/sources/toonz/dvdirtreeview.cpp b/toonz/sources/toonz/dvdirtreeview.cpp index 794edd3..c84e260 100644 --- a/toonz/sources/toonz/dvdirtreeview.cpp +++ b/toonz/sources/toonz/dvdirtreeview.cpp @@ -381,7 +381,7 @@ void DvDirTreeView::dropEvent(QDropEvent *e) TFilePath path = dstFp + TFilePath(srcFp.getLevelNameW()); NameBuilder *nameBuilder = NameBuilder::getBuilder(toWideString(path.getName())); - wstring levelNameOut; + std::wstring levelNameOut; do levelNameOut = nameBuilder->getNext(); while (TSystem::doesExistFileOrLevel(path.withName(levelNameOut))); @@ -482,8 +482,8 @@ void DvDirTreeView::createMenuAction(QMenu &menu, QString name, const char *slot { QAction *act = menu.addAction(name); act->setEnabled(enable); - string slotName(slot); - slotName = string("1") + slotName; + std::string slotName(slot); + slotName = std::string("1") + slotName; connect(act, SIGNAL(triggered()), slotName.c_str()); } diff --git a/toonz/sources/toonz/dvitemview.cpp b/toonz/sources/toonz/dvitemview.cpp index 63eefc5..e87c21d 100644 --- a/toonz/sources/toonz/dvitemview.cpp +++ b/toonz/sources/toonz/dvitemview.cpp @@ -1756,7 +1756,7 @@ void DvItemViewerTitleBar::openContextMenu(QMouseEvent *event) void DvItemViewerTitleBar::paintEvent(QPaintEvent *) { QPainter p(this); - std::vector>> columns; + std::vector>> columns; m_itemViewer->getPanel()->getColumns(columns); QRect rect(0, 0, width(), height()); diff --git a/toonz/sources/toonz/exportlevelpopup.cpp b/toonz/sources/toonz/exportlevelpopup.cpp index 71a7706..2bee62f 100644 --- a/toonz/sources/toonz/exportlevelpopup.cpp +++ b/toonz/sources/toonz/exportlevelpopup.cpp @@ -441,7 +441,7 @@ void ExportLevelPopup::hideEvent(QHideEvent *he) //------------------------------------------------------------------- -TPropertyGroup *ExportLevelPopup::getFormatProperties(const string &ext) +TPropertyGroup *ExportLevelPopup::getFormatProperties(const std::string &ext) { if (m_formatProperties.find(ext) != m_formatProperties.end()) return m_formatProperties[ext]; @@ -453,7 +453,7 @@ TPropertyGroup *ExportLevelPopup::getFormatProperties(const string &ext) //------------------------------------------------------------------- -IoCmd::ExportLevelOptions ExportLevelPopup::getOptions(const string &ext) +IoCmd::ExportLevelOptions ExportLevelPopup::getOptions(const std::string &ext) { IoCmd::ExportLevelOptions opts = m_exportOptions->getOptions(); @@ -508,7 +508,7 @@ void ExportLevelPopup::checkAlpha() void ExportLevelPopup::onOptionsClicked() { - string ext = m_format->currentText().toStdString(); + std::string ext = m_format->currentText().toStdString(); TPropertyGroup *props = getFormatProperties(ext); setModal(false); diff --git a/toonz/sources/toonz/exportpanel.cpp b/toonz/sources/toonz/exportpanel.cpp index 670e8b6..ecafe63 100644 --- a/toonz/sources/toonz/exportpanel.cpp +++ b/toonz/sources/toonz/exportpanel.cpp @@ -777,7 +777,7 @@ ExportPanel::ExportPanel(QWidget *parent, Qt::WFlags flags) settingsLayout->setAlignment(Qt::AlignTop); ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); - wstring sceneName = scene->getSceneName(); + std::wstring sceneName = scene->getSceneName(); TFilePath scenePath = scene->getProperties()->getOutputProperties()->getPath().getParentDir(); //Label + saveInFileFld @@ -886,7 +886,7 @@ void ExportPanel::loadExportSettings() if (!TSystem::doesExistFileOrLevel(exportPath)) return; TIStream is(exportPath); - string tagName; + std::string tagName; try { while (is.matchTag(tagName)) { if (tagName == "ExportDir") { @@ -894,13 +894,13 @@ void ExportPanel::loadExportSettings() is >> outPath; m_saveInFileFld->setPath(QString::fromStdWString(outPath.getWideString())); } else if (tagName == "ExportFormat") { - string ext; + std::string ext; is >> ext; int index = m_fileFormat->findText(QString::fromStdString(ext)); m_fileFormat->setCurrentIndex(index); } else if (tagName == "FormatSettings") { TOutputProperties *outProp = RenderController::instance()->getOutputPropertites(); - string ext = m_fileFormat->currentText().toStdString(); + std::string ext = m_fileFormat->currentText().toStdString(); TPropertyGroup *props = outProp->getFileFormatProperties(ext); props->loadData(is); } else if (tagName == "UseMarkers") { @@ -924,7 +924,7 @@ void ExportPanel::saveExportSettings() TFilePath exportPath = TEnv::getConfigDir() + "exportsettings.txt"; TOStream os(exportPath); os.child("ExportDir") << outPath; - string ext = m_fileFormat->currentText().toStdString(); + std::string ext = m_fileFormat->currentText().toStdString(); os.child("ExportFormat") << ext; os.openChild("FormatSettings"); @@ -941,7 +941,7 @@ void ExportPanel::saveExportSettings() void ExportPanel::generateMovie() { ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); - string ext = RenderController::instance()->getMovieExt(); + std::string ext = RenderController::instance()->getMovieExt(); QString path = m_saveInFileFld->getPath(); TFilePath outPath(path.toStdWString()); outPath = (outPath + m_fileNameFld->text().toStdWString()).withType(ext); @@ -987,7 +987,7 @@ void ExportPanel::openSettingsPopup() ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); if (!scene) return; - string ext = RenderController::instance()->getMovieExt(); + std::string ext = RenderController::instance()->getMovieExt(); TOutputProperties *outProps = RenderController::instance()->getOutputPropertites(); if (!outProps) { diff --git a/toonz/sources/toonz/exportpanel.h b/toonz/sources/toonz/exportpanel.h index 45590ce..e275b98 100644 --- a/toonz/sources/toonz/exportpanel.h +++ b/toonz/sources/toonz/exportpanel.h @@ -116,7 +116,7 @@ class RenderController : public QObject, public MovieGenerator::Listener bool m_rendering; bool m_cancelled; - string m_movieExt; + std::string m_movieExt; bool m_useMarkers; TOutputProperties *m_properties; std::vector m_clipList; @@ -137,8 +137,8 @@ public: return &_instance; } - void setMovieExt(string ext); - string getMovieExt() const { return m_movieExt; } + void setMovieExt(std::string ext); + std::string getMovieExt() const { return m_movieExt; } void setOutputPropertites(TOutputProperties *properties) { m_properties = properties; } TOutputProperties *getOutputPropertites() { return m_properties; } diff --git a/toonz/sources/toonz/exportscenepopup.cpp b/toonz/sources/toonz/exportscenepopup.cpp index 936b981..d38b7a7 100644 --- a/toonz/sources/toonz/exportscenepopup.cpp +++ b/toonz/sources/toonz/exportscenepopup.cpp @@ -86,7 +86,7 @@ int collectAssets(TFilePath scenePath) //============================================================================= // MyDvDirModelFileFolderNode [File folder] -DvDirModelNode *ExportSceneDvDirModelFileFolderNode::makeChild(wstring name) +DvDirModelNode *ExportSceneDvDirModelFileFolderNode::makeChild(std::wstring name) { return createExposeSceneNode(this, m_path + name); } @@ -102,7 +102,7 @@ DvDirModelFileFolderNode *ExportSceneDvDirModelFileFolderNode::createExposeScene node = new ExportSceneDvDirModelProjectNode(parent, path); else node = new ExportSceneDvDirModelFileFolderNode(parent, path); - if (path.getName().find("_files") == string::npos) + if (path.getName().find("_files") == std::string::npos) node->enableRename(true); return node; } @@ -128,7 +128,7 @@ ExportSceneDvDirModelRootNode::ExportSceneDvDirModelRootNode() //----------------------------------------------------------------------------- -void ExportSceneDvDirModelRootNode::add(wstring name, const TFilePath &path) +void ExportSceneDvDirModelRootNode::add(std::wstring name, const TFilePath &path) { DvDirModelNode *child = new ExportSceneDvDirModelFileFolderNode(this, name, path); child->setRow((int)m_children.size()); @@ -260,7 +260,7 @@ QModelIndex ExportSceneDvDirModel::parent(const QModelIndex &index) const //----------------------------------------------------------------------------- -QModelIndex ExportSceneDvDirModel::childByName(const QModelIndex &parent, const wstring &name) const +QModelIndex ExportSceneDvDirModel::childByName(const QModelIndex &parent, const std::wstring &name) const { if (!parent.isValid()) return QModelIndex(); diff --git a/toonz/sources/toonz/exportscenepopup.h b/toonz/sources/toonz/exportscenepopup.h index 9751eb4..8c9fc41 100644 --- a/toonz/sources/toonz/exportscenepopup.h +++ b/toonz/sources/toonz/exportscenepopup.h @@ -22,12 +22,12 @@ class QRadioButton; class ExportSceneDvDirModelFileFolderNode : public DvDirModelFileFolderNode { public: - ExportSceneDvDirModelFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path) + ExportSceneDvDirModelFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirModelFileFolderNode(parent, name, path) {} ExportSceneDvDirModelFileFolderNode(DvDirModelNode *parent, const TFilePath &path) : DvDirModelFileFolderNode(parent, path) {} - DvDirModelNode *makeChild(wstring name); + DvDirModelNode *makeChild(std::wstring name); DvDirModelFileFolderNode *createExposeSceneNode(DvDirModelNode *parent, const TFilePath &path); }; @@ -39,7 +39,7 @@ class ExportSceneDvDirModelSpecialFileFolderNode : public ExportSceneDvDirModelF QPixmap m_pixmap; public: - ExportSceneDvDirModelSpecialFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path) + ExportSceneDvDirModelSpecialFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : ExportSceneDvDirModelFileFolderNode(parent, name, path) {} QPixmap getPixmap(bool isOpen) const { return m_pixmap; } void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; } @@ -64,7 +64,7 @@ class ExportSceneDvDirModelRootNode : public DvDirModelNode { std::vector m_projectRootNodes; ExportSceneDvDirModelFileFolderNode *m_sandboxProjectNode; - void add(wstring name, const TFilePath &path); + void add(std::wstring name, const TFilePath &path); public: ExportSceneDvDirModelRootNode(); @@ -87,7 +87,7 @@ public: DvDirModelNode *getNode(const QModelIndex &index) const; QModelIndex index(int row, int column, const QModelIndex &parent) const; QModelIndex parent(const QModelIndex &index) const; - QModelIndex childByName(const QModelIndex &parent, const wstring &name) const; + QModelIndex childByName(const QModelIndex &parent, const std::wstring &name) const; int columnCount(const QModelIndex &parent) const { return 1; } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &index) const; diff --git a/toonz/sources/toonz/filebrowser.cpp b/toonz/sources/toonz/filebrowser.cpp index 49276ed..de8a133 100644 --- a/toonz/sources/toonz/filebrowser.cpp +++ b/toonz/sources/toonz/filebrowser.cpp @@ -148,7 +148,7 @@ QMutex levelFileMutex; } // namespace -inline bool isMultipleFrameType(string type) +inline bool isMultipleFrameType(std::string type) { return (type == "tlv" || type == "tzl" || type == "pli" || type == "mov" || type == "avi" || type == "3gp"); @@ -742,7 +742,7 @@ void FileBrowser::setUnregisteredFolder(const TFilePath &fp) //----------------------------------------------------------------------------- -void FileBrowser::setHistoryDay(string dayDateString) +void FileBrowser::setHistoryDay(std::string dayDateString) { m_folder = TFilePath(); m_dayDateString = dayDateString; @@ -805,7 +805,7 @@ void FileBrowser::readInfo(Item &item) { try { //Find this level's item - map::iterator it = m_multiFileItemMap.find(TFilePath(item.m_path.getLevelName())); + std::map::iterator it = m_multiFileItemMap.find(TFilePath(item.m_path.getLevelName())); if (it == m_multiFileItemMap.end()) throw ""; @@ -920,7 +920,7 @@ QVariant FileBrowser::getItemData(int index, DataType dataType, bool isSelected) readFrameCount(item); return item.m_frameCount; } else if (dataType == PlayAvailable) { - string type = item.m_path.getType(); + std::string type = item.m_path.getType(); if (item.m_frameCount > 1 && type != "tzp" && type != "tzu") return true; return false; @@ -1492,7 +1492,7 @@ bool FileBrowser::drop(const QMimeData *mimeData) if (!sl) return false; - wstring levelName = sl->getName(); + std::wstring levelName = sl->getName(); folderPath += TFilePath(levelName + toWideString(sl->getPath().getDottedType())); if (TSystem::doesExistFileOrLevel(folderPath)) { QString question = "Level " + toQString(folderPath) + " already exists\nDo you want to duplicate it?"; @@ -1727,7 +1727,7 @@ void renameSingleFileOrToonzLevel(const QString &fullpath) if (popup.exec() != QDialog::Accepted) return; - string name = popup.getName().toStdString(); + std::string name = popup.getName().toStdString(); if (name == fpin.getName()) { DVGui::error(QString(QObject::tr("The specified name is already assigned to the %1 file.").arg(fullpath))); @@ -1843,7 +1843,7 @@ void FileBrowser::convertToUnpaintedTlv() QApplication::setOverrideCursor(Qt::WaitCursor); int i, totFrames = 0; - vector converters; + std::vector converters; for (i = 0; i < filePaths.size(); i++) { Convert2Tlv *converter = new Convert2Tlv(filePaths[i], TFilePath(), TFilePath(), -1, -1, autoclose == sl.at(0), TFilePath(), 0, 0, 0); @@ -1870,7 +1870,7 @@ void FileBrowser::convertToUnpaintedTlv() ProgressDialog pb("", "Cancel", 0, totFrames); int j, l, k = 0; for (i = 0; i < converters.size(); i++) { - string errorMessage; + std::string errorMessage; if (!converters[i]->init(errorMessage)) { converters[i]->abort(); DVGui::error(QString::fromStdString(errorMessage)); @@ -1885,7 +1885,7 @@ void FileBrowser::convertToUnpaintedTlv() pb.show(); for (j = 0; j < count; j++) { - string errorMessage = ""; + std::string errorMessage = ""; if (!converters[i]->convertNext(errorMessage) || pb.wasCanceled()) { for (l = i; l < converters.size(); l++) { converters[l]->abort(); @@ -1950,7 +1950,7 @@ void FileBrowser::convertToPaintedTlv() TSystem::removeFileOrLevel(converter->m_levelOut); } - string errorMessage; + std::string errorMessage; if (!converter->init(errorMessage)) { converter->abort(); delete converter; @@ -2115,7 +2115,7 @@ void FileBrowser::newFolder() if (parentFolder == TFilePath() || !TFileStatus(parentFolder).isDirectory()) return; QString tempName(tr("New Folder")); - wstring folderName = tempName.toStdWString(); + std::wstring folderName = tempName.toStdWString(); TFilePath folderPath = parentFolder + folderName; int i = 1; while (TFileStatus(folderPath).doesExist()) @@ -2135,7 +2135,7 @@ void FileBrowser::newFolder() model->refresh(parentFolderIndex); m_folderTreeView->expand(parentFolderIndex); - wstring newFolderName = folderPath.getWideName(); + std::wstring newFolderName = folderPath.getWideName(); QModelIndex newFolderIndex = model->childByName(parentFolderIndex, newFolderName); if (newFolderIndex.isValid()) { m_folderTreeView->setCurrentIndex(newFolderIndex); diff --git a/toonz/sources/toonz/filebrowser.h b/toonz/sources/toonz/filebrowser.h index 6888b72..17a84ce 100644 --- a/toonz/sources/toonz/filebrowser.h +++ b/toonz/sources/toonz/filebrowser.h @@ -96,10 +96,10 @@ public: // (e.g. UNC path in Windows) void setUnregisteredFolder(const TFilePath &fp); - void setHistoryDay(string dayDateString); + void setHistoryDay(std::string dayDateString); TFilePath getFolder() const { return m_folder; } - string getDayDateString() const { return m_dayDateString; } + std::string getDayDateString() const { return m_dayDateString; } static void refreshFolder(const TFilePath &folder); @@ -226,7 +226,7 @@ private: TFilePath m_folder; std::string m_dayDateString; QStringList m_filter; - map m_multiFileItemMap; + std::map m_multiFileItemMap; private: void readFrameCount(Item &item); @@ -250,7 +250,7 @@ public: QString getName() { return m_name->text(); } private: - //TPropertyGroup* getFormatProperties(const string &ext); + //TPropertyGroup* getFormatProperties(const std::string &ext); public slots: //! Starts the convertion. diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cpp index e6daed9..59356b7 100644 --- a/toonz/sources/toonz/filebrowsermodel.cpp +++ b/toonz/sources/toonz/filebrowsermodel.cpp @@ -61,7 +61,7 @@ TFilePath getMyDocumentsPath() // //----------------------------------------------------------------------------- -DvDirModelNode::DvDirModelNode(DvDirModelNode *parent, wstring name) +DvDirModelNode::DvDirModelNode(DvDirModelNode *parent, std::wstring name) : m_parent(parent), m_name(name), m_oldName(), m_row(-1), m_childrenValid(false), m_renameEnabled(false), m_nodeType("") { } @@ -132,7 +132,7 @@ QPixmap DvDirModelNode::getPixmap(bool isOpen) const //----------------------------------------------------------------------------- -void DvDirModelNode::setTemporaryName(const wstring &newName) +void DvDirModelNode::setTemporaryName(const std::wstring &newName) { m_oldName = getName(); m_name = newName; @@ -154,7 +154,7 @@ void DvDirModelNode::restoreName() // //----------------------------------------------------------------------------- -DvDirModelFileFolderNode::DvDirModelFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path) +DvDirModelFileFolderNode::DvDirModelFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirModelNode(parent, name), m_path(path), m_isProjectFolder(false), m_existsChecked(false), m_exists(true), m_hasChildren(false), m_peeks(true) { m_nodeType = "FileFolder"; @@ -184,7 +184,7 @@ void DvDirModelFileFolderNode::visualizeContent(FileBrowser *browser) //----------------------------------------------------------------------------- -DvDirModelNode *DvDirModelFileFolderNode::makeChild(wstring name) +DvDirModelNode *DvDirModelFileFolderNode::makeChild(std::wstring name) { return createNode(this, m_path + name); } @@ -199,7 +199,7 @@ DvDirModelFileFolderNode *DvDirModelFileFolderNode::createNode(DvDirModelNode *p node = new DvDirModelProjectNode(parent, path); else { node = new DvDirModelFileFolderNode(parent, path); - if (path.getName().find("_files") == string::npos) + if (path.getName().find("_files") == std::string::npos) node->enableRename(true); } return node; @@ -207,7 +207,7 @@ DvDirModelFileFolderNode *DvDirModelFileFolderNode::createNode(DvDirModelNode *p //----------------------------------------------------------------------------- -bool DvDirModelFileFolderNode::setName(wstring newName) +bool DvDirModelFileFolderNode::setName(std::wstring newName) { if (isSpaceString(QString::fromStdWString(newName))) return true; @@ -250,7 +250,7 @@ void DvDirModelFileFolderNode::refreshChildren() { m_childrenValid = true; - std::vector names; + std::vector names; getChildrenNames(names); std::vector oldChildren; @@ -259,7 +259,7 @@ void DvDirModelFileFolderNode::refreshChildren() std::vector::iterator j; int i; for (i = 0; i < (int)names.size(); i++) { - wstring name = names[i]; + std::wstring name = names[i]; for (j = oldChildren.begin(); j != oldChildren.end() && (*j)->getName() != name; ++j) { } DvDirModelNode *child = 0; @@ -290,7 +290,7 @@ void DvDirModelFileFolderNode::refreshChildren() //----------------------------------------------------------------------------- -void DvDirModelFileFolderNode::getChildrenNames(std::vector &names) const +void DvDirModelFileFolderNode::getChildrenNames(std::vector &names) const { TFileStatus folderPathStatus(m_path); if (folderPathStatus.isLink()) @@ -310,11 +310,11 @@ void DvDirModelFileFolderNode::getChildrenNames(std::vector &names) con //----------------------------------------------------------------------------- -int DvDirModelFileFolderNode::rowByName(const wstring &name) const +int DvDirModelFileFolderNode::rowByName(const std::wstring &name) const { - std::vector names; + std::vector names; getChildrenNames(names); - std::vector::iterator it = std::find(names.begin(), names.end(), name); + std::vector::iterator it = std::find(names.begin(), names.end(), name); if (it == names.end()) return -1; else @@ -353,7 +353,7 @@ QPixmap DvDirModelFileFolderNode::getPixmap(bool isOpen) const // //----------------------------------------------------------------------------- -DvDirModelSceneFolderNode::DvDirModelSceneFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &scenePath) +DvDirModelSceneFolderNode::DvDirModelSceneFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &scenePath) : DvDirModelFileFolderNode(parent, name, scenePath) { } @@ -371,10 +371,10 @@ DvDirModelSceneFolderNode::DvDirModelSceneFolderNode(DvDirModelNode *parent, con return; scene.setProject(project.getPointer()); for (int i = 0; i < project->getFolderCount(); i++) { - string folderName = project->getFolderName(i); + std::string folderName = project->getFolderName(i); TFilePath folderPath = project->getFolder(i); if (folderPath.isAbsolute() && !project->isConstantFolder(i)) { - wstring alias = L"+" + toWideString(folderName); + std::wstring alias = L"+" + toWideString(folderName); TFilePath folderActualPath = scene.decodeFilePath(TFilePath(alias)); m_folders[alias] = folderActualPath; } @@ -391,7 +391,7 @@ DvDirModelSceneFolderNode::~DvDirModelSceneFolderNode() //----------------------------------------------------------------------------- -bool DvDirModelSceneFolderNode::setName(wstring newName) +bool DvDirModelSceneFolderNode::setName(std::wstring newName) { m_name = newName; return true; @@ -408,7 +408,7 @@ QPixmap DvDirModelSceneFolderNode::getPixmap(bool isOpen) const //----------------------------------------------------------------------------- -DvDirModelNode *DvDirModelSceneFolderNode::makeChild(wstring name) +DvDirModelNode *DvDirModelSceneFolderNode::makeChild(std::wstring name) { TFilePath actualFolderPath = m_folders[name]; DvDirModelFileFolderNode *node = new DvDirModelFileFolderNode(this, name, actualFolderPath); @@ -418,9 +418,9 @@ DvDirModelNode *DvDirModelSceneFolderNode::makeChild(wstring name) //----------------------------------------------------------------------------- -void DvDirModelSceneFolderNode::getChildrenNames(std::vector &names) const +void DvDirModelSceneFolderNode::getChildrenNames(std::vector &names) const { - std::map::const_iterator it; + std::map::const_iterator it; for (it = m_folders.begin(); it != m_folders.end(); ++it) names.push_back(it->first); } @@ -430,7 +430,7 @@ void DvDirModelSceneFolderNode::getChildrenNames(std::vector &names) co void DvDirModelSceneFolderNode::refreshChildren() { m_childrenValid = true; - std::vector names; + std::vector names; getChildrenNames(names); std::vector oldChildren; @@ -439,7 +439,7 @@ void DvDirModelSceneFolderNode::refreshChildren() std::vector::iterator j; int i; for (i = 0; i < (int)names.size(); i++) { - wstring name = names[i]; + std::wstring name = names[i]; for (j = oldChildren.begin(); j != oldChildren.end() && (*j)->getName() != name; ++j) { } DvDirModelNode *child = 0; @@ -464,18 +464,18 @@ void DvDirModelSceneFolderNode::refreshChildren() DvDirModelFileFolderNode *DvDirModelSceneFolderNode::createNode(DvDirModelNode *parent, const TFilePath &path) { DvDirModelFileFolderNode *node = new DvDirModelFileFolderNode(parent, path); - if (path.getName().find("_files") == string::npos) + if (path.getName().find("_files") == std::string::npos) node->enableRename(true); return node; } //----------------------------------------------------------------------------- -int DvDirModelSceneFolderNode::rowByName(const wstring &name) +int DvDirModelSceneFolderNode::rowByName(const std::wstring &name) { - std::vector names; + std::vector names; getChildrenNames(names); - std::vector::iterator it = std::find(names.begin(), names.end(), name); + std::vector::iterator it = std::find(names.begin(), names.end(), name); if (it == names.end()) return -1; else @@ -489,7 +489,7 @@ int DvDirModelSceneFolderNode::rowByName(const wstring &name) //----------------------------------------------------------------------------- DvDirModelSpecialFileFolderNode::DvDirModelSpecialFileFolderNode( - DvDirModelNode *parent, wstring name, const TFilePath &path) + DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirModelFileFolderNode(parent, name, path) { } @@ -514,7 +514,7 @@ void DvDirModelSpecialFileFolderNode::setPixmap(const QPixmap &pixmap) // //----------------------------------------------------------------------------- -DvDirVersionControlNode::DvDirVersionControlNode(DvDirModelNode *parent, wstring name, const TFilePath &path) +DvDirVersionControlNode::DvDirVersionControlNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirModelFileFolderNode(parent, name, path), m_isSynched(false), m_isUnversioned(false), m_oldName() { this->setExists(TFileStatus(path).doesExist()); @@ -594,7 +594,7 @@ QList DvDirVersionControlNode::getMissingFolders() const //----------------------------------------------------------------------------- -void DvDirVersionControlNode::getChildrenNames(std::vector &names) const +void DvDirVersionControlNode::getChildrenNames(std::vector &names) const { DvDirModelFileFolderNode::getChildrenNames(names); @@ -619,7 +619,7 @@ void DvDirVersionControlNode::setIsUnderVersionControl(bool value) //----------------------------------------------------------------------------- -DvDirModelNode *DvDirVersionControlNode::makeChild(wstring name) +DvDirModelNode *DvDirVersionControlNode::makeChild(std::wstring name) { if (TProjectManager::instance()->isProject(getPath() + name)) return new DvDirVersionControlProjectNode(this, name, getPath() + name); @@ -753,7 +753,7 @@ DvDirVersionControlRootNode *DvDirVersionControlNode::getVersionControlRootNode( //----------------------------------------------------------------------------- DvDirVersionControlRootNode::DvDirVersionControlRootNode(DvDirModelNode *parent, - wstring name, + std::wstring name, const TFilePath &path) : DvDirVersionControlNode(parent, name, path) { @@ -774,7 +774,7 @@ void DvDirVersionControlRootNode::refreshChildren() DvDirVersionControlProjectNode::DvDirVersionControlProjectNode( DvDirModelNode *parent, - wstring name, + std::wstring name, const TFilePath &path) : DvDirVersionControlNode(parent, name, path) { @@ -846,7 +846,7 @@ void DvDirVersionControlProjectNode::refreshChildren() //----------------------------------------------------------------------------- -void DvDirVersionControlProjectNode::getChildrenNames(std::vector &names) const +void DvDirVersionControlProjectNode::getChildrenNames(std::vector &names) const { DvDirVersionControlNode::getChildrenNames(names); TProjectManager *pm = TProjectManager::instance(); @@ -854,7 +854,7 @@ void DvDirVersionControlProjectNode::getChildrenNames(std::vector &name project->load(getProjectPath()); int i; for (i = 0; i < project->getFolderCount(); i++) { - string folderName = project->getFolderName(i); + std::string folderName = project->getFolderName(i); TFilePath folderPath = project->getFolder(i); //if(folderPath.isAbsolute() || folderPath.getParentDir() != TFilePath()) if (folderPath.isAbsolute() && project->isConstantFolder(i)) { @@ -941,7 +941,7 @@ void DvDirModelProjectNode::refreshChildren() //----------------------------------------------------------------------------- -void DvDirModelProjectNode::getChildrenNames(std::vector &names) const +void DvDirModelProjectNode::getChildrenNames(std::vector &names) const { DvDirModelFileFolderNode::getChildrenNames(names); TProjectManager *pm = TProjectManager::instance(); @@ -949,7 +949,7 @@ void DvDirModelProjectNode::getChildrenNames(std::vector &names) const project->load(getProjectPath()); int i; for (i = 0; i < project->getFolderCount(); i++) { - string folderName = project->getFolderName(i); + std::string folderName = project->getFolderName(i); TFilePath folderPath = project->getFolder(i); //if(folderPath.isAbsolute() || folderPath.getParentDir() != TFilePath()) if (folderPath.isAbsolute() && project->isConstantFolder(i)) { @@ -961,13 +961,13 @@ void DvDirModelProjectNode::getChildrenNames(std::vector &names) const //----------------------------------------------------------------------------- -DvDirModelNode *DvDirModelProjectNode::makeChild(wstring name) +DvDirModelNode *DvDirModelProjectNode::makeChild(std::wstring name) { if (name != L"" && name[0] == L'+') { TProjectManager *pm = TProjectManager::instance(); TProject *project = new TProject(); project->load(getProjectPath()); - string folderName = toString(name.substr(1)); + std::string folderName = toString(name.substr(1)); TFilePath folderPath = project->getFolder(folderName); DvDirModelNode *node = new DvDirModelFileFolderNode(this, name, folderPath); delete project; @@ -982,7 +982,7 @@ DvDirModelNode *DvDirModelProjectNode::makeChild(wstring name) // //----------------------------------------------------------------------------- -DvDirModelDayNode::DvDirModelDayNode(DvDirModelNode *parent, wstring dayDateString) +DvDirModelDayNode::DvDirModelDayNode(DvDirModelNode *parent, std::wstring dayDateString) : DvDirModelNode(parent, dayDateString), m_dayDateString(toString(dayDateString)) { m_nodeType = "Day"; @@ -1164,7 +1164,7 @@ DvDirModelRootNode::DvDirModelRootNode() //----------------------------------------------------------------------------- -void DvDirModelRootNode::add(wstring name, const TFilePath &path) +void DvDirModelRootNode::add(std::wstring name, const TFilePath &path) { DvDirModelNode *child = new DvDirModelFileFolderNode(this, name, path); child->setRow((int)m_children.size()); @@ -1201,7 +1201,7 @@ void DvDirModelRootNode::refreshChildren() int i; for (i = 0; i < (int)projectRoots.size(); i++) { TFilePath projectRoot = projectRoots[i]; - wstring roothDir = projectRoot.getWideString(); + std::wstring roothDir = projectRoot.getWideString(); DvDirModelSpecialFileFolderNode *projectRootNode = new DvDirModelSpecialFileFolderNode(this, L"Project root (" + roothDir + L")", projectRoot); projectRootNode->setPixmap(QPixmap(":Resources/projects.png")); @@ -1427,7 +1427,7 @@ QModelIndex DvDirModel::parent(const QModelIndex &index) const //----------------------------------------------------------------------------- -QModelIndex DvDirModel::childByName(const QModelIndex &parent, const wstring &name) const +QModelIndex DvDirModel::childByName(const QModelIndex &parent, const std::wstring &name) const { if (!parent.isValid()) return QModelIndex(); diff --git a/toonz/sources/toonz/filebrowsermodel.h b/toonz/sources/toonz/filebrowsermodel.h index cfdc5dc..3f42a66 100644 --- a/toonz/sources/toonz/filebrowsermodel.h +++ b/toonz/sources/toonz/filebrowsermodel.h @@ -23,21 +23,21 @@ class DvDirModelNode bool m_renameEnabled; protected: - wstring m_name; - wstring m_oldName; // Used for temporary Name - string m_nodeType; + std::wstring m_name; + std::wstring m_oldName; // Used for temporary Name + std::string m_nodeType; std::vector m_children; bool m_childrenValid; public: - DvDirModelNode(DvDirModelNode *parent, wstring name); + DvDirModelNode(DvDirModelNode *parent, std::wstring name); virtual ~DvDirModelNode(); DvDirModelNode *getParent() const { return m_parent; } - wstring getName() const { return m_name; } - virtual bool setName(wstring newName) { return false; } + std::wstring getName() const { return m_name; } + virtual bool setName(std::wstring newName) { return false; } - void setTemporaryName(const wstring &newName); + void setTemporaryName(const std::wstring &newName); void restoreName(); int getRow() const { return m_row; } @@ -55,7 +55,7 @@ public: virtual void refreshChildren() = 0; virtual bool hasChildren(); - virtual int rowByName(const wstring &name) const { return -1; } // ????????????? + virtual int rowByName(const std::wstring &name) const { return -1; } // ????????????? void enableRename(bool enabled) { m_renameEnabled = enabled; } bool isRenameEnabled() const { return m_renameEnabled; } @@ -65,7 +65,7 @@ public: bool areChildrenValid() const { return m_childrenValid; } // ????????????? - string getNodeType() const { return m_nodeType; } + std::string getNodeType() const { return m_nodeType; } virtual DvDirModelNode *getNodeByPath(const TFilePath &path) { return 0; } @@ -85,7 +85,7 @@ protected: bool m_peeks; //!< Whether this folder allows peeking (typically //!< to gather additional data on sub-folders existence) public: - DvDirModelFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path); + DvDirModelFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path); DvDirModelFileFolderNode(DvDirModelNode *parent, const TFilePath &path); QPixmap getPixmap(bool isOpen) const; @@ -94,11 +94,11 @@ public: virtual void refreshChildren(); virtual bool hasChildren(); - virtual void getChildrenNames(std::vector &names) const; - virtual DvDirModelNode *makeChild(wstring name); - int rowByName(const wstring &name) const; //????? + virtual void getChildrenNames(std::vector &names) const; + virtual DvDirModelNode *makeChild(std::wstring name); + int rowByName(const std::wstring &name) const; //????? - bool setName(wstring newName); // chiamarlo rename ???? + bool setName(std::wstring newName); // chiamarlo rename ???? bool isFolder(const TFilePath &folderPath) const { return folderPath == m_path; } bool isFolder() const { return !m_path.isEmpty(); } @@ -120,19 +120,19 @@ public: class DvDirModelSceneFolderNode : public DvDirModelFileFolderNode { - std::map m_folders; + std::map m_folders; public: - DvDirModelSceneFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &scenePath); + DvDirModelSceneFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &scenePath); DvDirModelSceneFolderNode(DvDirModelNode *parent, const TFilePath &path); ~DvDirModelSceneFolderNode(); - bool setName(wstring newName); + bool setName(std::wstring newName); QPixmap getPixmap(bool isOpen) const; - DvDirModelNode *makeChild(wstring name); - void getChildrenNames(std::vector &names) const; + DvDirModelNode *makeChild(std::wstring name); + void getChildrenNames(std::vector &names) const; void refreshChildren(); static DvDirModelFileFolderNode *createNode(DvDirModelNode *parent, const TFilePath &path); - int rowByName(const wstring &name); + int rowByName(const std::wstring &name); }; //----------------------------------------------------------------------------- @@ -142,7 +142,7 @@ class DvDirModelSpecialFileFolderNode : public DvDirModelFileFolderNode QPixmap m_pixmap; public: - DvDirModelSpecialFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &localPath); + DvDirModelSpecialFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &localPath); QPixmap getPixmap(bool isOpen) const; void setPixmap(const QPixmap &pixmap); }; @@ -160,15 +160,15 @@ private: // items contained in the folder: Filename, Version Control Status QMap m_statusMap; - wstring m_oldName; + std::wstring m_oldName; public: - DvDirVersionControlNode(DvDirModelNode *parent, wstring name, const TFilePath &path); + DvDirVersionControlNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path); - DvDirModelNode *makeChild(wstring name); + DvDirModelNode *makeChild(std::wstring name); QPixmap getPixmap(bool isOpen) const; - void getChildrenNames(std::vector &names) const; + void getChildrenNames(std::vector &names) const; QList getMissingFiles() const; QStringList getMissingFiles(const QRegExp &filter) const; @@ -206,7 +206,7 @@ class DvDirVersionControlRootNode : public DvDirVersionControlNode std::wstring m_password; public: - DvDirVersionControlRootNode(DvDirModelNode *parent, wstring name, const TFilePath &localPath); + DvDirVersionControlRootNode(DvDirModelNode *parent, std::wstring name, const TFilePath &localPath); void refreshChildren(); QPixmap getPixmap(bool isOpen) const { return m_pixmap; } @@ -232,14 +232,14 @@ class DvDirVersionControlProjectNode : public DvDirVersionControlNode { public: - DvDirVersionControlProjectNode(DvDirModelNode *parent, wstring name, const TFilePath &path); + DvDirVersionControlProjectNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path); TFilePath getProjectPath() const; bool isCurrent() const; void makeCurrent(); QPixmap getPixmap(bool isOpen) const; void refreshChildren(); - void getChildrenNames(std::vector &names) const; - //DvDirModelNode *makeChild(wstring name); + void getChildrenNames(std::vector &names) const; + //DvDirModelNode *makeChild(std::wstring name); }; //----------------------------------------------------------------------------- @@ -253,18 +253,18 @@ public: void makeCurrent(); QPixmap getPixmap(bool isOpen) const; void refreshChildren(); - void getChildrenNames(std::vector &names) const; - DvDirModelNode *makeChild(wstring name); + void getChildrenNames(std::vector &names) const; + DvDirModelNode *makeChild(std::wstring name); }; //----------------------------------------------------------------------------- class DvDirModelDayNode : public DvDirModelNode { - string m_dayDateString; + std::string m_dayDateString; public: - DvDirModelDayNode(DvDirModelNode *parent, wstring dayDateString); + DvDirModelDayNode(DvDirModelNode *parent, std::wstring dayDateString); void refreshChildren() {} void visualizeContent(FileBrowser *browser); //?????????????????? QPixmap getPixmap(bool isOpen) const; @@ -314,7 +314,7 @@ class DvDirModelRootNode : public DvDirModelNode DvDirModelNetworkNode *m_networkNode; DvDirModelProjectNode *m_sandboxProjectNode; - void add(wstring name, const TFilePath &path); + void add(std::wstring name, const TFilePath &path); public: DvDirModelRootNode(); @@ -348,7 +348,7 @@ public: QModelIndex getIndexByPath(const TFilePath &path) const; QModelIndex getIndexByNode(DvDirModelNode *node) const; - QModelIndex childByName(const QModelIndex &parent, const wstring &name) const; + QModelIndex childByName(const QModelIndex &parent, const std::wstring &name) const; int columnCount(const QModelIndex &parent) const { return 1; } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; diff --git a/toonz/sources/toonz/filebrowserpopup.cpp b/toonz/sources/toonz/filebrowserpopup.cpp index 54e2e33..5549c01 100644 --- a/toonz/sources/toonz/filebrowserpopup.cpp +++ b/toonz/sources/toonz/filebrowserpopup.cpp @@ -1391,7 +1391,7 @@ bool SaveLevelAsPopup::execute() dynamic_cast(TApp::instance()->getCurrentLevel()->getLevel()); if (!sl) return false; - string ext = sl->getPath().getType(); + std::string ext = sl->getPath().getType(); if (fp.getType() == "") fp = fp.withType(ext); diff --git a/toonz/sources/toonz/filedata.cpp b/toonz/sources/toonz/filedata.cpp index 446e63a..4967da9 100644 --- a/toonz/sources/toonz/filedata.cpp +++ b/toonz/sources/toonz/filedata.cpp @@ -56,7 +56,7 @@ void FileData::getFiles(TFilePath folder, std::vector &newFiles) cons } NameBuilder *nameBuilder = NameBuilder::getBuilder(toWideString(path.getName())); - wstring levelNameOut; + std::wstring levelNameOut; do levelNameOut = nameBuilder->getNext(); while (TSystem::doesExistFileOrLevel(path.withName(levelNameOut))); diff --git a/toonz/sources/toonz/fileinfopopup.h b/toonz/sources/toonz/fileinfopopup.h index 3205728..a165056 100644 --- a/toonz/sources/toonz/fileinfopopup.h +++ b/toonz/sources/toonz/fileinfopopup.h @@ -19,7 +19,7 @@ class FileInfoPopup : public DVGui::Dialog { Q_OBJECT - typedef std::pair StringPair; + typedef std::pair StringPair; QPushButton *m_closeBtn; @@ -36,7 +36,7 @@ class FileInfoPopup : public DVGui::Dialog // QLabel *m_dpiLabel; // TFilePath *m_xl; - void drawpair(TPoint p, std::pair &StringPair); + void drawpair(TPoint p, std::pair &StringPair); public: FileInfoPopup(); diff --git a/toonz/sources/toonz/fileviewerpopup.h b/toonz/sources/toonz/fileviewerpopup.h index 056c095..e2efd78 100644 --- a/toonz/sources/toonz/fileviewerpopup.h +++ b/toonz/sources/toonz/fileviewerpopup.h @@ -29,7 +29,7 @@ class FileViewer : public QWidget TLevelReaderP m_lr; TPaletteP m_palette; int m_fileSize; - string m_fileDate; + std::string m_fileDate; wstring m_levelName; TSoundOutputDevice *m_player; TSoundTrack *m_snd; diff --git a/toonz/sources/toonz/filmstrip.cpp b/toonz/sources/toonz/filmstrip.cpp index 8bd3c34..ce9e069 100644 --- a/toonz/sources/toonz/filmstrip.cpp +++ b/toonz/sources/toonz/filmstrip.cpp @@ -671,7 +671,7 @@ void FilmstripFrames::mousePressEvent(QMouseEvent *event) } else { //move current frame when clicked without modifier TApp *tapp = TApp::instance(); - vector fids; + std::vector fids; TXshLevel *level = tapp->getCurrentLevel()->getLevel(); level->getFids(fids); @@ -1108,7 +1108,7 @@ void Filmstrip::onChooseLevelComboChanged(int index) if (index == m_chooseLevelCombo->findText(tr("- No Current Level -"))) tapp->getCurrentLevel()->setLevel(0); else { - vector fids; + std::vector fids; m_levels[index]->getFids(fids); tapp->getCurrentFrame()->setFrameIds(fids); @@ -1345,7 +1345,7 @@ void Filmstrip::onLevelSwitched(TXshLevel *oldLevel) TXshLevel *sl = TApp::instance()->getCurrentLevel()->getLevel(); if (!sl) return; - vector fids; + std::vector fids; sl->getFids(fids); removeIcons(sl, fids, true); } diff --git a/toonz/sources/toonz/filmstripcommand.cpp b/toonz/sources/toonz/filmstripcommand.cpp index f004776..c2afc07 100644 --- a/toonz/sources/toonz/filmstripcommand.cpp +++ b/toonz/sources/toonz/filmstripcommand.cpp @@ -167,8 +167,8 @@ bool pasteAreasWithoutUndo(const QMimeData *data, TXshSimpleLevel *sl, std::set< TRasterP ras; double dpiX, dpiY; - vector rects; - vector strokes; + std::vector rects; + std::vector strokes; std::vector originalStrokes; TAffine affine; @@ -218,8 +218,8 @@ bool pasteAreasWithoutUndo(const QMimeData *data, TXshSimpleLevel *sl, std::set< TRasterP ras; double dpiX = 0, dpiY = 0; double imgDpiX = 0, imgDpiY = 0; - vector rects; - vector strokes; + std::vector rects; + std::vector strokes; std::vector originalStrokes; TAffine affine; @@ -311,7 +311,7 @@ bool pasteFramesWithoutUndo(const DrawingData *data, TXshSimpleLevel *sl, if (keepOriginalPalette) invalidateIcons(sl, frames); else { - vector sl_fids; + std::vector sl_fids; sl->getFids(sl_fids); invalidateIcons(sl, sl_fids); } @@ -326,10 +326,10 @@ bool pasteFramesWithoutUndo(const DrawingData *data, TXshSimpleLevel *sl, // "Svuota" i frames: i frames vengono buttati e al loro posto // vengono inseriti frames vuoti. -map clearFramesWithoutUndo(const TXshSimpleLevelP &sl, +std::map clearFramesWithoutUndo(const TXshSimpleLevelP &sl, const std::set &frames) { - map clearedFrames; + std::map clearedFrames; if (!sl || frames.empty()) return clearedFrames; @@ -539,8 +539,8 @@ public: if (ti) { TRasterP ras; double dpiX, dpiY; - vector rects; - vector strokes; + std::vector rects; + std::vector strokes; std::vector originalStrokes; TAffine affine; m_data->getData(ras, dpiX, dpiY, rects, strokes, originalStrokes, affine, ti->getPalette()); @@ -568,8 +568,8 @@ public: } else if (ri) { TRasterP ras; double dpiX, dpiY; - vector rects; - vector strokes; + std::vector rects; + std::vector strokes; std::vector originalStrokes; TAffine affine; m_data->getData(ras, dpiX, dpiY, rects, strokes, originalStrokes, affine, ri->getPalette()); @@ -968,7 +968,7 @@ public: } //update all icons - vector sl_fids; + std::vector sl_fids; m_sl.getPointer()->getFids(sl_fids); invalidateIcons(m_sl.getPointer(), sl_fids); @@ -1687,7 +1687,7 @@ void FilmstripCmd::clear(TXshSimpleLevel *sl, std::set &frames) HookSet *levelHooks = sl->getHookSet(); std::set oldFrames = frames; - map clearedFrames = clearFramesWithoutUndo(sl, frames); + std::map clearedFrames = clearFramesWithoutUndo(sl, frames); DrawingData *oldData = new DrawingData(); oldData->setFrames(clearedFrames, sl, *levelHooks); DrawingData *newData = new DrawingData(); @@ -2359,12 +2359,12 @@ void moveToSceneFrames(TXshLevel *level, const std::set &frames) class MoveLevelToSceneUndo : public TUndo { - wstring m_levelName; + std::wstring m_levelName; int m_col; std::set m_fids; public: - MoveLevelToSceneUndo(wstring levelName, int col, + MoveLevelToSceneUndo(std::wstring levelName, int col, std::set fids) : m_levelName(levelName), m_col(col), m_fids(fids) { @@ -2486,8 +2486,8 @@ namespace class UndoInbetween : public TUndo { TXshSimpleLevelP m_level; - vector m_fids; - vector m_images; + std::vector m_fids; + std::vector m_images; FilmstripCmd::InbetweenInterpolation m_interpolation; public: diff --git a/toonz/sources/toonz/flipbook.cpp b/toonz/sources/toonz/flipbook.cpp index 0c9c5ec..e379650 100644 --- a/toonz/sources/toonz/flipbook.cpp +++ b/toonz/sources/toonz/flipbook.cpp @@ -95,7 +95,7 @@ #ifdef _WIN32 #include "avicodecrestrictions.h" -#endif; +#endif #include "flipbook.h" @@ -599,7 +599,7 @@ bool FlipBook::doSaveImages(TFilePath fp) ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); TOutputProperties *outputSettings = scene->getProperties()->getOutputProperties(); - string ext = fp.getType(); + std::string ext = fp.getType(); // Open a notice that the previewFx is rendered in 8bpc regardless of the output settings. if (m_isPreviewFx && outputSettings->getRenderSettings().m_bpp == 64) { @@ -612,7 +612,7 @@ bool FlipBook::doSaveImages(TFilePath fp) #ifdef _WIN32 if (ext == "avi") { TPropertyGroup *props = outputSettings->getFileFormatProperties(ext); - string codecName = props->getProperty(0)->getValueAsString(); + std::string codecName = props->getProperty(0)->getValueAsString(); TDimension res = scene->getCurrentCamera()->getRes(); if (!AviCodecRestrictions::canWriteMovie(toWideString(codecName), res)) { QString msg(QObject::tr("The resolution of the output camera does not fit with the options chosen for the output file format.")); @@ -620,7 +620,7 @@ bool FlipBook::doSaveImages(TFilePath fp) return false; } } -#endif; +#endif if (ext == "") { ext = outputSettings->getPath().getType(); @@ -891,7 +891,7 @@ void FlipBookPool::save() const history.beginGroup("flipbooks"); - map::const_iterator it; + std::map::const_iterator it; for (it = m_pool.begin(); it != m_pool.end(); ++it) { history.beginGroup(QString::number(it->first)); TPanel *panel = static_cast(it->second->parent()); @@ -899,7 +899,7 @@ void FlipBookPool::save() const history.endGroup(); } - map::const_iterator jt; + std::map::const_iterator jt; for (jt = m_geometryPool.begin(); jt != m_geometryPool.end(); ++jt) { history.beginGroup(QString::number(jt->first)); history.setValue("geometry", jt->second); @@ -1465,7 +1465,7 @@ void FlipBook::playAudioFrame(int frame) try { m_player->play(m_snd, firstSample, lastSample, false, false); } catch (TSoundDeviceException &e) { - string msg; + std::string msg; if (e.getType() == TSoundDeviceException::UnsupportedFormat) { try { TSoundTrackFormat fmt = m_player->getPreferredFormat(m_snd->getFormat()); @@ -1483,7 +1483,7 @@ void FlipBook::playAudioFrame(int frame) TImageP FlipBook::getCurrentImage(int frame) { - string id = ""; + std::string id = ""; TFrameId fid; TFilePath fp; @@ -1543,7 +1543,7 @@ TImageP FlipBook::getCurrentImage(int frame) if (TImageCache::instance()->isCached(id)) { TRect loadbox; - map::const_iterator it = m_loadboxes.find(id); + std::map::const_iterator it = m_loadboxes.find(id); if (it != m_loadboxes.end()) loadbox = it->second; @@ -1752,7 +1752,7 @@ void FlipBook::dragEnterEvent(QDragEnterEvent *e) foreach (QUrl url, mimeData->urls()) { TFilePath fp(url.toLocalFile().toStdWString()); - string type = fp.getType(); + std::string type = fp.getType(); if (type == "tzp" || type == "tzu" || type == "tnz" || type == "scr" || type == "mesh") return; } diff --git a/toonz/sources/toonz/flipbook.h b/toonz/sources/toonz/flipbook.h index 642368b..ea91622 100644 --- a/toonz/sources/toonz/flipbook.h +++ b/toonz/sources/toonz/flipbook.h @@ -75,8 +75,8 @@ class FlipBook; class FlipBookPool { - map m_pool; - map m_geometryPool; + std::map m_pool; + std::map m_geometryPool; int m_overallFlipCount; TFilePath m_historyPath; @@ -124,7 +124,7 @@ protected: int m_framesCount; TRect m_loadbox; TDimension m_dim; - map m_loadboxes; //id in the cash, rect loaded actually + std::map m_loadboxes; //id in the cash, rect loaded actually class Level { public: @@ -142,12 +142,12 @@ protected: int getIndexesCount(); }; - vector m_levels; - vector m_levelNames; + std::vector m_levels; + std::vector m_levelNames; TPalette *m_palette; bool m_playSound; - vector m_addedInCache; + std::vector m_addedInCache; TSoundOutputDevice *m_player; TSoundTrack *m_snd; diff --git a/toonz/sources/toonz/formatsettingspopups.cpp b/toonz/sources/toonz/formatsettingspopups.cpp index 99d1ead..5aeabca 100644 --- a/toonz/sources/toonz/formatsettingspopups.cpp +++ b/toonz/sources/toonz/formatsettingspopups.cpp @@ -15,7 +15,7 @@ #ifdef _WIN32 #include "avicodecrestrictions.h" -#endif; +#endif // TnzCore includes #include "tlevel_io.h" @@ -78,7 +78,7 @@ FormatSettingsPopup::FormatSettingsPopup( m_mainLayout->addWidget(m_configureCodec, m_mainLayout->rowCount(), 0, 1, 2); connect(m_configureCodec, SIGNAL(released()), this, SLOT(onAviCodecConfigure())); } -#endif; +#endif m_topLayout->addLayout(m_mainLayout, 1); } @@ -110,10 +110,10 @@ void FormatSettingsPopup::buildPropertyComboBox(int index, TPropertyGroup *props connect(comboBox, SIGNAL(currentIndexChanged(const QString)), this, SLOT(onComboBoxIndexChanged(const QString))); TEnumProperty::Range range = prop->getRange(); int currIndex = -1; - wstring defaultVal = prop->getValue(); + std::wstring defaultVal = prop->getValue(); for (int i = 0; i < (int)range.size(); i++) { - wstring nameProp = range[i]; + std::wstring nameProp = range[i]; if (nameProp.find(L"16(GREYTONES)") != -1) //pezza per il tif: il 16 lo scrive male, e il 48 lo legge male... continue; @@ -134,7 +134,7 @@ void FormatSettingsPopup::buildPropertyComboBox(int index, TPropertyGroup *props #ifdef _WIN32 if (m_format == "avi") m_codecComboBox = comboBox; -#endif; +#endif } //----------------------------------------------------------------------------- @@ -203,7 +203,7 @@ void FormatSettingsPopup::onComboBoxIndexChanged(const QString codecName) void FormatSettingsPopup::onAviCodecConfigure() { QString codecName = m_codecComboBox->currentText(); - wstring wCodecName = codecName.toStdWString(); + std::wstring wCodecName = codecName.toStdWString(); if (AviCodecRestrictions::canBeConfigured(wCodecName)) AviCodecRestrictions::openConfiguration(wCodecName, (HWND)winId()); } @@ -236,11 +236,11 @@ void FormatSettingsPopup::showEvent(QShowEvent *se) TEnumProperty::Range range = eProps->getRange(); int currIndex = -1; - wstring defaultVal = eProps->getValue(); + std::wstring defaultVal = eProps->getValue(); - QMap usableCodecs = AviCodecRestrictions::getUsableCodecs(res); + QMap usableCodecs = AviCodecRestrictions::getUsableCodecs(res); for (int i = 0; i < (int)range.size(); i++) { - wstring nameProp = range[i]; + std::wstring nameProp = range[i]; if (nameProp == L"Uncompressed" || (usableCodecs.contains(nameProp) && usableCodecs[nameProp])) { if (nameProp == defaultVal) currIndex = m_codecComboBox->count(); diff --git a/toonz/sources/toonz/history.cpp b/toonz/sources/toonz/history.cpp index cd27003..9706ccf 100644 --- a/toonz/sources/toonz/history.cpp +++ b/toonz/sources/toonz/history.cpp @@ -14,7 +14,7 @@ inline TFilePath getHistoryFile() return TEnv::getConfigDir() + (TSystem::getUserName().toStdString() + "_history.txt"); } -string History::Day::getDate() const +std::string History::Day::getDate() const { QDate today = QDate::currentDate(); QDate yesterday = today.addDays(-1); @@ -95,7 +95,7 @@ const History::Day *History::getDay(const QDate &time) const return 0; } -const History::Day *History::getDay(string dateString) const +const History::Day *History::getDay(std::string dateString) const { for (int i = 0; i < (int)m_days.size(); i++) if (m_days[i]->getDate() == dateString) @@ -128,7 +128,7 @@ void History::load() Tifstream is(fp); if (!is) return; - map table; + std::map table; std::map::iterator it; for (;;) { char buffer[2048]; diff --git a/toonz/sources/toonz/history.h b/toonz/sources/toonz/history.h index d260e92..f2d9446 100644 --- a/toonz/sources/toonz/history.h +++ b/toonz/sources/toonz/history.h @@ -27,7 +27,7 @@ public: { public: QDate m_timeStamp; - string getDate() const; + std::string getDate() const; std::set m_items; Day(const QDate &t) : m_timeStamp(t){}; void getFiles(std::vector &files) const; @@ -39,13 +39,13 @@ public: int getDayCount() const { return m_days.size(); }; const Day *getDay(int i) const; const Day *getDay(const QDate &time) const; - const Day *getDay(string dateString) const; // getDay(dateString)->getDate() == dateString + const Day *getDay(std::string dateString) const; // getDay(dateString)->getDate() == dateString // nota. ritorna il giorno (se c'e') che ha un timeStamp IDENTICO a time void addItem(const TFilePath &fp); private: - vector m_days; + std::vector m_days; History(); void load(); diff --git a/toonz/sources/toonz/insertfxpopup.cpp b/toonz/sources/toonz/insertfxpopup.cpp index 9ae2b44..59f2fc9 100644 --- a/toonz/sources/toonz/insertfxpopup.cpp +++ b/toonz/sources/toonz/insertfxpopup.cpp @@ -107,34 +107,34 @@ TFx *createMacroFxByPath(TFilePath path) FxDag *fxDag = xsh->getFxDag(); if (!fxDag) return fx; - vector fxs; + std::vector fxs; fxs = fx->getFxs(); - QMap oldNewId; + QMap oldNewId; int i; for (i = 0; i < fxs.size(); i++) { - wstring oldId = fxs[i]->getFxId(); + std::wstring oldId = fxs[i]->getFxId(); fxDag->assignUniqueId(fxs[i].getPointer()); oldNewId[oldId] = fxs[i]->getFxId(); } - QStack> newPortNames; + QStack> newPortNames; //Devo cambiare il nome alle porte: contengono l'id dei vecchi effetti for (i = fx->getInputPortCount() - 1; i >= 0; i--) { - string oldPortName = fx->getInputPortName(i); - string inFxOldId = oldPortName; + std::string oldPortName = fx->getInputPortName(i); + std::string inFxOldId = oldPortName; inFxOldId.erase(0, inFxOldId.find_last_of("_") + 1); assert(oldNewId.contains(toWideString(inFxOldId))); - string inFxNewId = toString(oldNewId[toWideString(inFxOldId)]); - string newPortName = oldPortName; + std::string inFxNewId = toString(oldNewId[toWideString(inFxOldId)]); + std::string newPortName = oldPortName; newPortName.erase(newPortName.find_last_of("_") + 1, newPortName.size() - 1); newPortName.append(inFxNewId); TFxPort *fxPort = fx->getInputPort(i); - newPortNames.append(QPair(newPortName, fxPort)); + newPortNames.append(QPair(newPortName, fxPort)); fx->removeInputPort(oldPortName); } while (!newPortNames.isEmpty()) { - QPair newPort = newPortNames.pop(); + QPair newPort = newPortNames.pop(); fx->addInputPort(newPort.first, *newPort.second); } return fx; @@ -281,7 +281,7 @@ bool InsertFxPopup::loadFx(TFilePath fp) return false; m_is = &is; try { - string tagName; + std::string tagName; if (m_is->matchTag(tagName) && tagName == "fxs") { loadFolder(0); m_is->closeChild(); @@ -436,7 +436,7 @@ TFx *InsertFxPopup::createFx() TFilePath path = TFilePath(text.toStdWString()); if (TFileStatus(path).doesExist() && TFileStatus(path.getParentDir()).isDirectory()) { - string folder = path.getParentDir().getName(); + std::string folder = path.getParentDir().getName(); if (folder == "macroFx") //Devo caricare una macro fx = createMacroFxByPath(path); else //Verifico se devo caricare un preset @@ -480,7 +480,7 @@ void InsertFxPopup::contextMenuEvent(QContextMenuEvent *event) TFilePath path = TFilePath(itemRole.toStdWString()); if (TFileStatus(path).doesExist() && TFileStatus(path.getParentDir()).isDirectory()) { QMenu *menu = new QMenu(this); - string folder = path.getParentDir().getName(); + std::string folder = path.getParentDir().getName(); if (folder == "macroFx") //Menu' macro { QAction *remove = new QAction(tr("Remove Macro FX"), menu); diff --git a/toonz/sources/toonz/insertfxpopup.h b/toonz/sources/toonz/insertfxpopup.h index dda1503..6334d37 100644 --- a/toonz/sources/toonz/insertfxpopup.h +++ b/toonz/sources/toonz/insertfxpopup.h @@ -37,7 +37,7 @@ public: private: TFx *createFx(); - void makeItem(QTreeWidgetItem *parent, string fxid); + void makeItem(QTreeWidgetItem *parent, std::string fxid); void loadFolder(QTreeWidgetItem *parent); /*!Return true if preset is loaded.*/ diff --git a/toonz/sources/toonz/iocommand.cpp b/toonz/sources/toonz/iocommand.cpp index eade44a..9982c98 100644 --- a/toonz/sources/toonz/iocommand.cpp +++ b/toonz/sources/toonz/iocommand.cpp @@ -200,7 +200,7 @@ public: // override the folder if (m_dstFolder != TFilePath()) { // +drawings/oldfolder/level.pli => +drawings/xsheetfolder/oldfolder/level.pli - wstring head; + std::wstring head; TFilePath tail; dstPath.split(head, tail); dstPath = TFilePath(head) + m_dstFolder + tail; @@ -342,7 +342,7 @@ int getLevelType(const TFilePath &actualPath) if (type == TFileType::RASTER_IMAGE || type == TFileType::RASTER_LEVEL || type == TFileType::CMAPPED_LEVEL) { - string ext = actualPath.getType(); + std::string ext = actualPath.getType(); if (ext == "tzp" || ext == "tzu" || ext == "tzl" || ext == "tlv") return TZP_XSHLEVEL; else @@ -646,7 +646,7 @@ void ChildLevelResourceImporter::process(TXshSimpleLevel *sl) } TFilePath slPath = sl->getPath(); - string suffix = ResourceImporter::extractPsdSuffix(slPath); + std::string suffix = ResourceImporter::extractPsdSuffix(slPath); TFilePath path = m_importStrategy.process(m_parentScene, m_childScene, slPath); // actualPath); if (suffix != "") @@ -654,7 +654,7 @@ void ChildLevelResourceImporter::process(TXshSimpleLevel *sl) sl->setPath(path, false); // m_parentScene->codeFilePath(actualPath), false); NameModifier nm(sl->getName()); - wstring levelName; + std::wstring levelName; for (;;) { levelName = nm.getNext(); if (!parentLevelSet->hasLevel(levelName)) @@ -688,7 +688,7 @@ void ChildLevelResourceImporter::process(TXshPaletteLevel *pl) pl->setPath(path); NameModifier nm(pl->getName()); - wstring levelName; + std::wstring levelName; for (;;) { levelName = nm.getNext(); if (!parentLevelSet->hasLevel(levelName)) @@ -716,7 +716,7 @@ void ChildLevelResourceImporter::process(TXshSoundLevel *sl) TFilePath path = m_importStrategy.process(m_parentScene, m_childScene, sl->getPath()); sl->setPath(path); NameModifier nm(sl->getName()); - wstring levelName; + std::wstring levelName; for (;;) { levelName = nm.getNext(); if (!parentLevelSet->hasLevel(levelName)) @@ -755,7 +755,7 @@ TXshLevel *loadChildLevel(ToonzScene *parentScene, TFilePath actualPath, int row ToonzScene scene; scene.loadTnzFile(actualPath); scene.setProject(project.getPointer()); - wstring subSceneName = actualPath.getWideName(); + std::wstring subSceneName = actualPath.getWideName(); // camera settings. get the child camera ... TXsheet *childXsh = scene.getXsheet(); @@ -879,7 +879,7 @@ TXshLevel *loadLevel( if (!xl) { try { - string format = actualPath.getType(); + std::string format = actualPath.getType(); if (format == "tzp" || format == "tzu") convertingPopup->show(); @@ -1527,8 +1527,8 @@ bool IoCmd::saveLevel(const TFilePath &path) dynamic_cast(app->getCurrentLevel()->getLevel()); if (!sl) return false; - string ext = sl->getPath().getType(); - string dotts = sl->getPath().getDots(); + std::string ext = sl->getPath().getType(); + std::string dotts = sl->getPath().getDots(); TFilePath realPath = path; if (realPath.getType() == "") realPath = TFilePath(realPath.getWideString() + toWideString(dotts + ext)); @@ -1742,7 +1742,7 @@ bool IoCmd::loadColorModel(const TFilePath &fp, int frame) try { path = importDialog.process(scene, 0, path); - } catch (string msg) { + } catch (std::string msg) { error(QString::fromStdString(msg)); return true; } @@ -2370,7 +2370,7 @@ int IoCmd::loadResources(LoadResourceArguments &args, try { path = importDialog.process(scene, 0, path); // path = scene->decodeFilePath(codedPath); - } catch (string msg) { + } catch (std::string msg) { error(QString::fromStdString(msg)); continue; } diff --git a/toonz/sources/toonz/levelcommand.cpp b/toonz/sources/toonz/levelcommand.cpp index 2150e7a..c8e99f8 100644 --- a/toonz/sources/toonz/levelcommand.cpp +++ b/toonz/sources/toonz/levelcommand.cpp @@ -178,7 +178,7 @@ TFilePath getUnpaintedLevelPath(TXshSimpleLevel *simpleLevel) TFilePath levelPath = scene->decodeFilePath(simpleLevel->getPath()); if (levelPath.isEmpty()) return TFilePath(); - string name = levelPath.getName() + "_np." + levelPath.getType(); + std::string name = levelPath.getName() + "_np." + levelPath.getType(); return levelPath.getParentDir() + "nopaint\\" + TFilePath(name); } @@ -386,7 +386,7 @@ void revertTo(bool isCleanedUp) TXshSimpleLevel *level = (!cell.isEmpty()) ? cell.getSimpleLevel() : 0; if (!level) continue; - string ext = level->getPath().getType(); + std::string ext = level->getPath().getType(); int type = level->getType(); /*-- Revert可能なLevelタイプの条件 --*/ if ((isCleanedUp && type == TZP_XSHLEVEL) || diff --git a/toonz/sources/toonz/levelcreatepopup.cpp b/toonz/sources/toonz/levelcreatepopup.cpp index 4b823a4..b309b5e 100644 --- a/toonz/sources/toonz/levelcreatepopup.cpp +++ b/toonz/sources/toonz/levelcreatepopup.cpp @@ -395,15 +395,15 @@ bool LevelCreatePopup::apply() int xres = tround(w * dpi), yres = tround(h * dpi); int lType = getLevelType(); - wstring levelName = m_nameFld->text().toStdWString(); + std::wstring levelName = m_nameFld->text().toStdWString(); // tolgo i blanks prima e dopo i = levelName.find_first_not_of(L' '); - if (i == (int)wstring::npos) + if (i == (int)std::wstring::npos) levelName = L""; else { int j = levelName.find_last_not_of(L' '); - assert(j != (int)wstring::npos); + assert(j != (int)std::wstring::npos); levelName = levelName.substr(i, j - i + 1); } if (levelName.empty()) { diff --git a/toonz/sources/toonz/levelsettingspopup.cpp b/toonz/sources/toonz/levelsettingspopup.cpp index d265baf..8abe048 100644 --- a/toonz/sources/toonz/levelsettingspopup.cpp +++ b/toonz/sources/toonz/levelsettingspopup.cpp @@ -759,7 +759,7 @@ void LevelSettingsPopup::onScanPathChanged() if (TSystem::doesExistFileOrLevel(settingsPath)) { TIStream is(settingsPath); TFilePath cleanupLevelPath; - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "cleanupPalette" || tagName == "cleanupCamera" || tagName == "autoCenter" || tagName == "transform" || tagName == "lineProcessing" || tagName == "closestField" || tagName == "fdg") { is.skipCurrentTag(); @@ -819,7 +819,7 @@ void LevelSettingsPopup::onDpiFieldChanged() if (!m_sl || m_sl->getType() == PLI_XSHLEVEL) return; - string s = w.toStdString(); + std::string s = w.toStdString(); TPointD dpi; int i = 0, len = s.length(); diff --git a/toonz/sources/toonz/licensecontroller.h b/toonz/sources/toonz/licensecontroller.h index a58266d..e1f8cf8 100644 --- a/toonz/sources/toonz/licensecontroller.h +++ b/toonz/sources/toonz/licensecontroller.h @@ -39,10 +39,10 @@ enum ActivateStatus { std::string getFirstValidMacAddress(); //Restituisce tutti i mac address valido delle interfacce di rete della macchine corrente -void getAllValidMacAddresses(std::vector &addresses); +void getAllValidMacAddresses(std::vector &addresses); // restituisce il machineCode della iesima interfaccia di rete della macchina corrente // Il machine code e' costituito dagli ultimi 8 caratteri del macAdress -string getCodeFromMacAddress(string macAddress); +std::string getCodeFromMacAddress(std::string macAddress); // restituisce la licenza corrente (installata sulla macchina) std::string getInstalledLicense(); @@ -101,7 +101,7 @@ TFilePath getMacAddressFilePath(); std::string readSentinelDate(std::string regKey); //Dando in input la sentinella(criptata) ritorna true se la data di //prima installazione(memorizzata nella sentinella) e' minore della data corrente. -bool isValidSentinel(string license); +bool isValidSentinel(std::string license); std::string createClsid(std::string fullMacAddress, char *licenseType); //Controlla se la licenza e' del tipo STORYPLANNERPRO bool isStoryPlannerPro(); diff --git a/toonz/sources/toonz/linetestcapturepane.cpp b/toonz/sources/toonz/linetestcapturepane.cpp index cc48599..7f1d97b 100644 --- a/toonz/sources/toonz/linetestcapturepane.cpp +++ b/toonz/sources/toonz/linetestcapturepane.cpp @@ -757,7 +757,7 @@ FileSettingsPopup::FileSettingsPopup() m_fileFormat->addItems(formats); m_fileFormat->setMaximumHeight(WidgetHeight); - string ext = parameters->getFileFormat(); + std::string ext = parameters->getFileFormat(); m_fileFormat->setCurrentIndex(m_fileFormat->findText(QString::fromStdString(ext))); ret = ret && connect(m_fileFormat, SIGNAL(currentIndexChanged(const QString &)), SLOT(onFormatChanged(const QString &))); fileFormatLayout->addWidget(m_fileFormat); @@ -782,7 +782,7 @@ void FileSettingsPopup::updateWidgets() m_pathField->setPath(toQString(parameters->getFilePath())); - string ext = parameters->getFileFormat(); + std::string ext = parameters->getFileFormat(); m_fileFormat->setCurrentIndex(m_fileFormat->findText(QString::fromStdString(ext))); } @@ -816,7 +816,7 @@ void FileSettingsPopup::onFormatChanged(const QString &str) void FileSettingsPopup::openSettingsPopup() { CaptureParameters *parameters = getCaptureParameters(); - string ext = parameters->getFileFormat(); + std::string ext = parameters->getFileFormat(); openFormatSettingsPopup(this, ext, parameters->getFileFormatProperties(ext)); } @@ -1188,7 +1188,7 @@ void LineTestCapturePane::onConnectCheckboxStateChanged(int state) if (state) { TSceneProperties *sceneProperties = TApp::instance()->getCurrentScene()->getScene()->getProperties(); Q_ASSERT(sceneProperties); - wstring deviceName = sceneProperties->getCaptureParameters()->getDeviceName(); + std::wstring deviceName = sceneProperties->getCaptureParameters()->getDeviceName(); if (deviceName.empty()) { DVGui::warning(tr("No Device Defined.")); @@ -1308,7 +1308,7 @@ void LineTestCapturePane::updateFileField() } else { ToonzScene *scene = xsheet->getScene(); TLevelSet *levelSet = scene->getLevelSet(); - wstring levelName; + std::wstring levelName; NameBuilder *nameBuilder = NameBuilder::getBuilder(levelName); TFilePath fp; for (;;) { diff --git a/toonz/sources/toonz/magpiefileimportpopup.cpp b/toonz/sources/toonz/magpiefileimportpopup.cpp index 87e1b0b..8223d9a 100644 --- a/toonz/sources/toonz/magpiefileimportpopup.cpp +++ b/toonz/sources/toonz/magpiefileimportpopup.cpp @@ -189,10 +189,10 @@ void MagpieFileImportPopup::onLevelPathChanged() } m_levelPath = levelPath; - string format = m_levelPath.getType(); + std::string format = m_levelPath.getType(); if (format == "tzp" || format == "tzu") { - wstring name = m_levelPath.getWideName(); + std::wstring name = m_levelPath.getWideName(); IoCmd::ConvertingPopup *convertingPopup = new IoCmd::ConvertingPopup( TApp::instance()->getMainWindow(), QString::fromStdWString(name) + QString::fromStdString(m_levelPath.getDottedType())); diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index ad9ecd4..bdffd36 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -449,7 +449,7 @@ int main(int argc, char *argv[]) // Initialize thread components TThread::init(); - string feature = selectedFeature.getValue(); + std::string feature = selectedFeature.getValue(); TProjectManager *projectManager = TProjectManager::instance(); if (Preferences::instance()->isSVNEnabled()) { @@ -676,12 +676,12 @@ int main(int argc, char *argv[]) QFont *myFont; - string family = EnvSoftwareCurrentFont; + std::string family = EnvSoftwareCurrentFont; myFont = new QFont(QString(family.c_str())); myFont->setPixelSize(EnvSoftwareCurrentFontSize); /*-- フォントのBoldの指定 --*/ - string weight = EnvSoftwareCurrentFontWeight; + std::string weight = EnvSoftwareCurrentFontWeight; if (strcmp(weight.c_str(), "Yes") == 0) myFont->setBold(true); else diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index 0a368f9..e076360 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -92,8 +92,8 @@ namespace { //============================================================================= -const string layoutsFileName = "layouts.txt"; -const string currentRoomFileName = "currentRoom.txt"; +const std::string layoutsFileName = "layouts.txt"; +const std::string currentRoomFileName = "currentRoom.txt"; bool scrambledRooms = false; //============================================================================= @@ -597,7 +597,7 @@ void MainWindow::readSettings(const QString &argumentLayoutFileName) // Imposto la stanza corrente fp = ToonzFolder::getModuleFile(currentRoomFileName); Tifstream is(fp); - string currentRoomName; + std::string currentRoomName; is >> currentRoomName; if (currentRoomName != "") { int count = m_stackedWidget->count(); diff --git a/toonz/sources/toonz/matchline.cpp b/toonz/sources/toonz/matchline.cpp index 975a583..5621817 100644 --- a/toonz/sources/toonz/matchline.cpp +++ b/toonz/sources/toonz/matchline.cpp @@ -69,7 +69,7 @@ public: : m_cell(&cell), m_imgAff(imgAff), m_mcell(&mcell), m_matchAff(matchAff){}; }; -void doMatchlines(const vector &matchingLevels, int inkIndex, int inkPrevalence) +void doMatchlines(const std::vector &matchingLevels, int inkIndex, int inkPrevalence) { if (matchingLevels.empty()) return; @@ -152,7 +152,7 @@ void doMatchlines(const vector &matchingLevels, int inkIndex, if (inkIndex != -1) return; - wstring pageName = L"match lines"; + std::wstring pageName = L"match lines"; for (i = 0; i < palette->getPageCount(); i++) if (palette->getPage(i)->getName() == pageName) { @@ -178,11 +178,11 @@ void doMatchlines(const vector &matchingLevels, int inkIndex, /*------------------------------------------------------------------------*/ -void applyDeleteMatchline(TXshSimpleLevel *sl, const vector &fids, const vector &_inkIndexes) +void applyDeleteMatchline(TXshSimpleLevel *sl, const std::vector &fids, const std::vector &_inkIndexes) { TPalette::Page *page = 0; int i, j, pageIndex = 0; - vector inkIndexes = _inkIndexes; + std::vector inkIndexes = _inkIndexes; if (fids.empty()) return; @@ -489,11 +489,11 @@ class DeleteMatchlineUndo : public TUndo public: TXshLevel *m_xl; TXshSimpleLevel *m_sl; - vector m_fids; - vector m_indexes; + std::vector m_fids; + std::vector m_indexes; TPaletteP m_matchlinePalette; - DeleteMatchlineUndo(TXshLevel *xl, TXshSimpleLevel *sl, const vector &fids, const vector &indexes) //, TPalette*matchPalette) + DeleteMatchlineUndo(TXshLevel *xl, TXshSimpleLevel *sl, const std::vector &fids, const std::vector &indexes) //, TPalette*matchPalette) : TUndo(), m_xl(xl), m_sl(sl), @@ -592,7 +592,7 @@ public: m_level->getPalette()->assign(m_palette); - vector fids; + std::vector fids; for (; it != m_images.end(); ++it) //, ++mit) { QString id = "MatchlinesUndo" + QString::number(m_mergeCmappedSessionId) + "-" + QString::number(it->first.getNumber()); @@ -664,8 +664,8 @@ void doMatchlines(int column, int mColumn, int index, int inkPrevalence, int Mer if (start > end) return; - vector cell(end - start + 1); - vector mCell(end - start + 1); + std::vector cell(end - start + 1); + std::vector mCell(end - start + 1); xsh->getCells(start, column, cell.size(), &(cell[0])); @@ -675,7 +675,7 @@ void doMatchlines(int column, int mColumn, int index, int inkPrevalence, int Mer TXshColumn *col = xsh->getColumn(column); TXshColumn *mcol = xsh->getColumn(mColumn); - vector matchingLevels; + std::vector matchingLevels; std::map table; @@ -864,7 +864,7 @@ const TXshCell *findCell(int column, const TFrameId &fid) return 0; } -bool contains(const vector &v, const TFrameId &val) +bool contains(const std::vector &v, const TFrameId &val) { int i; for (i = 0; i < (int)v.size(); i++) @@ -913,9 +913,9 @@ QString indexes2string(const std::set fids) //----------------------------------------------------------------------------- -vector string2Indexes(const QString &values) +std::vector string2Indexes(const QString &values) { - vector ret; + std::vector ret; int i, j; bool ok; QStringList vals = values.split(',', QString::SkipEmptyParts); @@ -923,20 +923,20 @@ vector string2Indexes(const QString &values) if (vals.at(i).contains('-')) { QStringList vals1 = vals.at(i).split('-', QString::SkipEmptyParts); if (vals1.size() != 2) - return vector(); + return std::vector(); int from = vals1.at(0).toInt(&ok); if (!ok) - return vector(); + return std::vector(); int to = vals1.at(1).toInt(&ok); if (!ok) - return vector(); + return std::vector(); for (j = tmin(from, to); j <= tmax(from, to); j++) ret.push_back(j); } else { int val = vals.at(i).toInt(&ok); if (!ok) - return vector(); + return std::vector(); ret.push_back(val); } } @@ -946,15 +946,15 @@ vector string2Indexes(const QString &values) //----------------------------------------------------------------------------- -vector DeleteInkDialog::getInkIndexes() +std::vector DeleteInkDialog::getInkIndexes() { return string2Indexes(m_inkIndex->text()); } -vector DeleteInkDialog::getFrames() +std::vector DeleteInkDialog::getFrames() { - vector ret; - vector ret1 = string2Indexes(m_frames->text()); + std::vector ret; + std::vector ret1 = string2Indexes(m_frames->text()); int i; for (i = 0; i < (int)ret1.size(); i++) ret.push_back(ret1[i]); @@ -1079,7 +1079,7 @@ void doDeleteMatchlines(TXshSimpleLevel *sl, const std::set &fids, boo for (int i = 0; i < fidsToProcess.size(); i++) //the saveboxes must be updated ToolUtils::updateSaveBox(sl, fidsToProcess[i]); - vector fidsss; + std::vector fidsss; xl->getFids(fidsss); invalidateIcons(xl, fidsss); TApp::instance()->getCurrentXsheet()->notifyXsheetChanged(); diff --git a/toonz/sources/toonz/matchline.h b/toonz/sources/toonz/matchline.h index f2fa2c9..45ba15d 100644 --- a/toonz/sources/toonz/matchline.h +++ b/toonz/sources/toonz/matchline.h @@ -94,8 +94,8 @@ public: void setRange(const QString &str); - vector getInkIndexes(); - vector getFrames(); + std::vector getInkIndexes(); + std::vector getFrames(); }; //========================================================================== @@ -106,4 +106,4 @@ void mergeColumns(int dstColumn, int srcColumn, bool isRedo); void mergeColumns(const std::set &columns); void doMatchlines(int column, int mColumn, int index, int inkPrevalence, int MatchlineSessionId = 0); void mergeCmapped(int dstColumn, int srcColumn, const QString &fullpath, bool isRedo); -vector string2Indexes(const QString &values); +std::vector string2Indexes(const QString &values); diff --git a/toonz/sources/toonz/matchlinecommand.cpp b/toonz/sources/toonz/matchlinecommand.cpp index 5343adf..31af27f 100644 --- a/toonz/sources/toonz/matchlinecommand.cpp +++ b/toonz/sources/toonz/matchlinecommand.cpp @@ -164,7 +164,7 @@ bool checkColumnValidity(int column) if (start > end) return false; - vector cell(end - start + 1); + std::vector cell(end - start + 1); xsh->getCells(start, column, cell.size(), &(cell[0])); @@ -381,9 +381,9 @@ void doCloneLevelNoSave(const TCellSelection::Range &range, const QString &newLe void cloneColumn(const TCellSelection::Range &cells, const TFilePath &newLevelPath) { - std::set> positions; + std::set> positions; for (int i = cells.m_r0; i <= cells.m_r1; i++) - positions.insert(pair(i, cells.m_c0)); + positions.insert(std::pair(i, cells.m_c0)); TKeyframeSelection ks(positions); ks.copyKeyframes(); diff --git a/toonz/sources/toonz/mergecmapped.cpp b/toonz/sources/toonz/mergecmapped.cpp index 9d1d3d5..2579280 100644 --- a/toonz/sources/toonz/mergecmapped.cpp +++ b/toonz/sources/toonz/mergecmapped.cpp @@ -53,7 +53,7 @@ public: : m_cell(&cell), m_imgAff(imgAff), m_mcell(&mcell), m_matchAff(matchAff){}; }; -void mergeCmapped(const vector &matchingLevels) +void mergeCmapped(const std::vector &matchingLevels) { if (matchingLevels.empty()) return; @@ -139,7 +139,7 @@ void mergeCmapped(const vector &matchingLevels) if (it == usedColors.end()) //this means that the merged palette does not differ from source palette.(all usedColors are not new color ) return; - wstring pageName = L"merged palettes"; + std::wstring pageName = L"merged palettes"; for (i = 0; i < palette->getPageCount(); i++) if (palette->getPage(i)->getName() == pageName) { @@ -165,11 +165,11 @@ void mergeCmapped(const vector &matchingLevels) /*------------------------------------------------------------------------*/ -void applyDeleteMatchline(TXshSimpleLevel *sl, const vector &fids, const vector &_inkIndexes) +void applyDeleteMatchline(TXshSimpleLevel *sl, const std::vector &fids, const std::vector &_inkIndexes) { TPalette::Page *page = 0; int i, j, pageIndex = 0; - vector inkIndexes = _inkIndexes; + std::vector inkIndexes = _inkIndexes; if (fids.empty()) return; @@ -226,11 +226,11 @@ class DeleteMatchlineUndo : public TUndo public: TXshLevel *m_xl; TXshSimpleLevel *m_sl; - vector m_fids; - vector m_indexes; + std::vector m_fids; + std::vector m_indexes; TPaletteP m_matchlinePalette; - DeleteMatchlineUndo(TXshLevel *xl, TXshSimpleLevel *sl, const vector &fids, const vector &indexes) //, TPalette*matchPalette) + DeleteMatchlineUndo(TXshLevel *xl, TXshSimpleLevel *sl, const std::vector &fids, const std::vector &indexes) //, TPalette*matchPalette) : TUndo(), m_xl(xl), m_sl(sl), @@ -351,7 +351,7 @@ class MergeCmappedUndo : public TUndo TXshSimpleLevel *m_level; TPalette *m_palette; int m_column, m_mColumn; - wstring m_fullpath; + std::wstring m_fullpath; public: MergeCmappedUndo(TXshLevel *xl, int mergeCmappedSessionId, @@ -369,7 +369,7 @@ public: std::map::const_iterator it = m_images.begin(); TPalette *palette = m_palette->clone(); m_level->setPalette(palette); - vector fids; + std::vector fids; for (; it != m_images.end(); ++it) //, ++mit) { QString id = "MergeCmappedUndo" + QString::number(m_mergeCmappedSessionId) + "-" + QString::number(it->first.getNumber()); @@ -457,8 +457,8 @@ void mergeCmapped(int column, int mColumn, const QString &fullpath, bool isRedo) if (start > end) return; - vector cell(std::max(end, mEnd) - std::min(start, mStart) + 1); - vector mCell(cell.size()); + std::vector cell(std::max(end, mEnd) - std::min(start, mStart) + 1); + std::vector mCell(cell.size()); xsh->getCells(std::min(start, mStart), column, cell.size(), &(cell[0])); @@ -468,7 +468,7 @@ void mergeCmapped(int column, int mColumn, const QString &fullpath, bool isRedo) TXshColumn *col = xsh->getColumn(column); TXshColumn *mcol = xsh->getColumn(mColumn); - vector matchingLevels; + std::vector matchingLevels; std::map computedMergedMap; @@ -618,7 +618,7 @@ const TXshCell *findCell(int column, const TFrameId &fid) return 0; } -bool contains(const vector &v, const TFrameId &val) +bool contains(const std::vector &v, const TFrameId &val) { int i; for (i = 0; i < (int)v.size(); i++) @@ -665,9 +665,9 @@ QString indexes2string(const std::set fids) //----------------------------------------------------------------------------- -vector string2Indexes(const QString &values) +std::vector string2Indexes(const QString &values) { - vector ret; + std::vector ret; int i, j; bool ok; QStringList vals = values.split(',', QString::SkipEmptyParts); @@ -675,20 +675,20 @@ vector string2Indexes(const QString &values) if (vals.at(i).contains('-')) { QStringList vals1 = vals.at(i).split('-', QString::SkipEmptyParts); if (vals1.size() != 2) - return vector(); + return std::vector(); int from = vals1.at(0).toInt(&ok); if (!ok) - return vector(); + return std::vector(); int to = vals1.at(1).toInt(&ok); if (!ok) - return vector(); + return std::vector(); for (j = tmin(from, to); j <= tmax(from, to); j++) ret.push_back(j); } else { int val = vals.at(i).toInt(&ok); if (!ok) - return vector(); + return std::vector(); ret.push_back(val); } } diff --git a/toonz/sources/toonz/mergecolumns.cpp b/toonz/sources/toonz/mergecolumns.cpp index bd2f697..2324132 100644 --- a/toonz/sources/toonz/mergecolumns.cpp +++ b/toonz/sources/toonz/mergecolumns.cpp @@ -53,7 +53,7 @@ public: //----------------------------------------------------------------------------------- -void mergeRasterColumns(const vector &matchingLevels) +void mergeRasterColumns(const std::vector &matchingLevels) { if (matchingLevels.empty()) return; @@ -149,7 +149,7 @@ bool needTobeGrouped(const TVectorImageP &vimg) //--------------------------------------------------------------------------------------- -void mergeVectorColumns(const vector &matchingLevels) +void mergeVectorColumns(const std::vector &matchingLevels) { if (matchingLevels.empty()) return; @@ -206,7 +206,7 @@ public: std::map::const_iterator it = m_images.begin(); - vector fids; + std::vector fids; m_level->setPalette(m_palette); for (; it != m_images.end(); ++it) //, ++mit) { @@ -292,8 +292,8 @@ void mergeColumns(int column, int mColumn, bool isRedo) if (start > end) return; - vector cell(end - start + 1); - vector mCell(end - start + 1); + std::vector cell(end - start + 1); + std::vector mCell(end - start + 1); xsh->getCells(start, column, cell.size(), &(cell[0])); @@ -302,7 +302,7 @@ void mergeColumns(int column, int mColumn, bool isRedo) TXshColumn *col = xsh->getColumn(column); TXshColumn *mcol = xsh->getColumn(mColumn); - vector matchingLevels; + std::vector matchingLevels; std::set alreadyDoneSet; @@ -403,7 +403,7 @@ void mergeColumns(int column, int mColumn, bool isRedo) mergeVectorColumns(matchingLevels); TXshLevel *sl = TApp::instance()->getCurrentScene()->getScene()->getLevelSet()->getLevel(column); - vector fidsss; + std::vector fidsss; sl->getFids(fidsss); invalidateIcons(sl, fidsss); sl->setDirtyFlag(true); @@ -424,7 +424,7 @@ const TXshCell *findCell(int column, const TFrameId &fid) return 0; } -bool contains(const vector &v, const TFrameId &val) +bool contains(const std::vector &v, const TFrameId &val) { int i; for (i = 0; i < (int)v.size(); i++) diff --git a/toonz/sources/toonz/moviegenerator.cpp b/toonz/sources/toonz/moviegenerator.cpp index d3ae184..8f22c2a 100644 --- a/toonz/sources/toonz/moviegenerator.cpp +++ b/toonz/sources/toonz/moviegenerator.cpp @@ -156,7 +156,7 @@ public: m_bgColor = TPixel32(255, 255, 255, 0); TPointD center(0.5 * cameraSize.lx, 0.5 * cameraSize.ly); m_viewAff = TTranslation(center); - string ext = fp.getType(); + std::string ext = fp.getType(); m_isFrames = ext != "avi" && ext != "mov" && ext != "3gp"; m_fileOptions = properties.getFileFormatProperties(ext); } diff --git a/toonz/sources/toonz/outputsettingspopup.cpp b/toonz/sources/toonz/outputsettingspopup.cpp index 730f1bd..8380845 100644 --- a/toonz/sources/toonz/outputsettingspopup.cpp +++ b/toonz/sources/toonz/outputsettingspopup.cpp @@ -707,7 +707,7 @@ void OutputSettingsPopup::updateField() continue; } - string name = tree->getStageObject(TStageObjectId::CameraId(tmpCameraId))->getName(); + std::string name = tree->getStageObject(TStageObjectId::CameraId(tmpCameraId))->getName(); cameras.append(QString::fromStdString(name)); if (name == tree->getStageObject(cameraId)->getName()) index = i; @@ -946,7 +946,7 @@ void OutputSettingsPopup::onFormatChanged(const QString &str) void OutputSettingsPopup::openSettingsPopup() { TOutputProperties *prop = getProperties(); - string ext = prop->getPath().getType(); + std::string ext = prop->getPath().getType(); openFormatSettingsPopup(this, ext, prop->getFileFormatProperties(ext)); if (m_presetCombo) @@ -973,7 +973,7 @@ void OutputSettingsPopup::onCameraChanged(const QString &str) tmpCameraId++; continue; } - string name = tree->getStageObject(TStageObjectId::CameraId(tmpCameraId))->getName(); + std::string name = tree->getStageObject(TStageObjectId::CameraId(tmpCameraId))->getName(); if (name == str.toStdString()) break; tmpCameraId++; @@ -1324,13 +1324,13 @@ void OutputSettingsPopup::onAddPresetButtonPressed() /*-- ファイルオプション --*/ os.openChild("formatsProperties"); - std::vector fileExtensions; + std::vector fileExtensions; prop->getFileFormatPropertiesExtensions(fileExtensions); for (int i = 0; i < (int)fileExtensions.size(); i++) { - string ext = fileExtensions[i]; + std::string ext = fileExtensions[i]; TPropertyGroup *pg = prop->getFileFormatProperties(ext); assert(pg); - std::map attr; + std::map attr; attr["ext"] = ext; os.openChild("formatProperties", attr); pg->saveData(os); @@ -1433,7 +1433,7 @@ void OutputSettingsPopup::onPresetSelected(const QString &str) return; } - string tagName = ""; + std::string tagName = ""; if (!is.matchTag(tagName) || tagName != "outputsettingspreset") { QMessageBox::warning(this, tr("Warning"), @@ -1481,7 +1481,7 @@ void OutputSettingsPopup::onPresetSelected(const QString &str) else if (tagName == "formatsProperties") { while (is.matchTag(tagName)) { if (tagName == "formatProperties") { - string ext = is.getTagAttribute("ext"); + std::string ext = is.getTagAttribute("ext"); TPropertyGroup *pg = prop->getFileFormatProperties(ext); if (ext == "avi") { diff --git a/toonz/sources/toonz/pane.cpp b/toonz/sources/toonz/pane.cpp index b53e9c8..a6fbb01 100644 --- a/toonz/sources/toonz/pane.cpp +++ b/toonz/sources/toonz/pane.cpp @@ -237,7 +237,7 @@ void TPanelTitleBarButtonForSafeArea::getSafeAreaNameList(QList &nameLi TFilePath fp = ToonzFolder::getFirstProjectsFolder(); QString currentSafeAreaName = QString::fromStdString(EnvSafeAreaName); - string safeAreaFileName = "safeArea.ini"; + std::string safeAreaFileName = "safeArea.ini"; while (!TFileStatus(fp + safeAreaFileName).doesExist() && !fp.isRoot() && fp.getParentDir() != TFilePath()) fp = fp.getParentDir(); diff --git a/toonz/sources/toonz/previewer.cpp b/toonz/sources/toonz/previewer.cpp index f72ccbc..826239b 100644 --- a/toonz/sources/toonz/previewer.cpp +++ b/toonz/sources/toonz/previewer.cpp @@ -125,7 +125,7 @@ public: //All useful infos about a frame under Previewer's management struct FrameInfo { public: - string m_alias; //The alias of m_fx + std::string m_alias; //The alias of m_fx unsigned long m_renderId; //The render process Id - passed by TRenderer QRegion m_renderedRegion; //The plane region already rendered for m_fx TRect m_rectUnderRender; //Plane region currently under render @@ -175,7 +175,7 @@ public: void updateRenderSettings(); void updateAliases(); - void updateAliasKeyword(const string &keyword); + void updateAliasKeyword(const std::string &keyword); //There are dependencies among the following updaters. Invoke them in the specified order. void updateFrameRange(); @@ -435,7 +435,7 @@ void Previewer::Imp::updateAliases() for (it = m_frames.begin(); it != m_frames.end(); ++it) { TFxPair fxPair = buildSceneFx(it->first); - string newAlias = fxPair.m_frameA ? fxPair.m_frameA->getAlias(it->first, m_renderSettings) : ""; + std::string newAlias = fxPair.m_frameA ? fxPair.m_frameA->getAlias(it->first, m_renderSettings) : ""; newAlias = newAlias + (fxPair.m_frameB ? fxPair.m_frameB->getAlias(it->first, m_renderSettings) : ""); if (newAlias != it->second.m_alias) { @@ -447,11 +447,11 @@ void Previewer::Imp::updateAliases() //----------------------------------------------------------------------------- -void Previewer::Imp::updateAliasKeyword(const string &keyword) +void Previewer::Imp::updateAliasKeyword(const std::string &keyword) { std::map::iterator it; for (it = m_frames.begin(); it != m_frames.end(); ++it) { - if (it->second.m_alias.find(keyword) != string::npos) { + if (it->second.m_alias.find(keyword) != std::string::npos) { TFxPair fxPair = buildSceneFx(it->first); it->second.m_alias = fxPair.m_frameA ? fxPair.m_frameA->getAlias(it->first, m_renderSettings) : ""; it->second.m_alias = it->second.m_alias + (fxPair.m_frameB ? fxPair.m_frameB->getAlias(it->first, m_renderSettings) : ""); @@ -666,7 +666,7 @@ void Previewer::Imp::doOnRenderRasterCompleted(const RenderData &renderData) //Store the rendered image in the cache - this is done in the MAIN thread due //to the necessity of accessing it->second.m_rectUnderRender for raster extraction. - string str = m_cachePrefix + toString(frame); + std::string str = m_cachePrefix + toString(frame); TRasterImageP ri(TImageCache::instance()->get(str, true)); TRasterP cachedRas(ri ? ri->getRaster() : TRasterP()); @@ -831,7 +831,7 @@ bool Previewer::Imp::doSaveRenderedFrames(TFilePath fp) TLevelWriter::getSupportedFormats(formats, true); Tiio::Writer::getSupportedFormats(formats, true); - string ext = fp.getType(); + std::string ext = fp.getType(); if (ext == "") { ext = outputSettings->getPath().getType(); fp = fp.withType(ext); @@ -1110,7 +1110,7 @@ TRasterP Previewer::getRaster(int frame, bool renderIfNeeded) const if (it != m_imp->m_frames.end()) { if (frame < m_imp->m_pbStatus.size()) { if (m_imp->m_pbStatus[frame] == FlipSlider::PBFrameFinished || !renderIfNeeded) { - string str = m_imp->m_cachePrefix + toString(frame); + std::string str = m_imp->m_cachePrefix + toString(frame); TRasterImageP rimg = (TRasterImageP)TImageCache::instance()->get(str, false); if (rimg) { TRasterP ras = rimg->getRaster(); @@ -1127,7 +1127,7 @@ TRasterP Previewer::getRaster(int frame, bool renderIfNeeded) const } //Retrieve the cached image, if any - string str = m_imp->m_cachePrefix + toString(frame); + std::string str = m_imp->m_cachePrefix + toString(frame); TRasterImageP rimg = (TRasterImageP)TImageCache::instance()->get(str, false); if (rimg) { TRasterP ras = rimg->getRaster(); @@ -1174,7 +1174,7 @@ bool Previewer::isBusy() const void Previewer::onImageChange(TXshLevel *xl, const TFrameId &fid) { TFilePath fp = xl->getPath().withFrame(fid); - string levelKeyword = toString(fp.getWideString()); + std::string levelKeyword = toString(fp.getWideString()); //Inform the cache managers of level invalidation if (!m_imp->m_subcamera) @@ -1252,7 +1252,7 @@ void Previewer::updateView() void Previewer::onLevelChange(TXshLevel *xl) { TFilePath fp = xl->getPath(); - string levelKeyword = toString(fp.getWideString()); + std::string levelKeyword = toString(fp.getWideString()); //Inform the cache managers of level invalidation if (!m_imp->m_subcamera) @@ -1272,7 +1272,7 @@ void Previewer::onLevelChanged() if (!xl) return; - string levelKeyword; + std::string levelKeyword; TFilePath fp = xl->getPath(); levelKeyword = toString(fp.withType("").getWideString()); diff --git a/toonz/sources/toonz/previewfxmanager.cpp b/toonz/sources/toonz/previewfxmanager.cpp index 9bc81b1..af143ba 100644 --- a/toonz/sources/toonz/previewfxmanager.cpp +++ b/toonz/sources/toonz/previewfxmanager.cpp @@ -229,7 +229,7 @@ public: void updatePreviewRect(); void updateAliases(); - void updateAliasKeyword(const string &keyword); + void updateAliasKeyword(const std::string &keyword); void updateProgressBarStatus(); @@ -444,7 +444,7 @@ void PreviewFxInstance::addFlipbook(FlipBook *&flipbook) /*-- タイトルの設定。Previewコマンドから呼ばれた場合はisFullPreviewがON --*/ //Build the fx string description - Should really be moved in a better function... - wstring fxId; + std::wstring fxId; TLevelColumnFx *columnFx = dynamic_cast(m_fx.getPointer()); TZeraryColumnFx *sfx = dynamic_cast(m_fx.getPointer()); if (columnFx) @@ -560,7 +560,7 @@ void PreviewFxInstance::updateFrameRange() if (m_frameInfos.find(i) == m_frameInfos.end()) { //Clear the overall rendered region and build the frame info m_overallRenderedRegion = QRegion(); - m_frameInfos.insert(make_pair(i, string())); + m_frameInfos.insert(std::make_pair(i, std::string())); } //Resize the progress bar @@ -620,7 +620,7 @@ void PreviewFxInstance::updateAliases() if (m_start > m_end) return; - string newAlias; + std::string newAlias; //Build and compare the new aliases with the stored ones std::map::iterator it; @@ -639,7 +639,7 @@ void PreviewFxInstance::updateAliases() //---------------------------------------------------------------------------------------- -void PreviewFxInstance::updateAliasKeyword(const string &keyword) +void PreviewFxInstance::updateAliasKeyword(const std::string &keyword) { if (m_start > m_end) return; @@ -647,7 +647,7 @@ void PreviewFxInstance::updateAliasKeyword(const string &keyword) //Remove the rendered image whose alias contains keyword std::map::iterator it; for (it = m_frameInfos.begin(); it != m_frameInfos.end(); ++it) { - if (it->second.m_alias.find(keyword) != string::npos) { + if (it->second.m_alias.find(keyword) != std::string::npos) { //Clear the overall and frame-specific rendered regions m_overallRenderedRegion = QRegion(); it->second.m_renderedRegion = QRegion(); @@ -1400,7 +1400,7 @@ void PreviewFxManager::onLevelChanged() //Build the level name as an alias keyword. All cache images associated //with an alias containing the level name will be updated. TXshLevel *xl = TApp::instance()->getCurrentLevel()->getLevel(); - string aliasKeyword; + std::string aliasKeyword; TFilePath fp = xl->getPath(); aliasKeyword = toString(fp.withType("").getWideString()); diff --git a/toonz/sources/toonz/projectpopup.cpp b/toonz/sources/toonz/projectpopup.cpp index 10233fe..481cc6d 100644 --- a/toonz/sources/toonz/projectpopup.cpp +++ b/toonz/sources/toonz/projectpopup.cpp @@ -51,7 +51,7 @@ QPixmap ProjectDvDirModelProjectNode::getPixmap(bool isOpen) const // ProjectDvDirModelFileFolderNode [Root] //----------------------------------------------------------------------------- -DvDirModelNode *ProjectDvDirModelFileFolderNode::makeChild(wstring name) +DvDirModelNode *ProjectDvDirModelFileFolderNode::makeChild(std::wstring name) { return createNode(this, m_path + name); } @@ -96,7 +96,7 @@ void ProjectDvDirModelRootNode::refreshChildren() int i; for (i = 0; i < (int)projectRoots.size(); i++) { TFilePath projectRoot = projectRoots[i]; - wstring rootDir = projectRoot.getWideString(); + std::wstring rootDir = projectRoot.getWideString(); ProjectDvDirModelSpecialFileFolderNode *projectRootNode = new ProjectDvDirModelSpecialFileFolderNode(this, L"Project root (" + rootDir + L")", projectRoot); projectRootNode->setPixmap(QPixmap(":Resources/projects.png")); @@ -175,7 +175,7 @@ QModelIndex ProjectDirModel::parent(const QModelIndex &index) const //----------------------------------------------------------------------------- -QModelIndex ProjectDirModel::childByName(const QModelIndex &parent, const wstring &name) const +QModelIndex ProjectDirModel::childByName(const QModelIndex &parent, const std::wstring &name) const { if (!parent.isValid()) return QModelIndex(); @@ -338,7 +338,7 @@ ProjectPopup::ProjectPopup(bool isModal) upperLayout->setColumnStretch(0, 0); upperLayout->setColumnStretch(1, 1); - std::vector folderNames; + std::vector folderNames; pm->getFolderNames(folderNames); int i; for (i = 0; i < (int)folderNames.size(); i++) { @@ -351,7 +351,7 @@ ProjectPopup::ProjectPopup(bool isModal) } struct { QString name; - string folderName; + std::string folderName; } cbs[] = { {tr("Append $scenepath to +drawings"), TProject::Drawings}, {tr("Append $scenepath to +inputs"), TProject::Inputs}, diff --git a/toonz/sources/toonz/projectpopup.h b/toonz/sources/toonz/projectpopup.h index 6e67f29..3db21ec 100644 --- a/toonz/sources/toonz/projectpopup.h +++ b/toonz/sources/toonz/projectpopup.h @@ -35,11 +35,11 @@ public: class ProjectDvDirModelFileFolderNode : public DvDirModelFileFolderNode { public: - ProjectDvDirModelFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path) + ProjectDvDirModelFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : DvDirModelFileFolderNode(parent, name, path) {} ProjectDvDirModelFileFolderNode(DvDirModelNode *parent, const TFilePath &path) : DvDirModelFileFolderNode(parent, path) {} - DvDirModelNode *makeChild(wstring name); + DvDirModelNode *makeChild(std::wstring name); DvDirModelFileFolderNode *createNode(DvDirModelNode *parent, const TFilePath &path); }; @@ -51,7 +51,7 @@ class ProjectDvDirModelSpecialFileFolderNode : public ProjectDvDirModelFileFolde QPixmap m_pixmap; public: - ProjectDvDirModelSpecialFileFolderNode(DvDirModelNode *parent, wstring name, const TFilePath &path) + ProjectDvDirModelSpecialFileFolderNode(DvDirModelNode *parent, std::wstring name, const TFilePath &path) : ProjectDvDirModelFileFolderNode(parent, name, path) {} QPixmap getPixmap(bool isOpen) const { return m_pixmap; } void setPixmap(const QPixmap &pixmap) { m_pixmap = pixmap; } @@ -83,7 +83,7 @@ public: DvDirModelNode *getNode(const QModelIndex &index) const; QModelIndex index(int row, int column, const QModelIndex &parent) const; QModelIndex parent(const QModelIndex &index) const; - QModelIndex childByName(const QModelIndex &parent, const wstring &name) const; + QModelIndex childByName(const QModelIndex &parent, const std::wstring &name) const; int columnCount(const QModelIndex &parent) const { return 1; } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &index) const; diff --git a/toonz/sources/toonz/psdsettingspopup.cpp b/toonz/sources/toonz/psdsettingspopup.cpp index bd78dbd..99b72ee 100644 --- a/toonz/sources/toonz/psdsettingspopup.cpp +++ b/toonz/sources/toonz/psdsettingspopup.cpp @@ -288,25 +288,25 @@ int PsdSettingsPopup::getFolderOption() void PsdSettingsPopup::doPsdParser() { TFilePath psdpath = TApp::instance()->getCurrentScene()->getScene()->decodeFilePath(m_path); - string mode = ""; + std::string mode = ""; switch (m_mode) { case FLAT: { break; } case FRAMES: { mode = "#frames"; - string name = psdpath.getName() + "#" + toString(1) + mode + psdpath.getDottedType(); + std::string name = psdpath.getName() + "#" + toString(1) + mode + psdpath.getDottedType(); psdpath = psdpath.getParentDir() + TFilePath(name); break; } case COLUMNS: { - string name = psdpath.getName() + "#" + toString(1) + psdpath.getDottedType(); + std::string name = psdpath.getName() + "#" + toString(1) + psdpath.getDottedType(); psdpath = psdpath.getParentDir() + TFilePath(name); break; } case FOLDER: { mode = "#group"; - string name = psdpath.getName() + "#" + toString(1) + mode + psdpath.getDottedType(); + std::string name = psdpath.getName() + "#" + toString(1) + mode + psdpath.getDottedType(); psdpath = psdpath.getParentDir() + TFilePath(name); break; } @@ -320,7 +320,7 @@ void PsdSettingsPopup::doPsdParser() m_psdLevelPaths.clear(); for (int i = 0; i < m_psdparser->getLevelsCount(); i++) { int layerId = m_psdparser->getLevelId(i); - string name = m_path.getName(); + std::string name = m_path.getName(); if (layerId > 0 && m_mode != FRAMES) { name += "#" + toString(layerId); } @@ -344,7 +344,7 @@ TFilePath PsdSettingsPopup::getPsdFramePath(int levelIndex, int frameIndex) { int layerId = m_psdparser->getLevelId(levelIndex); int frameId = m_psdparser->getFrameId(layerId, frameIndex); - string name = m_path.getName(); + std::string name = m_path.getName(); if (frameId > 0) name += "#" + toString(frameId); name += m_path.getDottedType(); diff --git a/toonz/sources/toonz/rendercommand.cpp b/toonz/sources/toonz/rendercommand.cpp index 91cd2b7..627fecd 100644 --- a/toonz/sources/toonz/rendercommand.cpp +++ b/toonz/sources/toonz/rendercommand.cpp @@ -528,12 +528,12 @@ void RenderCommand::rasterRender(bool isPreview) return; } - string ext = m_fp.getType(); + std::string ext = m_fp.getType(); #ifdef _WIN32 if (ext == "avi" && !isPreview) { TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext); - string codecName = props->getProperty(0)->getValueAsString(); + std::string codecName = props->getProperty(0)->getValueAsString(); TDimension res = scene->getCurrentCamera()->getRes(); if (!AviCodecRestrictions::canWriteMovie(toWideString(codecName), res)) { QString msg(QObject::tr("The resolution of the output camera does not fit with the options chosen for the output file format.")); @@ -541,7 +541,7 @@ void RenderCommand::rasterRender(bool isPreview) return; } } -#endif; +#endif //Extract output properties TOutputProperties *prop = isPreview ? scene->getProperties()->getPreviewProperties() : scene->getProperties()->getOutputProperties(); @@ -738,12 +738,12 @@ public: void RenderCommand::multimediaRender() { ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); - string ext = m_fp.getType(); + std::string ext = m_fp.getType(); #ifdef _WIN32 if (ext == "avi") { TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext); - string codecName = props->getProperty(0)->getValueAsString(); + std::string codecName = props->getProperty(0)->getValueAsString(); TDimension res = scene->getCurrentCamera()->getRes(); if (!AviCodecRestrictions::canWriteMovie(toWideString(codecName), res)) { QString msg(QObject::tr("The resolution of the output camera does not fit with the options chosen for the output file format.")); @@ -751,7 +751,7 @@ void RenderCommand::multimediaRender() return; } } -#endif; +#endif TOutputProperties *prop = scene->getProperties()->getOutputProperties(); @@ -844,7 +844,7 @@ void RenderCommand::doRender(bool isPreview) } } if (!isWritable) { - string str = "It is not possible to write the output: the file"; + std::string str = "It is not possible to write the output: the file"; str += isMultiFrame ? "s are read only." : " is read only."; DVGui::warning(QString::fromStdString(str)); return; diff --git a/toonz/sources/toonz/savepresetpopup.cpp b/toonz/sources/toonz/savepresetpopup.cpp index 45c18ca..50554ac 100644 --- a/toonz/sources/toonz/savepresetpopup.cpp +++ b/toonz/sources/toonz/savepresetpopup.cpp @@ -67,7 +67,7 @@ bool SavePresetPopup::apply() TMacroFx *macroFx = dynamic_cast(fx); bool isMacro = macroFx != 0; - wstring name = m_nameFld->text().toStdWString(); + std::wstring name = m_nameFld->text().toStdWString(); if (name.empty()) return 0; TFilePath fp = ToonzFolder::getFxPresetFolder() + "presets" + fx->getFxType() + (name + (isMacro ? L".macrofx" : L".fx")); diff --git a/toonz/sources/toonz/scanlist.cpp b/toonz/sources/toonz/scanlist.cpp index 31e153d..d5fa5c5 100644 --- a/toonz/sources/toonz/scanlist.cpp +++ b/toonz/sources/toonz/scanlist.cpp @@ -66,7 +66,7 @@ ScanListFrame &ScanListFrame::operator=(const ScanListFrame &src) //--------------------------------------------------------- -wstring ScanListFrame::getName() const +std::wstring ScanListFrame::getName() const { if (!m_xl) return L""; @@ -76,7 +76,7 @@ wstring ScanListFrame::getName() const //--------------------------------------------------------- -wstring ScanListFrame::getLevelName() const +std::wstring ScanListFrame::getLevelName() const { return m_xl ? m_xl->getName() : L""; } @@ -117,9 +117,9 @@ void ScanListFrame::setRasterImage(const TRasterImageP &ras, bool isBW) const TPropertyGroup *pg = Tiio::makeWriterProperties(path.getType()); TEnumProperty *prop = (TEnumProperty *)(pg->getProperty("Bits Per Pixel")); if (prop) { - wstring pixelSizeW = prop->getValue().substr(0, 2); + std::wstring pixelSizeW = prop->getValue().substr(0, 2); int ps = ras->getRaster()->getPixelSize(); - const vector &range = prop->getRange(); + const std::vector &range = prop->getRange(); if (isBW) prop->setValue(range[2]); else { @@ -144,7 +144,7 @@ void ScanListFrame::setRasterImage(const TRasterImageP &ras, bool isBW) const if (m_xl->getScannedPath() != TFilePath()) m_xl->setFrameStatus(m_fid, TXshSimpleLevel::Scanned); - string imageId = m_xl->getImageId(m_fid); + std::string imageId = m_xl->getImageId(m_fid); TImageCache::instance()->remove(imageId); m_xl->setFrame(m_fid, ras.getPointer()); diff --git a/toonz/sources/toonz/scanlist.h b/toonz/sources/toonz/scanlist.h index c21e7e7..6de4b86 100644 --- a/toonz/sources/toonz/scanlist.h +++ b/toonz/sources/toonz/scanlist.h @@ -22,8 +22,8 @@ public: ScanListFrame(const ScanListFrame &); ScanListFrame &operator=(const ScanListFrame &); - wstring getName() const; - wstring getLevelName() const; + std::wstring getName() const; + std::wstring getLevelName() const; TFrameId getFrameId() const; TXshSimpleLevel *getLevel() const { return m_xl; } diff --git a/toonz/sources/toonz/scanpopup.cpp b/toonz/sources/toonz/scanpopup.cpp index 6c7dec0..fcae13d 100644 --- a/toonz/sources/toonz/scanpopup.cpp +++ b/toonz/sources/toonz/scanpopup.cpp @@ -259,7 +259,7 @@ ScanSettingsPopup::ScanSettingsPopup() m_paperFormatOm = new QComboBox(); m_paperFormatOm->setFixedSize(150, WidgetHeight); - std::vector formats; + std::vector formats; TPaperFormatManager::instance()->getFormats(formats); int i; for (i = 0; i < (int)formats.size(); i++) @@ -527,7 +527,7 @@ AutocenterPopup::AutocenterPopup() m_fieldGuide = new QComboBox(this); m_fieldGuide->setFixedHeight(WidgetHeight); m_fieldGuide->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Maximum); - std::vector fdgNames; + std::vector fdgNames; CleanupParameters::getFdgNames(fdgNames); int i; for (i = 0; i < (int)fdgNames.size(); i++) @@ -654,7 +654,7 @@ void MyScannerListener::onImage(const TRasterImageP &rasImg) return; } if (m_isPreview) { - TImageCache::instance()->add((string) "setScanCropboxId", rasImg.getPointer()); + TImageCache::instance()->add((std::string) "setScanCropboxId", rasImg.getPointer()); } else { #ifdef LINETEST //Autocenter @@ -926,7 +926,7 @@ public: class SetScanCropboxTool : public TTool { - const string m_imgId; + const std::string m_imgId; TScannerParameters *m_parameters; int m_scaling; TPointD m_lastPos; diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp index efa7560..169fa65 100644 --- a/toonz/sources/toonz/sceneviewer.cpp +++ b/toonz/sources/toonz/sceneviewer.cpp @@ -429,14 +429,14 @@ public: CommandManager *cm = CommandManager::instance(); QAction *action = cm->getAction(m_cmdId); bool checked = action->isChecked(); - if (string(m_cmdId) == MI_ShiftTrace) { + if (std::string(m_cmdId) == MI_ShiftTrace) { cm->enable(MI_EditShift, checked); cm->enable(MI_NoShift, checked); if (!checked) { cm->setChecked(MI_EditShift, false); } // cm->getAction(MI_NoShift)->setChecked(false); - } else if (string(m_cmdId) == MI_EditShift) { + } else if (std::string(m_cmdId) == MI_EditShift) { if (checked) { QAction *noShiftAction = CommandManager::instance()->getAction(MI_NoShift); if (noShiftAction) @@ -446,7 +446,7 @@ public: TApp::instance()->getCurrentTool()->unsetPseudoTool(); } CommandManager::instance()->enable(MI_NoShift, !checked); - } else if (string(m_cmdId) == MI_NoShift) { + } else if (std::string(m_cmdId) == MI_NoShift) { } updateShiftTraceStatus(); } @@ -2297,14 +2297,14 @@ int SceneViewer::pick(const TPoint &point) int SceneViewer::posToColumnIndex(const TPoint &p, double distance, bool includeInvisible) const { - vector ret; + std::vector ret; posToColumnIndexes(p, ret, distance, includeInvisible); return ret.empty() ? -1 : ret.back(); } //----------------------------------------------------------------------------- -void SceneViewer::posToColumnIndexes(const TPoint &p, vector &indexes, double distance, bool includeInvisible) const +void SceneViewer::posToColumnIndexes(const TPoint &p, std::vector &indexes, double distance, bool includeInvisible) const { int oldRasterizePli = TXshSimpleLevel::m_rasterizePli; TApp *app = TApp::instance(); diff --git a/toonz/sources/toonz/sceneviewer.h b/toonz/sources/toonz/sceneviewer.h index d11c55e..a08e765 100644 --- a/toonz/sources/toonz/sceneviewer.h +++ b/toonz/sources/toonz/sceneviewer.h @@ -314,7 +314,7 @@ protected: //! return the column indexes of the drawings intersecting point \b p //! (window coordinate, pixels, bottom-left origin) int posToColumnIndex(const TPoint &p, double distance, bool includeInvisible = true) const; - void posToColumnIndexes(const TPoint &p, vector &indexes, double distance, bool includeInvisible = true) const; + void posToColumnIndexes(const TPoint &p, std::vector &indexes, double distance, bool includeInvisible = true) const; //! return the row of the drawings intersecting point \b p (used with onion skins) //! (window coordinate, pixels, bottom-left origin) diff --git a/toonz/sources/toonz/sceneviewercontextmenu.cpp b/toonz/sources/toonz/sceneviewercontextmenu.cpp index e1a48f5..59fc78a 100644 --- a/toonz/sources/toonz/sceneviewercontextmenu.cpp +++ b/toonz/sources/toonz/sceneviewercontextmenu.cpp @@ -74,7 +74,7 @@ void onShowHideSelectObject(QAction *action) } } -int addShowHideStageObjectCmds(const vector &columnIndexes, QMenu *menu, bool isShow) +int addShowHideStageObjectCmds(const std::vector &columnIndexes, QMenu *menu, bool isShow) { int ii, columnIndex = -1; bool flag = true; diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp index 8d7d42b..3f25540 100644 --- a/toonz/sources/toonz/sceneviewerevents.cpp +++ b/toonz/sources/toonz/sceneviewerevents.cpp @@ -845,7 +845,7 @@ void SceneViewer::keyPressEvent(QKeyEvent *event) QString text = event->text(); if ((event->modifiers() & Qt::ShiftModifier)) text.toUpper(); - wstring unicodeChar = text.toStdWString(); + std::wstring unicodeChar = text.toStdWString(); ret = tool->keyDown(key, unicodeChar, flags, pos); // per il textTool if (ret) { update(); @@ -971,7 +971,7 @@ void SceneViewer::contextMenuEvent(QContextMenuEvent *e) return; TPoint winPos(e->pos().x(), height() - e->pos().y()); - vector columnIndices; + std::vector columnIndices; // enable to select all the columns regardless of the click position for (int i = 0; i < TApp::instance()->getCurrentXsheet()->getXsheet()->getColumnCount(); i++) columnIndices.push_back(i); diff --git a/toonz/sources/toonz/subscenecommand.cpp b/toonz/sources/toonz/subscenecommand.cpp index 4f64f99..ec23e8d 100644 --- a/toonz/sources/toonz/subscenecommand.cpp +++ b/toonz/sources/toonz/subscenecommand.cpp @@ -60,10 +60,10 @@ namespace struct GroupData { public: QStack m_groupIds; - QStack m_groupNames; + QStack m_groupNames; int m_editingGroup; - GroupData(const QStack &groupIds, const QStack &groupNames, int editingGroup) + GroupData(const QStack &groupIds, const QStack &groupNames, int editingGroup) : m_groupIds(groupIds), m_groupNames(groupNames), m_editingGroup(editingGroup) { } @@ -105,16 +105,16 @@ void setFxParamToCurrentScene(TFx *fx, TXsheet *xsh) //----------------------------------------------------------------------------- -vector getRoots(const QList &objIds, TXsheetHandle *xshHandle) +std::vector getRoots(const QList &objIds, TXsheetHandle *xshHandle) { - vector roots; - map parentHandles; + std::vector roots; + std::map parentHandles; TStageObjectTree *pegTree = xshHandle->getXsheet()->getStageObjectTree(); for (int i = 0; i < objIds.size(); i++) { TStageObject *obj = pegTree->getStageObject(objIds.at(i), false); TStageObjectId parentId = obj->getParent(); bool parentIsColumn = parentId.isColumn() && !objIds.contains(parentId); - string parentHandle = obj->getParentHandle(); + std::string parentHandle = obj->getParentHandle(); if (!parentIsColumn && !objIds.contains(parentId) && (parentHandles.count(parentId) == 0 || parentHandles[parentId] != parentHandle)) { parentHandles[parentId] = parentHandle; @@ -126,18 +126,18 @@ vector getRoots(const QList &objIds, TXsheetHand //----------------------------------------------------------------------------- -vector isConnected(const std::set &indices, +std::vector isConnected(const std::set &indices, const std::set &pegbarIds, TXsheetHandle *xshHandle) { - vector roots; - map parentHandles; + std::vector roots; + std::map parentHandles; TStageObjectTree *pegTree = xshHandle->getXsheet()->getStageObjectTree(); std::set::const_iterator it; for (it = indices.begin(); it != indices.end(); it++) { TStageObjectId id = TStageObjectId::ColumnId(*it); TStageObject *obj = pegTree->getStageObject(id, false); TStageObjectId parentId = obj->getParent(); - string parentHandle = obj->getParentHandle(); + std::string parentHandle = obj->getParentHandle(); bool parentIsColumn = parentId.isColumn() && indices.find(parentId.getIndex()) != indices.end(); if (!parentIsColumn && pegbarIds.find(parentId) == pegbarIds.end() && (parentHandles.count(parentId) == 0 || parentHandles[parentId] != parentHandle)) { @@ -150,7 +150,7 @@ vector isConnected(const std::set &indices, TStageObject *obj = pegTree->getStageObject(*it2, false); TStageObjectId parentId = obj->getParent(); bool parentIsColumn = parentId.isColumn() && indices.find(parentId.getIndex()) != indices.end(); - string parentHandle = obj->getParentHandle(); + std::string parentHandle = obj->getParentHandle(); if (!parentIsColumn && pegbarIds.find(parentId) == pegbarIds.end() && (parentHandles.count(parentId) == 0 || parentHandles[parentId] != parentHandle)) { parentHandles[parentId] = parentHandle; @@ -162,12 +162,12 @@ vector isConnected(const std::set &indices, //----------------------------------------------------------------------------- -map> isConnected(const std::set &indices, +std::map> isConnected(const std::set &indices, const std::set &internalFxs, TXsheetHandle *xshHandle) { TXsheet *xsh = xshHandle->getXsheet(); std::set::const_iterator it; - map> roots; + std::map> roots; for (it = indices.begin(); it != indices.end(); it++) { TFx *fx = xsh->getColumn(*it)->getFx(); int i, outputCount = fx->getOutputConnectionCount(); @@ -320,8 +320,8 @@ void getChildren(const std::set &indices, QMapgetStageObjectTree()->getStageObject(id, false); assert(obj); if (obj && !obj->getChildren().empty()) { - list childrenObj = obj->getChildren(); - list::iterator it2; + std::list childrenObj = obj->getChildren(); + std::list::iterator it2; for (it2 = childrenObj.begin(); it2 != childrenObj.end(); it2++) { TStageObjectId childId = (*it2)->getId(); children[id].append(childId); @@ -478,7 +478,7 @@ void bringFxOut(TFx *fx, QMap> &fxs, FxDag *outerDag, //----------------------------------------------------------------------------- TFx *explodeFxSubTree(TFx *innerFx, QMap> &fxs, FxDag *outerDag, TXsheet *outerXsheet, - FxDag *innerDag, const GroupData &fxGroupData, const vector &outPorts) + FxDag *innerDag, const GroupData &fxGroupData, const std::vector &outPorts) { TXsheetFx *xsheetFx = dynamic_cast(innerFx); if (!xsheetFx) { @@ -540,8 +540,8 @@ void bringObjectOut(TStageObject *obj, TXsheet *xsh, { if (!obj->hasChildren()) return; - list children = obj->getChildren(); - list::iterator it; + std::list children = obj->getChildren(); + std::list::iterator it; for (it = children.begin(); it != children.end(); it++) { TStageObjectId id = (*it)->getId(); if (id.isColumn()) @@ -774,7 +774,7 @@ set explodeStageObjects(TXsheet *xsh, TXsheet *subXsh, int index, const TSt void explodeFxs(TXsheet *xsh, TXsheet *subXsh, const GroupData &fxGroupData, QMap> &fxs, const TPointD &subPos, - const vector &outPorts, bool linkToXsheet) + const std::vector &outPorts, bool linkToXsheet) { FxDag *innerDag = subXsh->getFxDag(); FxDag *outerDag = xsh->getFxDag(); @@ -871,7 +871,7 @@ set explode(TXsheet *xsh, TXsheet *subXsh, int index, const TStageObjectId const GroupData &objGroupData, const TPointD &stageSubPos, const GroupData &fxGroupData, const TPointD &fxSubPos, QList &pegObjects, QMap &splines, - const vector &outPorts, bool onlyColumn, + const std::vector &outPorts, bool onlyColumn, bool linkToXsheet) { //innerFx->outerFxs @@ -932,10 +932,10 @@ public: class CloseChildUndo : public TUndo { - vector> m_cells; + std::vector> m_cells; public: - CloseChildUndo(const vector> &cells) + CloseChildUndo(const std::vector> &cells) : m_cells(cells) { } @@ -1071,7 +1071,7 @@ void closeSubXsheet(int dlevel) return; if (dlevel > ancestorCount) dlevel = ancestorCount; - vector> cells; + std::vector> cells; for (int i = 0; i < dlevel; i++) { std::pair rowCol; scene->getChildStack()->closeChild(rowCol.first, rowCol.second); @@ -1186,7 +1186,7 @@ TXsheet *collapseColumns(std::set indices) TXsheet *childXsh = childLevel->getXsheet(); std::set newIndices; - list restoredSplineIds; + std::list restoredSplineIds; /*- 先ほどのColumnDataをSubXsheetの中に格納 -*/ data->restoreObjects(newIndices, restoredSplineIds, childXsh, 0); childXsh->updateFrameCount(); @@ -1268,7 +1268,7 @@ void collapseColumns(std::set indices, int index = *indices.begin(); - vector roots = getRoots(objIds, app->getCurrentXsheet()); + std::vector roots = getRoots(objIds, app->getCurrentXsheet()); TStageObject *rootObj = 0; if (roots.size() == 1) { rootObj = xsh->getStageObjectTree()->getStageObject(roots[0], false); @@ -1297,7 +1297,7 @@ void collapseColumns(std::set indices, TXsheet *childXsh = childLevel->getXsheet(); std::set newIndices; - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(newIndices, restoredSplineIds, childXsh, 0); childXsh->updateFrameCount(); @@ -1334,7 +1334,7 @@ void collapseColumns(std::set indices, data->storeColumns(indices, xsh, StageObjectsData::eDoClone); data->storeFxs(fxs, xsh, StageObjectsData::eDoClone); - map> roots = isConnected(indices, fxs, app->getCurrentXsheet()); + std::map> roots = isConnected(indices, fxs, app->getCurrentXsheet()); app->getCurrentXsheet()->blockSignals(true); app->getCurrentObject()->blockSignals(true); ColumnCmd::deleteColumns(indices, true, true); @@ -1357,7 +1357,7 @@ void collapseColumns(std::set indices, TXsheet *childXsh = childLevel->getXsheet(); std::set newIndices; - list restoredSplineIds; + std::list restoredSplineIds; data->restoreObjects(newIndices, restoredSplineIds, childXsh, 0); childXsh->updateFrameCount(); @@ -1378,7 +1378,7 @@ void collapseColumns(std::set indices, xsh->getStageObject(TStageObjectId::ColumnId(index))->setParent(TStageObjectId::TableId); if (roots.size() == 1) { TFx *fx = xsh->getColumn(index)->getFx(); - vector rootPorts = roots.begin()->second; + std::vector rootPorts = roots.begin()->second; int i; for (i = 0; i < rootPorts.size(); i++) rootPorts[i]->setFx(fx); @@ -1468,7 +1468,7 @@ protected: TXsheet *xsh = app->getCurrentXsheet()->getXsheet(); xsh->removeColumn(m_columnIndex); std::set indices = m_indices; - list restoredSplineIds; + std::list restoredSplineIds; m_data->restoreObjects(indices, restoredSplineIds, xsh, 0); setColumnOutputConnections(m_columnOutputConnections); setChildren(m_children); @@ -1499,7 +1499,7 @@ protected: setColumnOutputConnections(columnOutputConnections); std::set indices; indices.insert(m_columnIndex); - list restoredSplineIds; + std::list restoredSplineIds; m_newData->restoreObjects(indices, restoredSplineIds, xsh, 0); TColumnSelection *selection = dynamic_cast(app->getCurrentSelection()->getSelection()); if (selection) { @@ -1631,14 +1631,14 @@ public: { TApp *app = TApp::instance(); TXsheet *xsh = app->getCurrentXsheet()->getXsheet(); - map> roots = isConnected(m_indices, m_fxs, app->getCurrentXsheet()); + std::map> roots = isConnected(m_indices, m_fxs, app->getCurrentXsheet()); doRedo(true); std::set::const_iterator it2; for (it2 = m_fxs.begin(); it2 != m_fxs.end(); it2++) removeFx(xsh, *it2); if (roots.size() == 1) { TFx *fx = xsh->getColumn(m_columnIndex)->getFx(); - vector rootPorts = roots.begin()->second; + std::vector rootPorts = roots.begin()->second; int i; for (i = 0; i < rootPorts.size(); i++) rootPorts[i]->setFx(fx); @@ -1683,7 +1683,7 @@ class ExplodeChildUndoRemovingColumn : public TUndo //to handle grouping for the subxsheet QStack m_objGroupIds; - QStack m_objGroupNames; + QStack m_objGroupNames; public: ExplodeChildUndoRemovingColumn(const std::set &newIndexs, int index, @@ -1694,7 +1694,7 @@ public: const QMap &splines, const std::set &oldInternalFxs, const std::set oldOutFxs, TFx *root, - const QStack &objGroupIds, const QStack &objGroupNames) + const QStack &objGroupIds, const QStack &objGroupNames) : m_newIndexs(newIndexs), m_index(index), m_oldData(oldData), m_newData(newData), m_oldColumnOutputConnections(columnOutputConnections), m_pegObjects(pegObjects), m_splines(splines), m_root(root), m_oldInternalFxs(oldInternalFxs), m_oldOutFxs(oldOutFxs), m_objGroupIds(objGroupIds), m_objGroupNames(objGroupNames) { TApp *app = TApp::instance(); @@ -1768,8 +1768,8 @@ public: obj->closeEditingGroup(objGroupIds.top()); while (obj->getEditingGroupId() != editingGroup) obj->editGroup(); - list children = obj->getChildren(); - list::iterator it; + std::list children = obj->getChildren(); + std::list::iterator it; for (it = children.begin(); it != children.end(); it++) { TStageObject *childeObj = *it; if (childeObj) @@ -1786,7 +1786,7 @@ public: if (m_root && m_root->getOutputConnectionCount() > 0) editingGroup = m_root->getOutputConnection(0)->getOwnerFx()->getAttributes()->getEditingGroupId(); - set indexesToRemove = m_newIndexs; + std::set indexesToRemove = m_newIndexs; app->getCurrentXsheet()->blockSignals(true); app->getCurrentObject()->blockSignals(true); ColumnCmd::deleteColumns(indexesToRemove, false, true); @@ -1807,9 +1807,9 @@ public: TStageObjectSpline *spline = it.value(); xsh->getStageObjectTree()->removeSpline(spline); } - set indexes; + std::set indexes; indexes.insert(m_index); - list restoredSplineIds; + std::list restoredSplineIds; m_oldData->restoreObjects(indexes, restoredSplineIds, xsh, 0); setColumnOutputConnections(m_oldColumnOutputConnections); TFxSet *internals = xsh->getFxDag()->getInternalFxs(); @@ -1875,7 +1875,7 @@ public: TFx *columnFx = column->getFx(); assert(columnFx); int i; - vector outPorts; + std::vector outPorts; for (i = 0; i < columnFx->getOutputConnectionCount(); i++) outPorts.push_back(columnFx->getOutputConnection(i)); xsh->removeColumn(m_index); @@ -1885,7 +1885,7 @@ public: QMap::const_iterator it3; for (it3 = m_splines.begin(); it3 != m_splines.end(); it3++) xsh->getStageObjectTree()->insertSpline(it3.value()); - list restoredSplineIds; + std::list restoredSplineIds; m_newData->restoreObjects(indexes, restoredSplineIds, xsh, 0); for (i = 0; i < m_pegObjects.size(); i++) xsh->setStageObjectParent(m_pegObjects[i]->getId(), m_parentIds[m_pegObjects[i]->getId()]); @@ -1898,7 +1898,7 @@ public: TStageObject *parentObj = xsh->getStageObject(parentId); if (parentObj->isGrouped()) { QStack idStack = parentObj->getGroupIdStack(); - QStack groupstack = parentObj->getGroupNameStack(); + QStack groupstack = parentObj->getGroupNameStack(); for (int i = 0; i < idStack.size(); i++) { obj->setGroupId(idStack[i]); obj->setGroupName(groupstack[i]); @@ -1972,7 +1972,7 @@ class ExplodeChildUndoWithoutRemovingColumn : public TUndo //to handle grouping for the subxsheet QStack m_objGroupIds; - QStack m_objGroupNames; + QStack m_objGroupNames; public: ExplodeChildUndoWithoutRemovingColumn(const std::set &newIndexs, int index, int from, int to, @@ -1981,7 +1981,7 @@ public: const QMap &splines, const std::set &oldInternalFxs, const std::set oldOutFxs, - const QStack &objGroupIds, const QStack &objGroupNames) + const QStack &objGroupIds, const QStack &objGroupNames) : m_newIndexs(newIndexs), m_index(index), m_from(from), m_to(to), m_cellData(cellData), m_newData(newData), m_pegObjects(pegObjects), m_splines(splines), m_oldInternalFxs(oldInternalFxs), m_oldOutFxs(oldOutFxs), m_objGroupIds(objGroupIds), m_objGroupNames(objGroupNames) { TApp *app = TApp::instance(); @@ -2081,7 +2081,7 @@ public: int i; for (i = m_pegObjects.size() - 1; i >= 0; i--) xsh->getStageObjectTree()->insertStageObject(m_pegObjects[i]); - list restoredSplineIds; + std::list restoredSplineIds; m_newData->restoreObjects(indexes, restoredSplineIds, xsh, 0); setColumnOutputConnections(m_newColumnOutputConnections); std::set::const_iterator it; @@ -2367,7 +2367,7 @@ void SubsceneCmd::explode(int index) // Collect StageObjects group informations QStack objGroupIds; - QStack objGroupNames; + QStack objGroupNames; int objEditingGroup = obj->getEditingGroupId(); if (obj->isGrouped()) { int i = 0; @@ -2390,7 +2390,7 @@ void SubsceneCmd::explode(int index) // Collect Fx group informations QStack fxGroupIds; - QStack fxGroupNames; + QStack fxGroupNames; int fxEditingGroup = attr->getEditingGroupId(); if (attr->isGrouped()) { int i = 0; @@ -2412,7 +2412,7 @@ void SubsceneCmd::explode(int index) oldOutFxs.insert(xsh->getFxDag()->getOutputFx(i)); /*- SubXsheetカラムノードから繋がっているFxPortのリストを取得 (outPorts) -*/ - vector outPorts; + std::vector outPorts; for (i = 0; i < columnFx->getOutputConnectionCount(); i++) outPorts.push_back(columnFx->getOutputConnection(i)); diff --git a/toonz/sources/toonz/tapp.cpp b/toonz/sources/toonz/tapp.cpp index 104a1b8..5720190 100644 --- a/toonz/sources/toonz/tapp.cpp +++ b/toonz/sources/toonz/tapp.cpp @@ -606,7 +606,7 @@ void TApp::onLevelColorStyleSwitched() if (!sl) return; - vector fids; + std::vector fids; sl->getFids(fids); for (int i = 0; i < (int)fids.size(); i++) diff --git a/toonz/sources/toonz/tasksviewer.cpp b/toonz/sources/toonz/tasksviewer.cpp index e6e7fd8..ecd7034 100644 --- a/toonz/sources/toonz/tasksviewer.cpp +++ b/toonz/sources/toonz/tasksviewer.cpp @@ -36,7 +36,7 @@ using namespace DVGui; namespace { -bool isMovieType(string type) +bool isMovieType(std::string type) { return (type == "mov" || type == "avi" || type == "3gp"); } @@ -44,7 +44,7 @@ bool isMovieType(string type) //============================================================================= -const vector &TasksViewer::getActions() const +const std::vector &TasksViewer::getActions() const { return m_actions; } @@ -1106,7 +1106,7 @@ void TaskTreeView::openContextMenu(TreeModel::Item *gItem, const QPoint &globalP if (item->getDepth() == 1) { static QMenu globalMenu; if (globalMenu.isEmpty()) { - const vector &actions = m_mainViewer->getActions(); + const std::vector &actions = m_mainViewer->getActions(); assert(!actions.empty()); int i; for (i = 0; i < actions.size(); i++) { diff --git a/toonz/sources/toonz/tasksviewer.h b/toonz/sources/toonz/tasksviewer.h index 6536c3e..12637e7 100644 --- a/toonz/sources/toonz/tasksviewer.h +++ b/toonz/sources/toonz/tasksviewer.h @@ -183,7 +183,7 @@ public: void update(); void setSelected(TFarmTask *task); - const vector &getActions() const; + const std::vector &getActions() const; void startTimer(); void stopTimer(); @@ -193,7 +193,7 @@ public slots: protected: QWidget *createToolBar(); - vector m_actions; + std::vector m_actions; void add(const QString &iconName, QString text, QToolBar *toolBar, const char *slot, QString iconText); diff --git a/toonz/sources/toonz/tfarmstuff.h b/toonz/sources/toonz/tfarmstuff.h index 82cbf54..0d54046 100644 --- a/toonz/sources/toonz/tfarmstuff.h +++ b/toonz/sources/toonz/tfarmstuff.h @@ -24,7 +24,7 @@ namespace TFarmStuff class TFarmPage : public TWidget { public: - TFarmPage(TWidget *parent, const string &name) : TWidget(parent, name) {} + TFarmPage(TWidget *parent, const std::string &name) : TWidget(parent, name) {} virtual ~TFarmPage() {} virtual void onActivate() {} @@ -48,7 +48,7 @@ public: void onDeactivate(); void update(); - void showTaskInfo(const string &id); + void showTaskInfo(const std::string &id); private: class Data; @@ -63,43 +63,43 @@ public: virtual ~SubmitPageTask() {} /* - virtual void setFileArg(const string &fp) = 0; - virtual void setCommandLine(const string &cmdLine) = 0; + virtual void setFileArg(const std::string &fp) = 0; + virtual void setCommandLine(const std::string &cmdLine) = 0; virtual void setDefaultValue() = 0; */ - virtual string getCommandLine() const = 0; + virtual std::string getCommandLine() const = 0; - virtual string getFilePath() + virtual std::string getFilePath() { return m_filePath; } - virtual void setFilePath(const string &filePath) + virtual void setFilePath(const std::string &filePath) { m_filePath = filePath; } - virtual string getName() + virtual std::string getName() { return m_name; } - virtual void setName(const string &name) + virtual void setName(const std::string &name) { m_name = name; } /* - virtual map getDependencies(); - virtual void setDependencies(const map &tasks); + virtual map getDependencies(); + virtual void setDependencies(const map &tasks); */ - static SubmitPageTask *create(const string &type); + static SubmitPageTask *create(const std::string &type); protected: - string m_filePath; - string m_name; - map m_depTasks; + std::string m_filePath; + std::string m_name; + std::map m_depTasks; }; //------------------------------------------------------------------------------ @@ -117,7 +117,7 @@ public: SubmitPageTask *getTask() const; void setTask(SubmitPageTask *task); - void onTextField(const string &name, bool isName); + void onTextField(const std::string &name, bool isName); class Data; Data *m_data; @@ -139,7 +139,7 @@ public: class SubmitRenderPopup : public TModalPopup { public: - SubmitRenderPopup(TWidget *parent, string name); + SubmitRenderPopup(TWidget *parent, std::string name); ~SubmitRenderPopup(); void onOk(); @@ -163,7 +163,7 @@ private: class SubmitCleanupPopup : public TModalPopup { public: - SubmitCleanupPopup(TWidget *parent, string name); + SubmitCleanupPopup(TWidget *parent, std::string name); ~SubmitCleanupPopup(); void onOk(); @@ -187,7 +187,7 @@ private: class GRootEnvVarPopup : public TModalPopup { public: - GRootEnvVarPopup(TWidget *parent, string name); + GRootEnvVarPopup(TWidget *parent, std::string name); ~GRootEnvVarPopup(); void onOk(); diff --git a/toonz/sources/toonz/tpanels.cpp b/toonz/sources/toonz/tpanels.cpp index 0d0671f..127e18a 100644 --- a/toonz/sources/toonz/tpanels.cpp +++ b/toonz/sources/toonz/tpanels.cpp @@ -306,7 +306,7 @@ FunctionViewerPanel::FunctionViewerPanel(QWidget *parent) attachHandles(); - bool ret = connect(m_functionViewer, SIGNAL(curveIo(int, TDoubleParam *, const string &)), this, SLOT(onIoCurve(int, TDoubleParam *, const string &))); + bool ret = connect(m_functionViewer, SIGNAL(curveIo(int, TDoubleParam *, const std::string &)), this, SLOT(onIoCurve(int, TDoubleParam *, const std::string &))); ret &&connect(m_functionViewer, SIGNAL(editObject()), this, SLOT(onEditObject())); assert(ret); @@ -364,7 +364,7 @@ bool FunctionViewerPanel::widgetInThisPanelIsFocused() //------------------------------------------ -void FunctionViewerPanel::onIoCurve(int type, TDoubleParam *curve, const string &name) +void FunctionViewerPanel::onIoCurve(int type, TDoubleParam *curve, const std::string &name) { switch ((FunctionViewer::IoType)type) { case FunctionViewer::eSaveCurve: @@ -652,7 +652,7 @@ ColorFieldEditorController::ColorFieldEditorController() m_colorFieldHandle = new TPaletteHandle(); m_palette = new TPalette(); TColorStyle *style = m_palette->getStyle(1); - wstring name = L"EmptyColorFieldPalette"; + std::wstring name = L"EmptyColorFieldPalette"; m_palette->setPaletteName(name); m_colorFieldHandle->setPalette(m_palette.getPointer(), 1); DVGui::ColorField::setEditorController(this); @@ -721,7 +721,7 @@ ColorFieldEditorController colorFieldEditorController; CleanupColorFieldEditorController::CleanupColorFieldEditorController() : m_currentColorField(0), m_colorFieldHandle(new TPaletteHandle), m_palette(new TPalette) { - wstring name = L"EmptyColorFieldPalette"; + std::wstring name = L"EmptyColorFieldPalette"; m_palette->setPaletteName(name); m_colorFieldHandle->setPalette(m_palette.getPointer(), 1); DVGui::CleanupColorField::setEditorController(this); diff --git a/toonz/sources/toonz/tpanels.h b/toonz/sources/toonz/tpanels.h index c76df46..ad0e4e1 100644 --- a/toonz/sources/toonz/tpanels.h +++ b/toonz/sources/toonz/tpanels.h @@ -195,7 +195,7 @@ protected: public slots: - void onIoCurve(int type, TDoubleParam *curve, const string &name); + void onIoCurve(int type, TDoubleParam *curve, const std::string &name); void onEditObject(); }; diff --git a/toonz/sources/toonz/vectorizerpopup.cpp b/toonz/sources/toonz/vectorizerpopup.cpp index 3b551d1..9b7ed28 100644 --- a/toonz/sources/toonz/vectorizerpopup.cpp +++ b/toonz/sources/toonz/vectorizerpopup.cpp @@ -249,7 +249,7 @@ void Vectorizer::setLevel(const TXshSimpleLevelP &level) ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); // Build the new level name - wstring levelName = sl->getName() + L"v"; + std::wstring levelName = sl->getName() + L"v"; { std::auto_ptr nameBuilder(NameBuilder::getBuilder(levelName)); diff --git a/toonz/sources/toonz/viewer.cpp b/toonz/sources/toonz/viewer.cpp index 2f662e5..5da5b9a 100644 --- a/toonz/sources/toonz/viewer.cpp +++ b/toonz/sources/toonz/viewer.cpp @@ -76,7 +76,7 @@ void Viewer::setRaster(TRaster32P raster) //----------------------------------------------------------------------------- -void Viewer::setMessage(string msg) +void Viewer::setMessage(std::string msg) { m_message = msg; update(); diff --git a/toonz/sources/toonz/viewer.h b/toonz/sources/toonz/viewer.h index 834f48c..0f63d3c 100644 --- a/toonz/sources/toonz/viewer.h +++ b/toonz/sources/toonz/viewer.h @@ -15,7 +15,7 @@ class Viewer : public QGLWidget TRaster32P m_raster; Q_OBJECT; //! String used to display "loading" text while the movie is being loaded - string m_message; + std::string m_message; //! Pointer to a Processor to process the frame drawing OpenGL primitive over it. Processor *m_processor; @@ -35,7 +35,7 @@ public: //! Set the Processor to draw over the current frame void setProcessor(Processor *processor) { m_processor = processor; } //! Set the message. This message is displayed for every frame (if is a non-empty string). - void setMessage(string msg); + void setMessage(std::string msg); protected: void initializeGL(); diff --git a/toonz/sources/toonz/viewerdraw.cpp b/toonz/sources/toonz/viewerdraw.cpp index 364894e..535abcf 100644 --- a/toonz/sources/toonz/viewerdraw.cpp +++ b/toonz/sources/toonz/viewerdraw.cpp @@ -59,7 +59,7 @@ void getSafeAreaSizeList(QList> &_sizeList) projectPath = fp; safeAreaName = currentSafeAreaName; - string safeAreaFileName = "safeArea.ini"; + std::string safeAreaFileName = "safeArea.ini"; while (!TFileStatus(fp + safeAreaFileName).doesExist() && !fp.isRoot() && fp.getParentDir() != TFilePath()) fp = fp.getParentDir(); @@ -626,7 +626,7 @@ void ViewerDraw::drawCamera(unsigned long flags, double pixelSize) // nome della camera if (!camera3d) { TPointD pos = rect.getP01() + TPointD(0, 4); - string name; + std::string name; if (CleanupPreviewCheck::instance()->isEnabled()) name = "Cleanup Camera"; else @@ -738,7 +738,7 @@ void ViewerDraw::drawFieldGuide() glEnd(); for (i = 1; i <= n; i++) { TPointD delta = 0.03 * TPointD(ux, uy); - string s = toString(i); + std::string s = toString(i); tglDrawText(TPointD(0, i * uy) + delta, s); tglDrawText(TPointD(0, -i * uy) + delta, s); tglDrawText(TPointD(-i * ux, 0) + delta, s); diff --git a/toonz/sources/toonz/xshcellmover.cpp b/toonz/sources/toonz/xshcellmover.cpp index 04a7b4d..16ac12a 100644 --- a/toonz/sources/toonz/xshcellmover.cpp +++ b/toonz/sources/toonz/xshcellmover.cpp @@ -226,7 +226,7 @@ void CellsMover::restoreColumns(int c) const TXsheet *xsh = getXsheet(); for (int i = 0; i < m_colCount; i++) xsh->removeColumn(c); - list restoredSplineIds; + std::list restoredSplineIds; m_columnsData->restoreObjects(ii, restoredSplineIds, xsh, StageObjectsData::eDoClone | StageObjectsData::eResetFxDagPositions); for (int i = 0; i < m_colCount; i++) { TXshColumn *column = xsh->getColumn(c + i); diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index b771c3f..050b810 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -137,7 +137,7 @@ bool selectionContainLevelImage(TCellSelection *selection, TXsheet *xsheet) if (!level) continue; - string ext = level->getPath().getType(); + std::string ext = level->getPath().getType(); int type = level->getType(); if (type == TZP_XSHLEVEL || type == PLI_XSHLEVEL || (type == OVL_XSHLEVEL && ext != "psd")) return true; @@ -150,7 +150,7 @@ bool selectionContainLevelImage(TCellSelection *selection, TXsheet *xsheet) /*! convert the last one digit of the frame number to alphabet Ex. 12 -> 1B 21 -> 2A 30 -> 3 */ -void parse_with_letter(const QString &text, wstring &levelName, TFrameId &fid) +void parse_with_letter(const QString &text, std::wstring &levelName, TFrameId &fid) { QRegExp spaces("\\t|\\s"); QRegExp numbers("\\d+"); @@ -276,7 +276,7 @@ void parse_with_letter(const QString &text, wstring &levelName, TFrameId &fid) //----------------------------------------------------------------------------- -void parse(const QString &text, wstring &levelName, TFrameId &fid) +void parse(const QString &text, std::wstring &levelName, TFrameId &fid) { QRegExp spaces("\\t|\\s"); QRegExp numbers("\\d+"); @@ -487,7 +487,7 @@ void RenameCellField::showInRowCol(int row, int col) TXshCell cell = xsh->getCell(row, col); if (!cell.isEmpty()) { TFrameId fid = cell.getFrameId(); - wstring levelName = cell.m_level->getName(); + std::wstring levelName = cell.m_level->getName(); // convert the last one digit of the frame number to alphabet // Ex. 12 -> 1B 21 -> 2A 30 -> 3 @@ -495,7 +495,7 @@ void RenameCellField::showInRowCol(int row, int col) setText((fid.isEmptyFrame() || fid.isNoFrame()) ? QString::fromStdWString(levelName) : QString::fromStdWString(levelName) + QString(" ") + m_viewer->getFrameNumberWithLetters(fid.getNumber())); else { - string frameNumber(""); + std::string frameNumber(""); if (fid.getNumber() > 0) frameNumber = toString(fid.getNumber()); if (fid.getLetter() != 0) @@ -519,11 +519,11 @@ void RenameCellField::showInRowCol(int row, int col) void RenameCellField::renameCell() { QString s = text(); - wstring newName = s.toStdWString(); + std::wstring newName = s.toStdWString(); setText(""); - wstring levelName; + std::wstring levelName; TFrameId fid; // convert the last one digit of the frame number to alphabet @@ -1069,7 +1069,7 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) if (Preferences::instance()->isShowFrameNumberWithLettersEnabled()) p.drawText(nameRect, Qt::AlignRight, m_viewer->getFrameNumberWithLetters(fid.getNumber())); else { - string frameNumber(""); + std::string frameNumber(""); //set number if (fid.getNumber() > 0) frameNumber = toString(fid.getNumber()); @@ -1083,7 +1083,7 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) //draw level name if (!sameLevel || (isAfterMarkers && Preferences::instance()->isLevelNameOnEachMarkerEnabled())) { - wstring levelName = cell.m_level->getName(); + std::wstring levelName = cell.m_level->getName(); QString text = QString::fromStdWString(levelName); #if QT_VERSION >= 0x050500 QFontMetrics fm(font); @@ -1240,8 +1240,8 @@ void CellArea::drawPaletteCell(QPainter &p, int row, int col, bool isReference) } else { TFrameId fid = cell.m_frameId; - wstring levelName = cell.m_level->getName(); - string frameNumber(""); + std::wstring levelName = cell.m_level->getName(); + std::string frameNumber(""); if (fid.getNumber() > 0) frameNumber = toString(fid.getNumber()); if (fid.getLetter() != 0) @@ -1678,14 +1678,14 @@ void CellArea::mouseMoveEvent(QMouseEvent *event) else if ((!xsh->getCell(row, col).isEmpty() && !isSoundColumn) && x > 6 && x < ColumnWidth) { TXshCell cell = xsh->getCell(row, col); TFrameId fid = cell.getFrameId(); - wstring levelName = cell.m_level->getName(); + std::wstring levelName = cell.m_level->getName(); // convert the last one digit of the frame number to alphabet // Ex. 12 -> 1B 21 -> 2A 30 -> 3 if (Preferences::instance()->isShowFrameNumberWithLettersEnabled()) { m_tooltip = (fid.isEmptyFrame() || fid.isNoFrame()) ? QString::fromStdWString(levelName) : QString::fromStdWString(levelName) + QString(" ") + m_viewer->getFrameNumberWithLetters(fid.getNumber()); } else { - string frameNumber(""); + std::string frameNumber(""); if (fid.getNumber() > 0) frameNumber = toString(fid.getNumber()); if (fid.getLetter() != 0) diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp index dacc690..de99d24 100644 --- a/toonz/sources/toonz/xshcolumnviewer.cpp +++ b/toonz/sources/toonz/xshcolumnviewer.cpp @@ -442,7 +442,7 @@ void ChangeObjectHandle::refresh() for (i = 0; i < 26; i++) addItem(QString(char('A' + i))); - string handle = stageObject->getParentHandle(); + std::string handle = stageObject->getParentHandle(); if (handle[0] == 'H' && handle.length() > 1) handle = handle.substr(1); @@ -490,7 +490,7 @@ void RenameColumnField::show(QPoint pos, int col) m_col = col; TXsheet *xsh = m_xsheetHandle->getXsheet(); - string name = xsh->getStageObject(TStageObjectId::ColumnId(col))->getName(); + std::string name = xsh->getStageObject(TStageObjectId::ColumnId(col))->getName(); TXshColumn *column = xsh->getColumn(col); TXshZeraryFxColumn *zColumn = dynamic_cast(column); if (zColumn) @@ -507,7 +507,7 @@ void RenameColumnField::show(QPoint pos, int col) void RenameColumnField::renameColumn() { - string newName = text().toStdString(); + std::string newName = text().toStdString(); TStageObjectId columnId = TStageObjectId::ColumnId(m_col); TXshColumn *column = m_xsheetHandle->getXsheet()->getColumn(columnId.getIndex()); TXshZeraryFxColumn *zColumn = dynamic_cast(column); @@ -525,7 +525,7 @@ void RenameColumnField::renameColumn() void RenameColumnField::focusOutEvent(QFocusEvent *e) { - wstring newName = text().toStdWString(); + std::wstring newName = text().toStdWString(); if (!newName.empty()) renameColumn(); else @@ -624,7 +624,7 @@ void ColumnArea::drawLevelColumnHead(QPainter &p, int col) std::string name(columnObject->getName()); if (col < 0) - name = string("Camera"); + name = std::string("Camera"); // Retrieve column properties bool isEmpty = false; @@ -753,7 +753,7 @@ void ColumnArea::drawLevelColumnHead(QPainter &p, int col) // pegbar name p.drawText(pegbarNamePos, QString(parentId.toString().c_str())); - string handle = xsh->getStageObject(columnId)->getParentHandle(); + std::string handle = xsh->getStageObject(columnId)->getParentHandle(); if (handle[0] == 'H' && handle.length() > 1) handle = handle.substr(1); if (parentId != TStageObjectId::TableId) @@ -962,7 +962,7 @@ void ColumnArea::drawPaletteColumnHead(QPainter &p, int col) TStageObjectId currentColumnId = app->getCurrentObject()->getObjectId(); TStageObjectId parentId = xsh->getStageObjectParent(columnId); - string name = xsh->getStageObject(columnId)->getName(); + std::string name = xsh->getStageObject(columnId)->getName(); bool isEmpty = false; if (col >= 0) // Verifico se la colonna e' vuota @@ -1091,7 +1091,7 @@ void ColumnArea::drawSoundTextColumnHead(QPainter &p, int col) TXsheet *xsh = m_viewer->getXsheet(); TStageObjectId columnId = m_viewer->getObjectId(col); - string name = xsh->getStageObject(columnId)->getName(); + std::string name = xsh->getStageObject(columnId)->getName(); bool isEditingSpline = app->getCurrentObject()->isSpline(); diff --git a/toonz/sources/toonz/xsheetcmd.cpp b/toonz/sources/toonz/xsheetcmd.cpp index bbdc181..ab45c66 100644 --- a/toonz/sources/toonz/xsheetcmd.cpp +++ b/toonz/sources/toonz/xsheetcmd.cpp @@ -1299,24 +1299,24 @@ namespace { int columnsPerPage = 10000; int rowsPerPage = 10000; -std::vector> infos; +std::vector> infos; void readParameters() { infos.clear(); - const string name("xsheet_html.xml"); + const std::string name("xsheet_html.xml"); TFilePath fp = ToonzFolder::getModuleFile(name); if (!TFileStatus(fp).doesExist()) return; try { TIStream is(fp); - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "xsheet_html") return; while (is.matchTag(tagName)) { if (tagName == "page") { - string s; + std::string s; s = is.getTagAttribute("rows"); if (s != "" && isInt(s)) rowsPerPage = toInt(s); @@ -1324,8 +1324,8 @@ void readParameters() if (s != "" && isInt(s)) columnsPerPage = toInt(s); } else if (tagName == "info") { - string name = is.getTagAttribute("name"); - string value = is.getTagAttribute("value"); + std::string name = is.getTagAttribute("name"); + std::string value = is.getTagAttribute("value"); infos.push_back(std::make_pair(name, value)); } else return; @@ -1336,7 +1336,7 @@ void readParameters() void copyCss(TFilePath fp) { - const string name("xsheet.css"); + const std::string name("xsheet.css"); TFilePath cssFp = fp.getParentDir() + name; if (TFileStatus(cssFp).doesExist()) return; @@ -1481,8 +1481,8 @@ void XsheetWriter::columnHeader(ostream &os, int c) void XsheetWriter::numericColumnHeader(ostream &os, int c) { - string pegbarName = m_numericColumns[c].m_pegbar->getName(); - string curveName = m_numericColumns[c].m_curve->getName(); //toString(TStringTable::translate(m_numericColumns[c].m_curve->getName())); + std::string pegbarName = m_numericColumns[c].m_pegbar->getName(); + std::string curveName = m_numericColumns[c].m_curve->getName(); //toString(TStringTable::translate(m_numericColumns[c].m_curve->getName())); os << " "; os << pegbarName << "
" @@ -1500,7 +1500,7 @@ void XsheetWriter::cell(ostream &os, int r, int c) os << " "; else { TXshLevel *level = cell.m_level.getPointer(); - string type = "levelcell"; + std::string type = "levelcell"; if (level->getChildLevel()) type = "subxsheetcell"; else if (level->getZeraryFxLevel()) @@ -1520,7 +1520,7 @@ void XsheetWriter::cell(ostream &os, int r, int c) } else { // livello diverso - string levelName; + std::string levelName; if (level->getChildLevel()) { int index = getChildLevelIndex(level->getChildLevel()); levelName = index >= 0 ? "Sub" + toString(index + 1) : ""; @@ -1609,8 +1609,8 @@ void makeHtml(TFilePath fp) TApp *app = TApp::instance(); ToonzScene *scene = app->getCurrentScene()->getScene(); - string sceneName = scene->getScenePath().getName(); - string projectName = toString(scene->getProject()->getName()); + std::string sceneName = scene->getScenePath().getName(); + std::string projectName = toString(scene->getProject()->getName()); Tofstream os(fp); @@ -1637,7 +1637,7 @@ void makeHtml(TFilePath fp) XsheetWriter writer(scene); writer.write(os); - vector subXsheets; + std::vector subXsheets; writer.getSubXsheets(subXsheets); int i; for (i = 0; i < (int)subXsheets.size(); i++) { diff --git a/toonz/sources/toonz/xsheetdragtool.cpp b/toonz/sources/toonz/xsheetdragtool.cpp index 31448e7..4a47624 100644 --- a/toonz/sources/toonz/xsheetdragtool.cpp +++ b/toonz/sources/toonz/xsheetdragtool.cpp @@ -354,7 +354,7 @@ class LevelExtenderUndo : public TUndo int m_colCount; int m_rowCount; int m_col, m_row, m_deltaRow; - vector m_cells; // righe x colonne + std::vector m_cells; // righe x colonne bool m_invert; // upper-directional @@ -671,7 +671,7 @@ class LevelExtenderTool : public XsheetGUI::DragTool int m_colCount; int m_rowCount; int m_c0, m_r0, m_r1; - vector m_columns; + std::vector m_columns; LevelExtenderUndo *m_undo; bool m_invert; //upper directional smart tab diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.h index 464826a..0c7b78b 100644 --- a/toonz/sources/toonz/xsheetviewer.h +++ b/toonz/sources/toonz/xsheetviewer.h @@ -391,7 +391,7 @@ public: QList getNotesWidget() const; void addNoteWidget(XsheetGUI::NoteWidget *w); int getCurrentNoteIndex() const; - //! Clear notes widgets vector. + //! Clear notes widgets std::vector. void clearNoteWidgets(); //! Update notes widgets and update cell. void updateNoteWidgets(); diff --git a/toonz/sources/toonzfarm/include/tfarmexecutor.h b/toonz/sources/toonzfarm/include/tfarmexecutor.h index d1c2da7..e5a1a3d 100644 --- a/toonz/sources/toonzfarm/include/tfarmexecutor.h +++ b/toonz/sources/toonzfarm/include/tfarmexecutor.h @@ -36,7 +36,7 @@ public: void onReceive(int socket, const QString &data); protected: - virtual QString execute(const vector &argv) = 0; + virtual QString execute(const std::vector &argv) = 0; private: TTcpIpServer *m_tcpipServer; diff --git a/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp b/toonz/sources/toonzfarm/tfarm/tfarmcontroller_c.cpp index 899fab8..c5e707b 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); + std::istrstream iss(line); char hostName[512]; char ipAddr[80]; diff --git a/toonz/sources/toonzfarm/tfarm/tfarmexecutor.cpp b/toonz/sources/toonzfarm/tfarm/tfarmexecutor.cpp index 0947ea2..0090416 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmexecutor.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmexecutor.cpp @@ -11,7 +11,7 @@ TFarmExecutor::TFarmExecutor(int port) //------------------------------------------------------------------------------ -int extractArgs(const QString &s, vector &argv) +int extractArgs(const QString &s, std::vector &argv) { argv.clear(); if (s == "") @@ -32,7 +32,7 @@ void TFarmExecutor::onReceive(int socket, const QString &data) QString reply; try { - vector argv; + std::vector argv; extractArgs(data, argv); reply = execute(argv); } catch (...) { diff --git a/toonz/sources/toonzfarm/tfarm/tfarmserverstub.cpp b/toonz/sources/toonzfarm/tfarm/tfarmserverstub.cpp index 527f83a..1b743f8 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmserverstub.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmserverstub.cpp @@ -21,14 +21,14 @@ public: } // TFarmExecutor overrides - QString execute(const vector &argv); + QString execute(const std::vector &argv); TFarmServer *m_server; }; //------------------------------------------------------------------------------ -QString TFarmServerStub::Imp::execute(const vector &argv) +QString TFarmServerStub::Imp::execute(const std::vector &argv) { #ifdef DEBUG std::cout << "executing " << argv[0].c_str() << endl; @@ -47,13 +47,13 @@ QString TFarmServerStub::Imp::execute(const vector &argv) int ret = m_server->terminateTask(argv[1]); return QString::number(ret); } else if (argv[0] == "getTasks") { - vector tasks; + std::vector tasks; int ret = m_server->getTasks(tasks); QString reply(QString::number(ret)); reply += ","; - vector::iterator it = tasks.begin(); + std::vector::iterator it = tasks.begin(); for (; it != tasks.end(); ++it) { reply += *it; reply += ","; diff --git a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp index 3c5838f..da461d9 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp @@ -32,7 +32,7 @@ public: Data() : m_tasks() {} ~Data() {} - vector m_tasks; + std::vector m_tasks; }; //------------------------------------------------------------------------------ @@ -243,7 +243,7 @@ bool TFarmTask::operator==(const TFarmTask &task) void TFarmTask::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "taskId") { is >> m_id; @@ -524,7 +524,7 @@ namespace class TFarmTaskDeclaration : public TPersistDeclaration { public: - TFarmTaskDeclaration(const string &id) + TFarmTaskDeclaration(const std::string &id) : TPersistDeclaration(id) {} TPersist *create() const @@ -562,7 +562,7 @@ public: delete *it; } - vector m_tasks; + std::vector m_tasks; }; //------------------------------------------------------------------------------ @@ -736,7 +736,7 @@ TFarmTask *TFarmTaskGroup::getTask(int index) void TFarmTaskGroup::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "info") { TFarmTask::loadData(is); @@ -780,7 +780,7 @@ namespace class TFarmTaskGroupDeclaration : public TPersistDeclaration { public: - TFarmTaskGroupDeclaration(const string &id) + TFarmTaskGroupDeclaration(const std::string &id) : TPersistDeclaration(id) {} TPersist *create() const diff --git a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp index 0ae72e5..6dea38d 100644 --- a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp +++ b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp @@ -103,7 +103,7 @@ int TTcpIpClient::connect(const QString &hostName, const QString &addrStr, int p } /* -int TTcpIpClient::connect(const string &hostName, const string &addrStr, int port, int &sock) +int TTcpIpClient::connect(const std::string &hostName, const std::string &addrStr, int port, int &sock) { struct hostent *he = gethostbyname (hostName.c_str()); if (!he) @@ -165,13 +165,13 @@ int TTcpIpClient::disconnect(int sock) int TTcpIpClient::send(int sock, const QString &data) { - string dataUtf8 = data.toStdString(); + std::string dataUtf8 = data.toStdString(); QString header("#$#THS01.00"); header += QString::number((int)dataUtf8.size()); header += "#$#THE"; - string packet = header.toStdString() + dataUtf8; + std::string packet = header.toStdString() + dataUtf8; // string packet = data;; @@ -226,12 +226,12 @@ int readData(int sock, QString &data) if (cnt == 0) return 0; - string aa(buff); + std::string aa(buff); int x1 = aa.find("#$#THS01.00"); x1 += sizeof("#$#THS01.00") - 1; int x2 = aa.find("#$#THE"); - string ssize; + std::string ssize; for (int i = x1; i < x2; ++i) ssize.push_back(buff[i]); @@ -371,7 +371,7 @@ int TTcpIpClient::send(int sock, const QString &data, QString &reply) } /* -int TTcpIpClient::send(int sock, const string &data, string &reply) +int TTcpIpClient::send(int sock, const std::string &data, string &reply) { int ret = send(sock, data); if (ret == 0) diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp index 6f55f56..85cd22c 100644 --- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp +++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp @@ -235,7 +235,7 @@ namespace class TFarmTaskDeclaration : public TPersistDeclaration { public: - TFarmTaskDeclaration(const string &id) + TFarmTaskDeclaration(const std::string &id) : TPersistDeclaration(id) {} TPersist *create() const @@ -1728,10 +1728,10 @@ void FarmController::getTasks(const QString &parentId, vector &ta if (it != m_tasks.end()) { CtrlFarmTask *task = it->second; - vector::iterator itSubTakId = task->m_subTasks.begin(); + vector::iterator itSubTakId = task->m_subTasks.begin(); for ( ; itSubTakId != task->m_subTasks.end(); ++itSubTakId) { - map::iterator itSubTask = m_tasks.find(*itSubTakId); + map::iterator itSubTask = m_tasks.find(*itSubTakId); if (itSubTask != m_tasks.end()) { CtrlFarmTask *subTask = itSubTask->second; @@ -2263,7 +2263,7 @@ void FarmController::save(const TFilePath &fp) const { TOStream os(fp); - map attributes; + map attributes; attributes.insert(make_pair("ver", "1.0")); os.openChild("tfarmdata", attributes); os.openChild("tfarmtasks"); diff --git a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp index f0b2b4a..cd49e82 100644 --- a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp +++ b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp @@ -24,7 +24,6 @@ #ifdef _WIN32 #include -using namespace std; #else #include #include @@ -85,7 +84,7 @@ TFilePath getGlobalRoot() while (*t) t++; - string pathName(s, t - 1); + std::string pathName(s, t - 1); rootDir = TFilePath(pathName); } @@ -118,7 +117,7 @@ TFilePath getLocalRoot() while (*t) t++; - string pathName(s, t - 1); + std::string pathName(s, t - 1); lroot = TFilePath(pathName); } @@ -223,8 +222,8 @@ public: void mountDisks(); void unmountDisks(); - std::map m_disks; - vector m_disksMounted; + std::map m_disks; + vector m_disksMounted; #endif int m_port; @@ -517,11 +516,11 @@ FarmServer::~FarmServer() //------------------------------------------------------------------------------ -inline string toString(unsigned long value) +inline std::string toString(unsigned long value) { - ostrstream ss; + std::ostrstream ss; ss << value << '\0'; - string s = ss.str(); + std::string s = ss.str(); ss.freeze(false); return s; } @@ -756,9 +755,9 @@ void FarmServer::removeTask(const QString &id) namespace { -string getLine(std::istream &is) +std::string getLine(std::istream &is) { - string out; + std::string out; char c; while (!is.eof()) { @@ -805,8 +804,8 @@ bool loadServerData(const QString &hostname, QString &addr, int &port) char line[256]; is.getline(line, 256); */ - string line = getLine(is); - istrstream iss(line.c_str()); + std::string line = getLine(is); + std::istrstream iss(line.c_str()); char name[80]; char ipAddress[80]; @@ -843,7 +842,7 @@ void FarmServerService::onStart(int argc, char *argv[]) bool lRootDirExists = fs.isDirectory(); if (!lRootDirExists) { - string errMsg("Unable to start the Server"); + std::string errMsg("Unable to start the Server"); errMsg += "\n"; errMsg += "The directory specified as Local Root does not exist"; errMsg += "\n"; @@ -861,7 +860,7 @@ void FarmServerService::onStart(int argc, char *argv[]) TFilePath gRootDir = getGlobalRoot(); if (toString(gRootDir.getWideString()) == "") { - string errMsg("Unable to get TFARMGLOBALROOT environment variable"); + std::string errMsg("Unable to get TFARMGLOBALROOT environment variable"); addToMessageLog(errMsg); // DEBUG MAC SERVIZIO (DA TOGLIERE) @@ -876,7 +875,7 @@ void FarmServerService::onStart(int argc, char *argv[]) bool gRootDirExists = dirExists(gRootDir); ; if (!gRootDirExists) { - string errMsg("Unable to start the Server"); + std::string errMsg("Unable to start the Server"); errMsg += "\n"; errMsg += "The directory " + toString(gRootDir.getWideString()) + " specified as Global Root does not exist"; ; @@ -901,7 +900,7 @@ void FarmServerService::onStart(int argc, char *argv[]) try { ::loadControllerData(fp, controllerData); } catch (TException &e) { - string errMsg("Unable to start the Server"); + std::string errMsg("Unable to start the Server"); errMsg += "\n"; errMsg += toString(e.getMessage()); addToMessageLog(errMsg); @@ -976,7 +975,7 @@ void FarmServerService::onStart(int argc, char *argv[]) std::cout << "Error: " << appsCfgFile << endl; while (!isAppCfgFile.eof()) { - string line = getLine(isAppCfgFile); + std::string line = getLine(isAppCfgFile); istrstream iss(line.c_str()); TFilePath appPath = TFilePath(line); appPaths.push_back(appPath); @@ -1005,7 +1004,7 @@ void FarmServerService::onStart(int argc, char *argv[]) #endif if (rc != 0) { - string msg("An error occurred starting the ToonzFarm Server"); + std::string msg("An error occurred starting the ToonzFarm Server"); msg += "\n"; #ifdef _WIN32 @@ -1021,7 +1020,7 @@ void FarmServerService::onStart(int argc, char *argv[]) 0, NULL); - msg += string((char *)lpMsgBuf); + msg += std::string((char *)lpMsgBuf); // Free the buffer. LocalFree(lpMsgBuf); @@ -1033,7 +1032,7 @@ void FarmServerService::onStart(int argc, char *argv[]) setStatus(TService::Stopped, NO_ERROR, 0); } - string msg("Exiting with code "); + std::string msg("Exiting with code "); msg += toString(ret); msg += "\n"; m_userLog->info(QString::fromStdString(msg)); @@ -1072,7 +1071,7 @@ void FarmServerService::loadDiskMountingPoints(const TFilePath &fp) { Tifstream is(fp); if (!is) - throw string("File " + toString(fp.getWideString()) + " not found"); + throw std::string("File " + toString(fp.getWideString()) + " not found"); char buffer[1024]; while (is.getline(buffer, sizeof(buffer))) { char *s = buffer; @@ -1092,7 +1091,7 @@ void FarmServerService::loadDiskMountingPoints(const TFilePath &fp) q--; if (q == s) continue; // non dovrebbe succedere mai: prima di '=' tutti blanks - string from(s, q - s); + std::string from(s, q - s); s = t + 1; while (isBlank(*s)) s++; @@ -1114,10 +1113,10 @@ void FarmServerService::loadDiskMountingPoints(const TFilePath &fp) void FarmServerService::mountDisks() { - std::map::iterator it = m_disks.begin(); + std::map::iterator it = m_disks.begin(); for (; it != m_disks.end(); ++it) { - string drive = it->first; - string remoteName = it->second; + std::string drive = it->first; + std::string remoteName = it->second; NETRESOURCE NetResource; NetResource.dwType = RESOURCETYPE_DISK; @@ -1152,7 +1151,7 @@ void FarmServerService::mountDisks() nameBuf, // buffer for provider name sizeof(nameBuf)); // size of provider name buffer - string errorMessage("Unable to map "); + std::string errorMessage("Unable to map "); errorMessage += NetResource.lpRemoteName; errorMessage += " to logic volume "; errorMessage += NetResource.lpLocalName; @@ -1166,9 +1165,9 @@ void FarmServerService::mountDisks() void FarmServerService::unmountDisks() { - vector::iterator it = m_disksMounted.begin(); + vector::iterator it = m_disksMounted.begin(); for (; it != m_disksMounted.end(); ++it) { - string drive = *it; + std::string drive = *it; DWORD res = WNetCancelConnection2( drive.c_str(), // resource name @@ -1176,7 +1175,7 @@ void FarmServerService::unmountDisks() TRUE); // unconditional disconnect option if (res != NO_ERROR && res != ERROR_NOT_CONNECTED) { - string errorMessage("Unable to unmap "); + std::string errorMessage("Unable to unmap "); errorMessage += drive.c_str(); addToMessageLog(errorMessage); } @@ -1198,8 +1197,8 @@ int main(int argc, char **argv) bool console = false; if (argc > 1) { - string serviceName("ToonzFarmServer"); //Must be the same of the installer's - string serviceDisplayName = serviceName; + std::string serviceName("ToonzFarmServer"); //Must be the same of the installer's + std::string serviceDisplayName = serviceName; TCli::SimpleQualifier consoleQualifier("-console", "Run as console app"); TCli::StringQualifier installQualifier("-install name", "Install service as 'name'"); diff --git a/toonz/sources/toonzlib/autoclose.cpp b/toonz/sources/toonzlib/autoclose.cpp index a5289fb..5c10bb7 100644 --- a/toonz/sources/toonzlib/autoclose.cpp +++ b/toonz/sources/toonzlib/autoclose.cpp @@ -81,17 +81,17 @@ public: } //....................... - void compute(vector &closingSegmentArray); - void draw(const vector &closingSegmentArray); - void skeletonize(vector &endpoints); - void findSeeds(vector &seeds, vector &endpoints); - void erase(vector &seeds, vector &endpoints); + void compute(std::vector &closingSegmentArray); + void draw(const std::vector &closingSegmentArray); + void skeletonize(std::vector &endpoints); + void findSeeds(std::vector &seeds, std::vector &endpoints); + void erase(std::vector &seeds, std::vector &endpoints); void circuitAndMark(UCHAR *seed, UCHAR preseed); - bool circuitAndCancel(UCHAR *seed, UCHAR preseed, vector &endpoints); - void findMeetingPoints(vector &endpoints, vector &closingSegments); - void calculateWeightAndDirection(vector &orientedEndpoints); - bool spotResearchTwoPoints(vector &endpoints, vector &closingSegments); - bool spotResearchOnePoint(vector &endpoints, vector &closingSegments); + bool circuitAndCancel(UCHAR *seed, UCHAR preseed, std::vector &endpoints); + void findMeetingPoints(std::vector &endpoints, std::vector &closingSegments); + void calculateWeightAndDirection(std::vector &orientedEndpoints); + bool spotResearchTwoPoints(std::vector &endpoints, std::vector &closingSegments); + bool spotResearchOnePoint(std::vector &endpoints, std::vector &closingSegments); void copy(const TRasterGR8P &braux, TRaster32P &raux); int exploreTwoSpots(const TAutocloser::Segment &s0, const TAutocloser::Segment &s1); @@ -102,7 +102,7 @@ public: bool exploreRay(UCHAR *br, Segment s, TPoint &p); void visitPix(UCHAR *br, int toVisit, const TPoint &dis); void cancelMarks(UCHAR *br); - void cancelFromArray(vector &array, TPoint p, int &count); + void cancelFromArray(std::vector &array, TPoint p, int &count); }; /*------------------------------------------------------------------------*/ @@ -251,9 +251,9 @@ return; } //namespace /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::compute(vector &closingSegmentArray) +void TAutocloser::Imp::compute(std::vector &closingSegmentArray) { - vector endpoints; + std::vector endpoints; try { assert(closingSegmentArray.empty()); @@ -302,7 +302,7 @@ void TAutocloser::Imp::compute(vector &closingSegmentArray) /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::draw(const vector &closingSegmentArray) +void TAutocloser::Imp::draw(const std::vector &closingSegmentArray) { TRasterCM32P raux; @@ -368,7 +368,7 @@ inline int distance2(const TPoint p0, const TPoint p1) /*=============================================================================*/ -int closerPoint(const vector &points, vector &marks, int index) +int closerPoint(const std::vector &points, std::vector &marks, int index) { assert(points.size() == marks.size()); @@ -531,8 +531,7 @@ int TAutocloser::Imp::exploreTwoSpots(const TAutocloser::Segment &s0, const TAut /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::findMeetingPoints(vector &endpoints, - vector &closingSegments) +void TAutocloser::Imp::findMeetingPoints(std::vector &endpoints, std::vector &closingSegments) { int i; double alfa; @@ -546,7 +545,7 @@ void TAutocloser::Imp::findMeetingPoints(vector &endpoints, m_csb = cos(-alfa); m_snb = sin(-alfa); - vector orientedEndpoints(endpoints.size()); + std::vector orientedEndpoints(endpoints.size()); for (i = 0; i < (int)endpoints.size(); i++) orientedEndpoints[i].first = endpoints[i]; @@ -566,7 +565,7 @@ void TAutocloser::Imp::findMeetingPoints(vector &endpoints, /*------------------------------------------------------------------------*/ -bool allMarked(const vector &marks, int index) +bool allMarked(const std::vector &marks, int index) { int i; @@ -578,12 +577,12 @@ bool allMarked(const vector &marks, int index) /*------------------------------------------------------------------------*/ -bool TAutocloser::Imp::spotResearchTwoPoints(vector &endpoints, vector &closingSegments) +bool TAutocloser::Imp::spotResearchTwoPoints(std::vector &endpoints, std::vector &closingSegments) { int i, distance, current = 0, closerIndex; int sqrDistance = m_closingDistance * m_closingDistance; bool found = 0; - vector marks(endpoints.size()); + std::vector marks(endpoints.size()); while (current < (int)endpoints.size() - 1) { found = 0; @@ -648,7 +647,7 @@ return 0; /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::calculateWeightAndDirection(vector &orientedEndpoints) +void TAutocloser::Imp::calculateWeightAndDirection(std::vector &orientedEndpoints) { //UCHAR *br; int lx = m_raster->getLx(); @@ -694,7 +693,7 @@ void TAutocloser::Imp::calculateWeightAndDirection(vector &orientedEndp /*------------------------------------------------------------------------*/ -bool TAutocloser::Imp::spotResearchOnePoint(vector &endpoints, vector &closingSegments) +bool TAutocloser::Imp::spotResearchOnePoint(std::vector &endpoints, std::vector &closingSegments) { int count = 0; bool ret = false; @@ -704,7 +703,7 @@ bool TAutocloser::Imp::spotResearchOnePoint(vector &endpoints, vector::iterator it = std::find(closingSegments.begin(), closingSegments.end(), segment); + std::vector::iterator it = std::find(closingSegments.begin(), closingSegments.end(), segment); if (it == closingSegments.end()) { ret = true; drawInByteRaster(endpoints[count].first, p); @@ -945,9 +944,9 @@ void TAutocloser::Imp::cancelMarks(UCHAR *br) /*=============================================================================*/ -void TAutocloser::Imp::skeletonize(vector &endpoints) +void TAutocloser::Imp::skeletonize(std::vector &endpoints) { - vector seeds; + std::vector seeds; findSeeds(seeds, endpoints); @@ -956,7 +955,7 @@ void TAutocloser::Imp::skeletonize(vector &endpoints) /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::findSeeds(vector &seeds, vector &endpoints) +void TAutocloser::Imp::findSeeds(std::vector &seeds, std::vector &endpoints) { int i, j; UCHAR preseed; @@ -1011,7 +1010,7 @@ void TAutocloser::Imp::circuitAndMark(UCHAR *seed, UCHAR preseed) /*------------------------------------------------------------------------*/ -void TAutocloser::Imp::erase(vector &seeds, vector &endpoints) +void TAutocloser::Imp::erase(std::vector &seeds, std::vector &endpoints) { int i, size = 0, oldSize; UCHAR *seed, preseed, code, displ; @@ -1050,7 +1049,7 @@ void TAutocloser::Imp::erase(vector &seeds, vector &endpoints) /*------------------------------------------------------------------------*/ -bool TAutocloser::Imp::circuitAndCancel(UCHAR *seed, UCHAR preseed, vector &endpoints) +bool TAutocloser::Imp::circuitAndCancel(UCHAR *seed, UCHAR preseed, std::vector &endpoints) { UCHAR *walker, *previous; UCHAR displ, prewalker; @@ -1108,7 +1107,7 @@ bool TAutocloser::Imp::circuitAndCancel(UCHAR *seed, UCHAR preseed, vector &array, TPoint p, int &count) +void TAutocloser::Imp::cancelFromArray(std::vector &array, TPoint p, int &count) { std::vector::iterator it = array.begin(); int i = 0; @@ -1152,7 +1151,7 @@ TAutocloser::TAutocloser(const TRasterP &r, int distance, double angle, int inde void TAutocloser::exec() { - vector segments; + std::vector segments; compute(segments); draw(segments); } @@ -1165,13 +1164,13 @@ TAutocloser::~TAutocloser() //------------------------------------------------- -void TAutocloser::compute(vector &closingSegmentArray) +void TAutocloser::compute(std::vector &closingSegmentArray) { m_imp->compute(closingSegmentArray); } //------------------------------------------------- -void TAutocloser::draw(const vector &closingSegmentArray) +void TAutocloser::draw(const std::vector &closingSegmentArray) { m_imp->draw(closingSegmentArray); } diff --git a/toonz/sources/toonzlib/autopos.cpp b/toonz/sources/toonzlib/autopos.cpp index 9c5e403..25840f9 100644 --- a/toonz/sources/toonzlib/autopos.cpp +++ b/toonz/sources/toonzlib/autopos.cpp @@ -904,7 +904,7 @@ static int find_dots_gr8(const TRasterGR8P &img, int strip_width, PEGS_SIDE pegs vertical = TRUE; DEFAULT : { - ostrstream os; + std::ostrstream os; os << "find dots internal error: pegs_side = " << std::hex << pegs_side << '\0'; os.freeze(false); throw TCleanupException(os.str()); @@ -1029,7 +1029,7 @@ static int find_dots_rgb(const TRaster32P &img, int strip_width, PEGS_SIDE pegs_ vertical = TRUE; DEFAULT : { - ostrstream os; + std::ostrstream os; os << "find dots internal error: pegs_side = " << std::hex << pegs_side << '\0'; os.freeze(false); throw TCleanupException(os.str()); diff --git a/toonz/sources/toonzlib/avicodecrestrictions.cpp b/toonz/sources/toonzlib/avicodecrestrictions.cpp index ff5161b..d5204c3 100644 --- a/toonz/sources/toonzlib/avicodecrestrictions.cpp +++ b/toonz/sources/toonzlib/avicodecrestrictions.cpp @@ -8,7 +8,7 @@ namespace { -HIC getCodec(const wstring &codecName, int &bpp) +HIC getCodec(const std::wstring &codecName, int &bpp) { HIC hic = 0; ICINFO icinfo; @@ -35,8 +35,8 @@ HIC getCodec(const wstring &codecName, int &bpp) WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, descr, sizeof(descr), 0, 0); WideCharToMultiByte(CP_ACP, 0, icinfo.szName, -1, name, sizeof(name), 0, 0); - string compressorName; - compressorName = string(name) + " '" + toString(bpp) + "' " + string(descr); + std::string compressorName; + compressorName = std::string(name) + " '" + toString(bpp) + "' " + std::string(descr); if (hic) { if (ICCompressQuery(hic, &inFmt, NULL) != ICERR_OK) { @@ -80,7 +80,7 @@ bool canWork(const HIC &hic, const TDimension &resolution, int bpp) //----------------------------------------------------------------------------- -void AviCodecRestrictions::getRestrictions(const wstring &codecName, QString &restrictions) +void AviCodecRestrictions::getRestrictions(const std::wstring &codecName, QString &restrictions) { restrictions.clear(); if (codecName == L"Uncompressed") { @@ -145,7 +145,7 @@ void AviCodecRestrictions::getRestrictions(const wstring &codecName, QString &re //----------------------------------------------------------------------------- -bool AviCodecRestrictions::canWriteMovie(const wstring &codecName, const TDimension &resolution) +bool AviCodecRestrictions::canWriteMovie(const std::wstring &codecName, const TDimension &resolution) { if (codecName == L"Uncompressed") { return true; @@ -164,7 +164,7 @@ bool AviCodecRestrictions::canWriteMovie(const wstring &codecName, const TDimens //----------------------------------------------------------------------------- -bool AviCodecRestrictions::canBeConfigured(const wstring &codecName) +bool AviCodecRestrictions::canBeConfigured(const std::wstring &codecName) { if (codecName == L"Uncompressed") return false; @@ -182,7 +182,7 @@ bool AviCodecRestrictions::canBeConfigured(const wstring &codecName) //----------------------------------------------------------------------------- -void AviCodecRestrictions::openConfiguration(const wstring &codecName, void *winId) +void AviCodecRestrictions::openConfiguration(const std::wstring &codecName, void *winId) { if (codecName == L"Uncompressed") return; @@ -199,9 +199,9 @@ void AviCodecRestrictions::openConfiguration(const wstring &codecName, void *win //----------------------------------------------------------------------------- -QMap AviCodecRestrictions::getUsableCodecs(const TDimension &resolution) +QMap AviCodecRestrictions::getUsableCodecs(const TDimension &resolution) { - QMap codecs; + QMap codecs; HIC hic = 0; ICINFO icinfo; @@ -228,8 +228,8 @@ QMap AviCodecRestrictions::getUsableCodecs(const TDimension &reso WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, descr, sizeof(descr), 0, 0); WideCharToMultiByte(CP_ACP, 0, icinfo.szName, -1, name, sizeof(name), 0, 0); - wstring compressorName; - compressorName = toWideString(string(name) + " '" + toString(bpp) + "' " + string(descr)); + std::wstring compressorName; + compressorName = toWideString(std::string(name) + " '" + toString(bpp) + "' " + std::string(descr)); if (hic) { if (ICCompressQuery(hic, &inFmt, NULL) != ICERR_OK) { diff --git a/toonz/sources/toonzlib/captureparameters.cpp b/toonz/sources/toonzlib/captureparameters.cpp index 479a35b..7996fe9 100644 --- a/toonz/sources/toonzlib/captureparameters.cpp +++ b/toonz/sources/toonzlib/captureparameters.cpp @@ -15,9 +15,9 @@ CaptureParameters::CaptureParameters() //----------------------------------------------------------------------------- -TPropertyGroup *CaptureParameters::getFileFormatProperties(string ext) +TPropertyGroup *CaptureParameters::getFileFormatProperties(std::string ext) { - std::map::const_iterator it; + std::map::const_iterator it; it = m_formatProperties.find(ext); if (it == m_formatProperties.end()) { TPropertyGroup *ret = Tiio::makeWriterProperties(ext); @@ -42,7 +42,7 @@ void CaptureParameters::assign(const CaptureParameters *params) m_step = params->getStep(); m_format = params->getFileFormat(); - std::map::const_iterator it = params->m_formatProperties.begin(); + std::map::const_iterator it = params->m_formatProperties.begin(); while (it != params->m_formatProperties.end()) { m_formatProperties[it->first] = it->second; ++it; @@ -65,13 +65,13 @@ void CaptureParameters::saveData(TOStream &os) os.child("format") << m_format; os.openChild("formatsProperties"); - std::vector fileExtensions; + std::vector fileExtensions; getFileFormatPropertiesExtensions(fileExtensions); for (int i = 0; i < (int)fileExtensions.size(); i++) { - string ext = fileExtensions[i]; + std::string ext = fileExtensions[i]; TPropertyGroup *pg = getFileFormatProperties(ext); assert(pg); - std::map attr; + std::map attr; attr["ext"] = ext; os.openChild("formatProperties", attr); pg->saveData(os); @@ -84,7 +84,7 @@ void CaptureParameters::saveData(TOStream &os) void CaptureParameters::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "deviceName") is >> m_deviceName; @@ -103,7 +103,7 @@ void CaptureParameters::loadData(TIStream &is) is >> value; m_upsideDown = value != 0; } else if (tagName == "filePath") { - wstring str; + std::wstring str; is >> str; m_filePath = TFilePath(str); } @@ -116,7 +116,7 @@ void CaptureParameters::loadData(TIStream &is) else if (tagName == "formatsProperties") { while (is.matchTag(tagName)) { if (tagName == "formatProperties") { - string ext = is.getTagAttribute("ext"); + std::string ext = is.getTagAttribute("ext"); TPropertyGroup *pg = getFileFormatProperties(ext); if (ext == "avi") { TPropertyGroup appProperties; @@ -150,10 +150,10 @@ void CaptureParameters::loadData(TIStream &is) //------------------------------------------------------------------- -void CaptureParameters::getFileFormatPropertiesExtensions(std::vector &v) const +void CaptureParameters::getFileFormatPropertiesExtensions(std::vector &v) const { v.reserve(m_formatProperties.size()); - std::map::const_iterator it; + std::map::const_iterator it; for (it = m_formatProperties.begin(); it != m_formatProperties.end(); ++it) v.push_back(it->first); } diff --git a/toonz/sources/toonzlib/cleanupparameters.cpp b/toonz/sources/toonzlib/cleanupparameters.cpp index 5692ce6..de78ca2 100644 --- a/toonz/sources/toonzlib/cleanupparameters.cpp +++ b/toonz/sources/toonzlib/cleanupparameters.cpp @@ -32,7 +32,7 @@ namespace class FdgManager { // singleton - std::map m_infos; + std::map m_infos; void loadFieldGuideInfo(); FdgManager() { loadFieldGuideInfo(); } @@ -43,9 +43,9 @@ public: return &_instance; } - const FDG_INFO *getFdg(string name) const + const FDG_INFO *getFdg(std::string name) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_infos.find(name); if (it == m_infos.end()) return 0; @@ -53,9 +53,9 @@ public: return &it->second; } - void getFdgNames(vector &names) const + void getFdgNames(std::vector &names) const { - std::map::const_iterator it; + std::map::const_iterator it; for (it = m_infos.begin(); it != m_infos.end(); ++it) names.push_back(it->first); } @@ -194,7 +194,7 @@ CleanupParameters::CleanupParameters() //--------------------------------------------------------- -bool CleanupParameters::setFdgByName(string name) +bool CleanupParameters::setFdgByName(std::string name) { const FDG_INFO *info = FdgManager::instance()->getFdg(name); if (info) { @@ -208,7 +208,7 @@ bool CleanupParameters::setFdgByName(string name) //--------------------------------------------------------- -void CleanupParameters::getFdgNames(vector &names) +void CleanupParameters::getFdgNames(std::vector &names) { FdgManager::instance()->getFdgNames(names); } @@ -318,7 +318,7 @@ void CleanupParameters::saveData(TOStream &os) const m_cleanupPalette->saveData(os); os.closeChild(); - std::map attr; + std::map attr; if (m_autocenterType != AUTOCENTER_NONE) { attr.clear(); attr["type"] = toString((int)m_autocenterType); @@ -330,7 +330,7 @@ void CleanupParameters::saveData(TOStream &os) const if (m_flipx || m_flipy || m_rotate != 0 //|| m_scale!=1 || m_offx != 0 || m_offy != 0) { attr.clear(); - string flip = string(m_flipx ? "x" : "") + string(m_flipy ? "y" : ""); + std::string flip = std::string(m_flipx ? "x" : "") + std::string(m_flipy ? "y" : ""); if (flip != "") attr["flip"] = flip; if (m_rotate != 0) @@ -392,7 +392,7 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) assign(&cp); } - string tagName; + std::string tagName; m_lineProcessingMode = lpNone; m_noAntialias = false; m_postAntialias = false; @@ -407,16 +407,16 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) is.closeChild(); } else if (tagName == "autoCenter") { m_autocenterType = AUTOCENTER_FDG; - string s = is.getTagAttribute("type"); + std::string s = is.getTagAttribute("type"); if (s != "" && isInt(s)) m_autocenterType = (AUTOCENTER_TYPE)toInt(s); s = is.getTagAttribute("pegHoles"); if (s != "" && isInt(s)) m_pegSide = (PEGS_SIDE)toInt(s); } else if (tagName == "transform") { - string s = is.getTagAttribute("flip"); - m_flipx = (s.find("x") != string::npos); - m_flipy = (s.find("y") != string::npos); + std::string s = is.getTagAttribute("flip"); + m_flipx = (s.find("x") != std::string::npos); + m_flipy = (s.find("y") != std::string::npos); s = is.getTagAttribute("rotate"); if (s != "" && isInt(s)) m_rotate = toInt(s); @@ -428,7 +428,7 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) m_offy = toDouble(s); } else if (tagName == "lineProcessing") { m_lineProcessingMode = lpGrey; - string s = is.getTagAttribute("sharpness"); + std::string s = is.getTagAttribute("sharpness"); if (s != "" && isDouble(s)) m_sharpness = toDouble(s); s = is.getTagAttribute("autoAdjust"); @@ -438,11 +438,11 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) if (s != "" && s == "color") m_lineProcessingMode = lpColor; } else if (tagName == "despeckling") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (s != "" && isInt(s)) m_despeckling = toInt(s); } else if (tagName == "aaValue") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (s != "" && isInt(s)) m_aaValue = toInt(s); } else if (tagName == "noAntialias") @@ -450,11 +450,11 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) else if (tagName == "MLAA") m_postAntialias = true; else if (tagName == "closestField") { - string s = is.getTagAttribute("value"); + std::string s = is.getTagAttribute("value"); if (s != "" && isDouble(s)) m_closestField = toDouble(s); } else if (tagName == "fdg") { - string s = is.getTagAttribute("name"); + std::string s = is.getTagAttribute("name"); if (s != "") setFdgByName(s); } else if (tagName == "path") { @@ -474,7 +474,7 @@ void CleanupParameters::loadData(TIStream &is, bool globalParams) const CleanupTypes::FDG_INFO &CleanupParameters::getFdgInfo() { if (m_fdgInfo.m_name == "") { - std::vector names; + std::vector names; FdgManager::instance()->getFdgNames(names); if (names.size() > 1) { const CleanupTypes::FDG_INFO *info = diff --git a/toonz/sources/toonzlib/convert2tlv.cpp b/toonz/sources/toonzlib/convert2tlv.cpp index 25b9758..3be1782 100644 --- a/toonz/sources/toonzlib/convert2tlv.cpp +++ b/toonz/sources/toonzlib/convert2tlv.cpp @@ -55,9 +55,9 @@ inline int distance(const TPixel &c1, const TPixel &c2) //---------------------------------------------- -int findClosest(const map &colorMap, TPixel &curPixColor) +int findClosest(const std::map &colorMap, TPixel &curPixColor) { - map::const_iterator it = colorMap.begin(); + std::map::const_iterator it = colorMap.begin(); int minDistance = 1000000000; int index = -1; for (; it != colorMap.end(); ++it) { @@ -195,11 +195,11 @@ int getFramesCount(const TLevelP &l, int from, int to) } //namespace -map::const_iterator Convert2Tlv::findNearestColor(const TPixel &color) +std::map::const_iterator Convert2Tlv::findNearestColor(const TPixel &color) { //assert((int)colorMap.size()>toIndex); //assert((int)colorMap.size()>fromIndex); - map::const_iterator ret = m_colorMap.end(), it = m_colorMap.begin(); + std::map::const_iterator ret = m_colorMap.end(), it = m_colorMap.begin(); //std::advance(it, fromIndex); int mindist = 1000; @@ -227,7 +227,7 @@ map::const_iterator Convert2Tlv::findNearestColor(const TPixel &col void Convert2Tlv::buildInks(TRasterCM32P &rout, const TRaster32P &rin) { - map::const_iterator it; + std::map::const_iterator it; TPixel curColor = TPixel::Transparent; int i, j; int curIndex; @@ -332,7 +332,7 @@ void Convert2Tlv::buildInksFromGrayTones(TRasterCM32P &rout, const TRasterP &rin void Convert2Tlv::buildInksForNAAImage(TRasterCM32P &rout, const TRaster32P &rin) { - map::iterator it; + std::map::iterator it; TPixel curColor = TPixel::Transparent; int i, j; int curIndex; @@ -379,7 +379,7 @@ void Convert2Tlv::doFill(TRasterCM32P &rout, const TRaster32P &rin) if (!(pixout->getTone() == 255 && pixout->getPaint() == 0 && pixin->m == 255)) continue; - map::const_iterator it; + std::map::const_iterator it; int paintIndex; if ((it = m_colorMap.find(*pixin)) == m_colorMap.end()) { if (m_colorTolerance > 0) @@ -551,7 +551,7 @@ void Convert2Tlv::buildToonzRaster(TRasterCM32P &rout, const TRasterP &rin1, con TPalette *Convert2Tlv::buildPalette() { - map::const_iterator it = m_colorMap.begin(); + std::map::const_iterator it = m_colorMap.begin(); TPalette::Page *page = m_palette->getPage(0); QList stylesToBeAddedToPage; @@ -590,11 +590,11 @@ TPalette *Convert2Tlv::buildPalette() if (!is) return m_palette; - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "palette") return m_palette; - string gname; + std::string gname; is.getTagParam("name", gname); TPalette *defaultPalette = new TPalette(); defaultPalette->loadData(is); @@ -678,7 +678,7 @@ int Convert2Tlv::getFramesToConvertCount() //--------------------------------------------- -bool Convert2Tlv::init(string &errorMessage) +bool Convert2Tlv::init(std::string &errorMessage) { m_lastIndex = m_maxPaletteIndex = 0; m_colorMap.clear(); @@ -803,7 +803,7 @@ bool Convert2Tlv::init(string &errorMessage) //---------------------------------------------------------------------------------------- -bool Convert2Tlv::convertNext(string &errorMessage) +bool Convert2Tlv::convertNext(std::string &errorMessage) { if (m_count == 0 && m_from != -1) diff --git a/toonz/sources/toonzlib/doubleparamcmd.cpp b/toonz/sources/toonzlib/doubleparamcmd.cpp index 3e1ddb6..0a7b891 100644 --- a/toonz/sources/toonzlib/doubleparamcmd.cpp +++ b/toonz/sources/toonzlib/doubleparamcmd.cpp @@ -200,7 +200,7 @@ int KeyframeSetter::createKeyframe(double frame) m_undo->addKeyframe(m_kIndex + 1); m_param->setKeyframes(keyframes); } else if (segmentType == TDoubleKeyframe::Expression || segmentType == TDoubleKeyframe::SimilarShape) { - string expressionText = ka.m_expressionText; + std::string expressionText = ka.m_expressionText; setExpression(expressionText); setType(ka.m_type); @@ -623,7 +623,7 @@ void KeyframeSetter::setSpeedIn(const TPointD &speedIn) double outNorm = getNorm(m_keyframe.m_speedOut); if (m_kIndex + 1 == m_param->getKeyframeCount() || isSpeedInOut(m_kIndex) || - (m_keyframe.m_type == TDoubleKeyframe::Expression && m_keyframe.m_expressionText.find("cycle") != string::npos)) { + (m_keyframe.m_type == TDoubleKeyframe::Expression && m_keyframe.m_expressionText.find("cycle") != std::string::npos)) { // update next segment speed vector double inNorm = getNorm(m_keyframe.m_speedIn); if (inNorm < eps) diff --git a/toonz/sources/toonzlib/dpiscale.cpp b/toonz/sources/toonzlib/dpiscale.cpp index efe69ad..5f40aa6 100644 --- a/toonz/sources/toonzlib/dpiscale.cpp +++ b/toonz/sources/toonzlib/dpiscale.cpp @@ -27,7 +27,7 @@ TAffine getDpiAffine(TXshSimpleLevel *level, LevelProperties *prop = level->getProperties(); TAffine aff; - string imageId = level->getImageId(fid); + std::string imageId = level->getImageId(fid); int frameStatus = level->getFrameStatus(fid); if (frameStatus & TXshSimpleLevel::CleanupPreview) { TRasterImageP ri = TImageCache::instance()->get(imageId, false); diff --git a/toonz/sources/toonzlib/fill.cpp b/toonz/sources/toonzlib/fill.cpp index 3f504a8..96c59b1 100644 --- a/toonz/sources/toonzlib/fill.cpp +++ b/toonz/sources/toonzlib/fill.cpp @@ -218,10 +218,10 @@ inline int threshMatte(int matte, int fillDepth) //----------------------------------------------------------------------------- -bool isPixelInSegment(const vector> &segments, int x) +bool isPixelInSegment(const std::vector> &segments, int x) { for (int i = 0; i < (int)segments.size(); i++) { - pair segment = segments[i]; + std::pair segment = segments[i]; if (segment.first <= x && x <= segment.second) return true; } @@ -230,10 +230,10 @@ bool isPixelInSegment(const vector> &segments, int x) //----------------------------------------------------------------------------- -void insertSegment(vector> &segments, const pair segment) +void insertSegment(std::vector> &segments, const std::pair segment) { for (int i = segments.size() - 1; i >= 0; i--) { - pair app = segments[i]; + std::pair app = segments[i]; if (segment.first <= app.first && app.second <= segment.second) segments.erase(segments.begin() + i); } @@ -403,7 +403,7 @@ void fill(const TRaster32P &ras, const TRaster32P &ref, const FillParameters &pa } std::stack seeds; - std::map>> segments; + std::map>> segments; //fillRow(r, params.m_p, xa, xb, color ,saver); findSegment(workRas, params.m_p, xa, xb, color); @@ -437,7 +437,7 @@ void fill(const TRaster32P &ras, const TRaster32P &ref, const FillParameters &pa if (*pix != color && !test && matte >= oldMatte && matte != 255) { findSegment(workRas, TPoint(x, y), xc, xd, color); //segments[y].push_back(std::pair(xc, xd)); - insertSegment(segments[y], pair(xc, xd)); + insertSegment(segments[y], std::pair(xc, xd)); if (xc < xa) seeds.push(FillSeed(xc, xa - 1, y, -dy)); if (xd > xb) @@ -462,14 +462,14 @@ void fill(const TRaster32P &ras, const TRaster32P &ref, const FillParameters &pa seeds.push(FillSeed(oldxc, oldxd, y, dy)); } - std::map>>::iterator it; + std::map>>::iterator it; for (it = segments.begin(); it != segments.end(); it++) { TPixel32 *line = ras->pixels(it->first); TPixel32 *refLine = 0; TPixel32 *refPix; if (ref) refLine = ref->pixels(it->first); - vector> segmentVector = it->second; + std::vector> segmentVector = it->second; for (int i = 0; i < (int)segmentVector.size(); i++) { std::pair segment = segmentVector[i]; if (segment.second >= segment.first) { diff --git a/toonz/sources/toonzlib/fillutil.cpp b/toonz/sources/toonzlib/fillutil.cpp index ce5a1ca..5cb5e51 100644 --- a/toonz/sources/toonzlib/fillutil.cpp +++ b/toonz/sources/toonzlib/fillutil.cpp @@ -21,7 +21,7 @@ namespace //----------------------------------------------------------------------------- void computeSeeds(const TRasterCM32P &r, TStroke *stroke, - vector> &seeds) + std::vector> &seeds) { int length = (int)stroke->getLength(); TRect bbox = r->getBounds(); @@ -48,7 +48,7 @@ void fillArea(const TRasterCM32P &ras, TRegion *r, int colorId, for (int i = bbox.y0; i <= bbox.y1; i++) { TPixelCM32 *line = ras->pixels(i); - vector intersections; + std::vector intersections; r->computeScanlineIntersections(i, intersections); assert(!(intersections.size() & 0x1)); @@ -71,7 +71,7 @@ void fillArea(const TRasterCM32P &ras, TRegion *r, int colorId, //----------------------------------------------------------------------------- -void restoreColors(const TRasterCM32P &r, const vector> &seeds) +void restoreColors(const TRasterCM32P &r, const std::vector> &seeds) { FillParameters params; for (UINT i = 0; i < seeds.size(); i++) { @@ -183,7 +183,7 @@ void AreaFiller::rectFill(const TRect &rect, int color, if (dx < 2 || dy < 2) //rect degenere(area contenuta nulla), skippo. return; - vector frameSeed(2 * (r.getLx() + r.getLy() - 2)); + std::vector frameSeed(2 * (r.getLx() + r.getLy() - 2)); int x, y, count1, count2; /*- ptrをRect範囲のスタート地点に移動 -*/ @@ -285,7 +285,7 @@ void AreaFiller::strokeFill(TStroke *stroke, int colorId, stroke->transform(TTranslation(convert(m_ras->getCenter()))); m_ras->lock(); - vector> seeds; + std::vector> seeds; computeSeeds(m_ras, stroke, seeds); TVectorImage app; diff --git a/toonz/sources/toonzlib/fxcommand.cpp b/toonz/sources/toonzlib/fxcommand.cpp index 5f1b248..299ffbd 100644 --- a/toonz/sources/toonzlib/fxcommand.cpp +++ b/toonz/sources/toonzlib/fxcommand.cpp @@ -289,7 +289,7 @@ public: protected: static TXshZeraryFxColumn *createZeraryFxColumn(TXsheet *xsh, TFx *zfx, int row = 0); - static void cloneGroupStack(const QStack &groupIds, const QStack &groupNames, TFx *toFx); + static void cloneGroupStack(const QStack &groupIds, const QStack &groupNames, TFx *toFx); static void cloneGroupStack(TFx *fromFx, TFx *toFx); static void copyGroupEditLevel(int editGroupId, TFx *toFx); static void copyGroupEditLevel(TFx *fromFx, TFx *toFx); @@ -329,7 +329,7 @@ TXshZeraryFxColumn *FxCommandUndo::createZeraryFxColumn(TXsheet *xsh, TFx *zfx, //------------------------------------------------------ void FxCommandUndo::cloneGroupStack( - const QStack &groupIds, const QStack &groupNames, TFx *toFx) + const QStack &groupIds, const QStack &groupNames, TFx *toFx) { toFx->getAttributes()->removeFromAllGroup(); @@ -1483,7 +1483,7 @@ void MakeMacroUndo::redo() const rootFx->getOutputConnection(p)->setFx(macroFx); // Remove the macro's internal fxs from the scene - const vector &fxs = macroFx->getFxs(); + const std::vector &fxs = macroFx->getFxs(); size_t f, fCount = fxs.size(); for (f = 0; f != fCount; ++f) @@ -1522,7 +1522,7 @@ void MakeMacroUndo::undo() const ::removeFxFromCurrentScene(macroFx, xsh); // Re-insert the macro's internal fxs and restore ports ownership - const vector &fxs = macroFx->getFxs(); + const std::vector &fxs = macroFx->getFxs(); size_t f, fCount = fxs.size(); for (f = 0; f != fCount; ++f) { @@ -2978,7 +2978,7 @@ class UndoReplacePasteFxs : public UndoAddPasteFxs TFx *m_fx, *m_rightmostFx; public: - UndoReplacePasteFxs(TFx *fx, const std::list &fxs, const map &zeraryFxColumnSize, + UndoReplacePasteFxs(TFx *fx, const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, TXsheetHandle *xshHandle, TFxHandle *fxHandle) : UndoAddPasteFxs(inFx(fx), fxs, zeraryFxColumnSize, columns, xshHandle, fxHandle), m_deleteFxUndo(new DeleteFxOrColumnUndo(fx, xshHandle, fxHandle)), m_fx(fx), m_rightmostFx() { @@ -3075,7 +3075,7 @@ void UndoReplacePasteFxs::undo() const //============================================================= -void TFxCommand::replacePasteFxs(TFx *inFx, const std::list &fxs, const map &zeraryFxColumnSize, +void TFxCommand::replacePasteFxs(TFx *inFx, const std::list &fxs, const std::map &zeraryFxColumnSize, const std::list &columns, TXsheetHandle *xshHandle, TFxHandle *fxHandle) { std::auto_ptr undo(new UndoReplacePasteFxs(inFx, fxs, zeraryFxColumnSize, columns, xshHandle, fxHandle)); @@ -3293,7 +3293,7 @@ private: struct UndoConnectFxs::GroupData { TFx *m_fx; QStack m_groupIds; - QStack m_groupNames; + QStack m_groupNames; int m_editingGroup; public: diff --git a/toonz/sources/toonzlib/fxdag.cpp b/toonz/sources/toonzlib/fxdag.cpp index bdf9196..5030fe6 100644 --- a/toonz/sources/toonzlib/fxdag.cpp +++ b/toonz/sources/toonzlib/fxdag.cpp @@ -164,12 +164,12 @@ void FxDag::assignUniqueId(TFx *fx) } }; // locals - string type = fx->getFxType(); + std::string type = fx->getFxType(); int count = ++m_typeTable[type]; fx->getAttributes()->setId(count); - wstring name = TStringTable::translate(type); + std::wstring name = TStringTable::translate(type); locals::eraseNonAlnums(name); // fx ids are used as XML tag names - thus, we'll restrict // the char set to alnums. Specifically, '/' must be ruled out. // E.g.: "Erode/Dilate 1" must become "ErodeDilate1" @@ -183,9 +183,9 @@ void FxDag::assignUniqueId(TFx *fx) //------------------------------------------------------------------- -TFx *FxDag::getFxById(wstring id) const +TFx *FxDag::getFxById(std::wstring id) const { - std::map::const_iterator it = m_idTable.find(id); + std::map::const_iterator it = m_idTable.find(id); if (it == m_idTable.end()) return 0; else @@ -195,7 +195,7 @@ TFx *FxDag::getFxById(wstring id) const void FxDag::updateFxTypeTable(TFx *fx, int value) { - string type = fx->getFxType(); + std::string type = fx->getFxType(); m_typeTable[type] = value; } @@ -210,8 +210,8 @@ void FxDag::updateFxIdTable(TFx *fx) int FxDag::getFxTypeCount(TFx *fx) { - string type = fx->getFxType(); - std::map::iterator it = m_typeTable.find(type); + std::string type = fx->getFxType(); + std::map::iterator it = m_typeTable.find(type); if (it == m_typeTable.end()) return 0; return it->second; @@ -219,7 +219,7 @@ int FxDag::getFxTypeCount(TFx *fx) //------------------------------------------------------------------- -void FxDag::getFxs(vector &fxs) const +void FxDag::getFxs(std::vector &fxs) const { std::set fxSet; getInternalFxs()->getFxs(fxSet); @@ -306,7 +306,7 @@ void FxDag::loadData(TIStream &is) for (k = 0; k < (int)m_outputFxs.size(); k++) m_outputFxs[k]->release(); m_outputFxs.clear(); - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "terminal") { TFxSet *fxSet = getTerminalFxs(); @@ -319,7 +319,7 @@ void FxDag::loadData(TIStream &is) if (TZeraryColumnFx *zfx = dynamic_cast(fx)) fx = zfx->getZeraryFx(); if (tnzVersion < VersionNumber(1, 16)) { - wstring app = fx->getName(); + std::wstring app = fx->getName(); assignUniqueId(fx); fx->setName(app); continue; @@ -329,7 +329,7 @@ void FxDag::loadData(TIStream &is) updateFxTypeTable(fx, maxFxTypeId); TMacroFx *macroFx = dynamic_cast(fx); if (macroFx) { - vector fxs = macroFx->getFxs(); + std::vector fxs = macroFx->getFxs(); int j; for (j = 0; j < (int)fxs.size(); j++) { TFxP inMacroFx = fxs[j]; @@ -351,7 +351,7 @@ void FxDag::loadData(TIStream &is) if (TZeraryColumnFx *zfx = dynamic_cast(fx)) fx = zfx->getZeraryFx(); if (tnzVersion < VersionNumber(1, 16)) { - wstring app = fx->getName(); + std::wstring app = fx->getName(); assignUniqueId(fx); fx->setName(app); continue; diff --git a/toonz/sources/toonzlib/hook.cpp b/toonz/sources/toonzlib/hook.cpp index 6b04694..769e149 100644 --- a/toonz/sources/toonzlib/hook.cpp +++ b/toonz/sources/toonzlib/hook.cpp @@ -195,7 +195,7 @@ void Hook::saveData(TOStream &os) void Hook::loadData(TIStream &is) { m_frames.clear(); - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "frame") { Frame f; @@ -402,7 +402,7 @@ void HookSet::saveData(TOStream &os) void HookSet::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "hook") { Hook *hook = new Hook(); @@ -522,7 +522,7 @@ void TrackerObjectsSet::clearAll() //========================================================= -string getHookName(int code) +std::string getHookName(int code) { assert(0 <= code && code < 10); if (code == 0) diff --git a/toonz/sources/toonzlib/imagelocation.cpp b/toonz/sources/toonzlib/imagelocation.cpp index 403f69b..440e4f7 100644 --- a/toonz/sources/toonzlib/imagelocation.cpp +++ b/toonz/sources/toonzlib/imagelocation.cpp @@ -41,7 +41,7 @@ TImageLocation::TImageLocation(TStageObjectSpline *spline) { } -TImageLocation::TImageLocation(wstring levelName, const TFrameId &fid) +TImageLocation::TImageLocation(std::wstring levelName, const TFrameId &fid) : m_row(0), m_col(0), m_fid(fid), m_spline(0), m_levelName(levelName), m_type(LevelStripImage) { } diff --git a/toonz/sources/toonzlib/imagemanager.cpp b/toonz/sources/toonzlib/imagemanager.cpp index a5bdbc4..1a728fd 100644 --- a/toonz/sources/toonzlib/imagemanager.cpp +++ b/toonz/sources/toonzlib/imagemanager.cpp @@ -160,7 +160,7 @@ bool ImageBuilder::setImageInfo(TImageInfo &info, TImageReader *ir) struct ImageManager::Imp { QReadWriteLock m_tableLock; //!< Lock for the builders table - std::map m_builders; //!< identifier -> ImageBuilder table + std::map m_builders; //!< identifier -> ImageBuilder table public: Imp() : m_tableLock(QReadWriteLock::Recursive) {} @@ -194,7 +194,7 @@ ImageManager *ImageManager::instance() //----------------------------------------------------------------------------- -void ImageManager::bind(const string &id, ImageBuilder *builderPtr) +void ImageManager::bind(const std::string &id, ImageBuilder *builderPtr) { if (!builderPtr) { unbind(id); @@ -212,7 +212,7 @@ void ImageManager::bind(const string &id, ImageBuilder *builderPtr) //----------------------------------------------------------------------------- -bool ImageManager::unbind(const string &id) +bool ImageManager::unbind(const std::string &id) { QWriteLocker locker(&m_imp->m_tableLock); @@ -230,7 +230,7 @@ bool ImageManager::unbind(const string &id) //----------------------------------------------------------------------------- -bool ImageManager::isBound(const string &id) const +bool ImageManager::isBound(const std::string &id) const { QReadLocker locker(&m_imp->m_tableLock); return m_imp->m_builders.find(id) != m_imp->m_builders.end(); @@ -238,11 +238,11 @@ bool ImageManager::isBound(const string &id) const //----------------------------------------------------------------------------- -bool ImageManager::rebind(const string &srcId, const string &dstId) +bool ImageManager::rebind(const std::string &srcId, const std::string &dstId) { QWriteLocker locker(&m_imp->m_tableLock); - std::map::iterator st = m_imp->m_builders.find(srcId); + std::map::iterator st = m_imp->m_builders.find(srcId); if (st == m_imp->m_builders.end()) return false; @@ -268,12 +268,12 @@ void ImageManager::clear() //----------------------------------------------------------------------------- -TImageInfo *ImageManager::getInfo(const string &id, int imFlags, void *extData) +TImageInfo *ImageManager::getInfo(const std::string &id, int imFlags, void *extData) { // Lock for table read and try to find data in the cache QReadLocker tableLocker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); if (it == m_imp->m_builders.end()) return 0; @@ -302,7 +302,7 @@ TImageInfo *ImageManager::getInfo(const string &id, int imFlags, void *extData) //----------------------------------------------------------------------------- -TImageP ImageManager::getImage(const string &id, int imFlags, void *extData) +TImageP ImageManager::getImage(const std::string &id, int imFlags, void *extData) { assert(!((imFlags & ImageManager::toBeModified) && (imFlags & ImageManager::dontPutInCache))); assert(!((imFlags & ImageManager::toBeModified) && (imFlags & ImageManager::toBeSaved))); @@ -310,7 +310,7 @@ TImageP ImageManager::getImage(const string &id, int imFlags, void *extData) // Lock for table read and try to find data in the cache QReadLocker tableLocker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); if (it == m_imp->m_builders.end()) return TImageP(); @@ -373,7 +373,7 @@ TImageP ImageManager::getImage(const string &id, int imFlags, void *extData) //----------------------------------------------------------------------------- // load icon (and image) data of all frames into cache -void ImageManager::loadAllTlvIconsAndPutInCache(TXshSimpleLevel *level, vector fids, vector iconIds, bool cacheImagesAsWell) +void ImageManager::loadAllTlvIconsAndPutInCache(TXshSimpleLevel *level, std::vector fids, std::vector iconIds, bool cacheImagesAsWell) { if (fids.empty() || iconIds.empty()) return; @@ -383,7 +383,7 @@ void ImageManager::loadAllTlvIconsAndPutInCache(TXshSimpleLevel *level, vector::iterator it = m_imp->m_builders.find(level->getImageId(fids[0])); + std::map::iterator it = m_imp->m_builders.find(level->getImageId(fids[0])); if (it != m_imp->m_builders.end()) { const ImageBuilderP &builder = it->second; assert(builder); @@ -401,7 +401,7 @@ void ImageManager::loadAllTlvIconsAndPutInCache(TXshSimpleLevel *level, vector::iterator it = m_imp->m_builders.find(level->getImageId(fids[f])); + std::map::iterator it = m_imp->m_builders.find(level->getImageId(fids[f])); if (it != m_imp->m_builders.end()) { const ImageBuilderP &builder = it->second; builder->setImageCachedAndModified(); @@ -413,11 +413,11 @@ void ImageManager::loadAllTlvIconsAndPutInCache(TXshSimpleLevel *level, vectorm_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); if (it == m_imp->m_builders.end()) return false; @@ -433,14 +433,14 @@ bool ImageManager::invalidate(const string &id) //----------------------------------------------------------------------------- -bool ImageManager::setImage(const string &id, const TImageP &img) +bool ImageManager::setImage(const std::string &id, const TImageP &img) { if (!img) return invalidate(id); QWriteLocker locker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); if (it == m_imp->m_builders.end()) return false; @@ -457,30 +457,30 @@ bool ImageManager::setImage(const string &id, const TImageP &img) //----------------------------------------------------------------------------- -ImageBuilder *ImageManager::getBuilder(const string &id) +ImageBuilder *ImageManager::getBuilder(const std::string &id) { QWriteLocker locker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); return (it == m_imp->m_builders.end()) ? (ImageBuilder *)0 : it->second.getPointer(); } //----------------------------------------------------------------------------- -bool ImageManager::isCached(const string &id) +bool ImageManager::isCached(const std::string &id) { QWriteLocker locker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); return (it == m_imp->m_builders.end()) ? false : it->second->m_cached; } //----------------------------------------------------------------------------- -bool ImageManager::isModified(const string &id) +bool ImageManager::isModified(const std::string &id) { QWriteLocker locker(&m_imp->m_tableLock); - std::map::iterator it = m_imp->m_builders.find(id); + std::map::iterator it = m_imp->m_builders.find(id); return (it == m_imp->m_builders.end()) ? false : it->second->m_modified; } diff --git a/toonz/sources/toonzlib/imagestyles.cpp b/toonz/sources/toonzlib/imagestyles.cpp index 4d84146..c8d49d6 100644 --- a/toonz/sources/toonzlib/imagestyles.cpp +++ b/toonz/sources/toonzlib/imagestyles.cpp @@ -40,7 +40,7 @@ PointPair computeTexParameters(const TPointD &p1, // texture points static PointPair tex; - // set std::vector of movement + // set vector of movement TPointD v = (newP.first + newP.second) * 0.5 - (p2 + p1) * 0.5; // compute length of opposite segment @@ -192,7 +192,7 @@ void TTextureStyle::computeOutline(const TStroke *stroke, TOutlineUtil::OutlineParameter param) const { TOutlineStyle::computeOutline(stroke, outline, param); - vector &v = outline.getArray(); + std::vector &v = outline.getArray(); PointPair newPnt; TDimension size = m_texture->getSize(); UINT i = 0; @@ -235,7 +235,7 @@ void TTextureStyle::drawStroke(const TColorFunction *cf, TStrokeOutline *outline UINT i; - vector &v = outline->getArray(); + std::vector &v = outline->getArray(); if (v.empty()) return; @@ -807,7 +807,7 @@ void TTextureStyle::loadData(TInputStreamInterface &is) return; } - string path; + std::string path; is >> path; m_texturePath = TFilePath(path); @@ -844,8 +844,8 @@ void TTextureStyle::saveData(TOutputStreamInterface &os) const { //TOutlineStyle::saveData(os); //os << m_texture; - wstring wstr = m_texturePath.getWideString(); - string str; + std::wstring wstr = m_texturePath.getWideString(); + std::string str; str.assign(wstr.begin(), wstr.end()); os << str; diff --git a/toonz/sources/toonzlib/levelset.cpp b/toonz/sources/toonzlib/levelset.cpp index 7885b66..9658954 100644 --- a/toonz/sources/toonzlib/levelset.cpp +++ b/toonz/sources/toonzlib/levelset.cpp @@ -106,7 +106,7 @@ TXshLevel *TLevelSet::getLevel(int index) const TXshLevel *TLevelSet::getLevel(const std::wstring &levelName) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_levelTable.find(levelName); if (it == m_levelTable.end()) return 0; @@ -132,7 +132,7 @@ TXshLevel *TLevelSet::getLevel(const ToonzScene &scene, const TFilePath &levelPa //----------------------------------------------------------------------------- -bool TLevelSet::hasLevel(const wstring &levelName) const +bool TLevelSet::hasLevel(const std::wstring &levelName) const { std::vector::const_iterator it = m_levels.begin(); for (it; it != m_levels.end(); it++) { @@ -161,7 +161,7 @@ void TLevelSet::listLevels(std::vector &levels) const bool TLevelSet::insertLevel(TXshLevel *xl) { - std::map::const_iterator it; + std::map::const_iterator it; it = m_levelTable.find(xl->getName()); if (it != m_levelTable.end() && it->second == xl) return it->second == xl; @@ -295,7 +295,7 @@ void TLevelSet::moveLevelToFolder(const TFilePath &fp, TXshLevel *level) void TLevelSet::saveFolder(TOStream &os, TFilePath folder) { - std::map attr; + std::map attr; attr["name"] = folder.getName(); if (folder == getDefaultFolder()) attr["type"] = "default"; @@ -322,12 +322,12 @@ void TLevelSet::saveFolder(TOStream &os, TFilePath folder) void TLevelSet::loadFolder(TIStream &is, TFilePath folder) { - string s; + std::string s; is.getTagParam("type", s); if (s == "default") setDefaultFolder(folder); while (!is.eos()) { - string tagName; + std::string tagName; is.matchTag(tagName); if (tagName == "levels") { while (!is.eos()) { @@ -338,7 +338,6 @@ void TLevelSet::loadFolder(TIStream &is, TFilePath folder) moveLevelToFolder(folder, xshLevel); } } else if (tagName == "folder") { - string s; is.getTagParam("name", s); TFilePath child = createFolder(folder, toWideString(s)); loadFolder(is, child); @@ -354,7 +353,7 @@ void TLevelSet::loadData(TIStream &is) { int folderCount = 1; while (!is.eos()) { - string tagName; + std::string tagName; if (is.matchTag(tagName)) { if (tagName == "levels") { while (!is.eos()) { @@ -366,7 +365,7 @@ void TLevelSet::loadData(TIStream &is) } } } else if (tagName == "folder") { - string name = toString(defaultRootFolder.getWideString()); + std::string name = toString(defaultRootFolder.getWideString()); is.getTagParam("name", name); TFilePath folder(name); if (folderCount == 1) diff --git a/toonz/sources/toonzlib/logger.cpp b/toonz/sources/toonzlib/logger.cpp index fc8573d..8671d5f 100644 --- a/toonz/sources/toonzlib/logger.cpp +++ b/toonz/sources/toonzlib/logger.cpp @@ -12,7 +12,7 @@ Logger *Logger::instance() return &_instance; } -void Logger::add(wstring s) +void Logger::add(std::wstring s) { m_rows.push_back(s); for (int i = 0; i < (int)m_listeners.size(); i++) @@ -29,7 +29,7 @@ int Logger::getRowCount() const return m_rows.size(); } -wstring Logger::getRow(int i) const +std::wstring Logger::getRow(int i) const { if (0 <= i && i < (int)m_rows.size()) return m_rows[i]; diff --git a/toonz/sources/toonzlib/movierenderer.cpp b/toonz/sources/toonzlib/movierenderer.cpp index 8511636..85a1204 100644 --- a/toonz/sources/toonzlib/movierenderer.cpp +++ b/toonz/sources/toonzlib/movierenderer.cpp @@ -113,7 +113,7 @@ public: TSoundTrackP m_st; std::map> m_toBeSaved; - std::vector> m_framesToBeRendered; + std::vector> m_framesToBeRendered; std::string m_renderCacheId; /*--- 同じラスタのキャッシュを使いまわすとき、 最初のものだけガンマをかけ、以降はそれを使いまわすようにする。 diff --git a/toonz/sources/toonzlib/multimediarenderer.cpp b/toonz/sources/toonzlib/multimediarenderer.cpp index 6ec4db5..d54fe3c 100644 --- a/toonz/sources/toonzlib/multimediarenderer.cpp +++ b/toonz/sources/toonzlib/multimediarenderer.cpp @@ -24,15 +24,15 @@ namespace { -wstring removeSpaces(const wstring &str) + std::wstring removeSpaces(const std::wstring &str) { - wstring result; - wstring::size_type a = 0, b; - while ((b = str.find_first_of(L" ", a)) != wstring::npos) { + std::wstring result; + std::wstring::size_type a = 0, b; + while ((b = str.find_first_of(L" ", a)) != std::wstring::npos) { result += str.substr(a, b - a); a = b + 1; } - result += str.substr(a, wstring::npos); + result += str.substr(a, std::wstring::npos); return result; } } @@ -58,7 +58,7 @@ public: TRenderSettings m_renderSettings; - vector m_listeners; + std::vector m_listeners; bool m_precomputingEnabled; bool m_canceled; @@ -281,7 +281,7 @@ void MultimediaRenderer::Imp::start() double timeStretchFactor = stretchFrom / stretchTo; bool fieldRendering = m_renderSettings.m_fieldPrevalence != TRenderSettings::NoField; - wstring modeStr; + std::wstring modeStr; switch (m_multimediaMode) { case COLUMNS: modeStr = L"_col"; @@ -356,13 +356,13 @@ void MultimediaRenderer::Imp::start() continue; int columnIndex = colFx->getColumnIndex(); - wstring columnName(colFx->getColumnName()); - wstring columnId(colFx->getColumnId()); - wstring fxName(currFx->getName()); - wstring fxNameNoSpaces(::removeSpaces(fxName)); - wstring fxId(currFx->getFxId()); + std::wstring columnName(colFx->getColumnName()); + std::wstring columnId(colFx->getColumnId()); + std::wstring fxName(currFx->getName()); + std::wstring fxNameNoSpaces(::removeSpaces(fxName)); + std::wstring fxId(currFx->getFxId()); - wstring fpName = m_fp.getWideName() + + std::wstring fpName = m_fp.getWideName() + L"_" + columnName + (columnId == columnName ? L"" : L"(" + columnId + L")") + (fxId.empty() ? L"" : L"_" + fxName + (fxId == fxNameNoSpaces ? L"" : L"(" + fxId + L")")); //+ modeStr + toWideString(columnIndex+1); diff --git a/toonz/sources/toonzlib/namebuilder.cpp b/toonz/sources/toonzlib/namebuilder.cpp index eaff35e..20fbb0d 100644 --- a/toonz/sources/toonzlib/namebuilder.cpp +++ b/toonz/sources/toonzlib/namebuilder.cpp @@ -5,7 +5,7 @@ //------------------------------------------------------------------- -NameBuilder *NameBuilder::getBuilder(wstring levelName) +NameBuilder *NameBuilder::getBuilder(std::wstring levelName) { if (levelName == L"") return new NameCreator(); @@ -15,7 +15,7 @@ NameBuilder *NameBuilder::getBuilder(wstring levelName) //------------------------------------------------------------------- -wstring NameCreator::getNext() +std::wstring NameCreator::getNext() { if (m_s.empty()) { m_s.push_back(0); @@ -34,7 +34,7 @@ wstring NameCreator::getNext() n++; m_s.push_back(0); } - wstring s; + std::wstring s; for (i = n - 1; i >= 0; i--) s.append(1, (wchar_t)(L'A' + m_s[i])); return s; @@ -42,11 +42,11 @@ wstring NameCreator::getNext() //------------------------------------------------------------------- -NameModifier::NameModifier(wstring name) +NameModifier::NameModifier(std::wstring name) : m_nameBase(name), m_index(0) { int j = name.find_last_not_of(L"0123456789"); - if (j != (int)wstring::npos && + if (j != (int)std::wstring::npos && j + 1 < (int)name.length() && name[j] == '_') { m_index = toInt(name.substr(j + 1)); @@ -56,7 +56,7 @@ NameModifier::NameModifier(wstring name) //------------------------------------------------------------------- -wstring NameModifier::getNext() +std::wstring NameModifier::getNext() { int index = m_index++; if (index < 1) diff --git a/toonz/sources/toonzlib/onionskinmask.cpp b/toonz/sources/toonzlib/onionskinmask.cpp index fecbd22..a6c9e23 100644 --- a/toonz/sources/toonzlib/onionskinmask.cpp +++ b/toonz/sources/toonzlib/onionskinmask.cpp @@ -73,7 +73,7 @@ void OnionSkinMask::clear() //------------------------------------------------------------------- -void OnionSkinMask::getAll(int currentRow, vector &output) const +void OnionSkinMask::getAll(int currentRow, std::vector &output) const { output.clear(); output.reserve(m_fos.size() + m_mos.size()); diff --git a/toonz/sources/toonzlib/outputproperties.cpp b/toonz/sources/toonzlib/outputproperties.cpp index ac3816a..0ad2372 100644 --- a/toonz/sources/toonzlib/outputproperties.cpp +++ b/toonz/sources/toonzlib/outputproperties.cpp @@ -38,7 +38,7 @@ TOutputProperties::TOutputProperties() TOutputProperties::TOutputProperties(const TOutputProperties &src) : m_path(src.m_path), m_formatProperties(src.m_formatProperties), m_renderSettings(new TRenderSettings(*src.m_renderSettings)), m_frameRate(src.m_frameRate), m_from(src.m_from), m_to(src.m_to), m_whichLevels(src.m_whichLevels), m_offset(src.m_offset), m_step(src.m_step), m_multimediaRendering(src.m_multimediaRendering), m_maxTileSizeIndex(src.m_maxTileSizeIndex), m_threadIndex(src.m_threadIndex), m_subcameraPreview(src.m_subcameraPreview) { - std::map::iterator ft, fEnd = m_formatProperties.end(); + std::map::iterator ft, fEnd = m_formatProperties.end(); for (ft = m_formatProperties.begin(); ft != fEnd; ++ft) { if (ft->second) ft->second = ft->second->clone(); @@ -78,7 +78,7 @@ TOutputProperties &TOutputProperties::operator=(const TOutputProperties &src) std::for_each(m_formatProperties.begin(), m_formatProperties.end(), ::deleteValue); - std::map::const_iterator sft, sfEnd = src.m_formatProperties.end(); + std::map::const_iterator sft, sfEnd = src.m_formatProperties.end(); for (sft = src.m_formatProperties.end(); sft != sfEnd; ++sft) m_formatProperties[sft->first] = sft->second->clone(); @@ -141,9 +141,9 @@ void TOutputProperties::setFrameRate(double fps) //------------------------------------------------------------------- -TPropertyGroup *TOutputProperties::getFileFormatProperties(string ext) +TPropertyGroup *TOutputProperties::getFileFormatProperties(std::string ext) { - std::map::const_iterator it; + std::map::const_iterator it; it = m_formatProperties.find(ext); if (it == m_formatProperties.end()) { TPropertyGroup *ret = Tiio::makeWriterProperties(ext); @@ -155,10 +155,10 @@ TPropertyGroup *TOutputProperties::getFileFormatProperties(string ext) //------------------------------------------------------------------- -void TOutputProperties::getFileFormatPropertiesExtensions(std::vector &v) const +void TOutputProperties::getFileFormatPropertiesExtensions(std::vector &v) const { v.reserve(m_formatProperties.size()); - std::map::const_iterator it; + std::map::const_iterator it; for (it = m_formatProperties.begin(); it != m_formatProperties.end(); ++it) v.push_back(it->first); } diff --git a/toonz/sources/toonzlib/palettecmd.cpp b/toonz/sources/toonzlib/palettecmd.cpp index e1f7995..6137c46 100644 --- a/toonz/sources/toonzlib/palettecmd.cpp +++ b/toonz/sources/toonzlib/palettecmd.cpp @@ -126,7 +126,7 @@ bool isStyleUsed(const TToonzImageP vi, int styleId) //------------------------------------------------------------------- /*! Return true if one style is used. */ -bool areStylesUsed(const TImageP image, const vector styleIds) +bool areStylesUsed(const TImageP image, const std::vector styleIds) { int j; for (j = 0; j < (int)styleIds.size(); j++) @@ -153,12 +153,12 @@ bool isStyleUsed(const TImageP image, int styleId) //=================================================================== /*! Return true if one style is used. */ -bool areStylesUsed(const set levels, const vector styleIds) +bool areStylesUsed(const set levels, const std::vector styleIds) { set::const_iterator it = levels.begin(); for (it; it != levels.end(); it++) { TXshSimpleLevel *level = *it; - vector fids; + std::vector fids; level->getFids(fids); int i; for (i = 0; i < (int)fids.size(); i++) { @@ -405,7 +405,7 @@ void PaletteCmd::createStyle( /*- StudioPalette上でStyleを追加した場合、GlobalNameを自動で割り振る -*/ if (palette->getGlobalName() != L"") { TColorStyle *cs = palette->getStyle(newStyleId); - wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(newStyleId); + std::wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(newStyleId); cs->setGlobalName(gname); } @@ -536,12 +536,12 @@ void PaletteCmd::addStyles(TPaletteHandle *paletteHandle, int pageIndex, namespace { -void eraseStylesInLevels(const set &levels, const vector styleIds) +void eraseStylesInLevels(const set &levels, const std::vector styleIds) { set::const_iterator it = levels.begin(); for (it; it != levels.end(); it++) { TXshSimpleLevel *level = *it; - vector fids; + std::vector fids; level->getFids(fids); int i; for (i = 0; i < (int)fids.size(); i++) { @@ -662,7 +662,7 @@ class AddPageUndo : public TUndo TPaletteHandle *m_paletteHandle; TPaletteP m_palette; int m_pageIndex; - wstring m_pageName; + std::wstring m_pageName; std::vector> m_styles; public: @@ -670,7 +670,7 @@ public: AddPageUndo( TPaletteHandle *paletteHandle, int pageIndex, - wstring pageName) + std::wstring pageName) : m_paletteHandle(paletteHandle), m_pageIndex(pageIndex), m_pageName(pageName) { m_palette = m_paletteHandle->getPalette(); @@ -727,7 +727,7 @@ public: //----------------------------------------------------------------------------- -void PaletteCmd::addPage(TPaletteHandle *paletteHandle, wstring name, bool withUndo) +void PaletteCmd::addPage(TPaletteHandle *paletteHandle, std::wstring name, bool withUndo) { TPalette *palette = paletteHandle->getPalette(); if (name == L"") @@ -753,7 +753,7 @@ class DestroyPageUndo : public TUndo TPaletteHandle *m_paletteHandle; TPaletteP m_palette; int m_pageIndex; - wstring m_pageName; + std::wstring m_pageName; std::vector m_styles; public: diff --git a/toonz/sources/toonzlib/plasticdeformerfx.cpp b/toonz/sources/toonzlib/plasticdeformerfx.cpp index d8e7881..5ca4c79 100644 --- a/toonz/sources/toonzlib/plasticdeformerfx.cpp +++ b/toonz/sources/toonzlib/plasticdeformerfx.cpp @@ -130,7 +130,7 @@ bool PlasticDeformerFx::canHandle(const TRenderSettings &info, double frame) //----------------------------------------------------------------------------------- -string PlasticDeformerFx::getAlias(double frame, const TRenderSettings &info) const +std::string PlasticDeformerFx::getAlias(double frame, const TRenderSettings &info) const { std::string alias(getFxType()); alias += "["; diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp index b40c6be..9487332 100644 --- a/toonz/sources/toonzlib/preferences.cpp +++ b/toonz/sources/toonzlib/preferences.cpp @@ -845,7 +845,7 @@ void Preferences::setViewValues(int shrink, int step) //----------------------------------------------------------------- -void setCurrentUnits(string measureName, string units) +void setCurrentUnits(std::string measureName, std::string units) { TMeasure *m = TMeasureManager::instance()->get(measureName); if (!m) @@ -858,7 +858,7 @@ void setCurrentUnits(string measureName, string units) //----------------------------------------------------------------- -void Preferences::setUnits(string units) +void Preferences::setUnits(std::string units) { m_units = QString::fromStdString(units); m_settings->setValue("linearUnits", m_units); @@ -873,7 +873,7 @@ void Preferences::setUnits(string units) //----------------------------------------------------------------- -void Preferences::setCameraUnits(string units) +void Preferences::setCameraUnits(std::string units) { m_cameraUnits = QString::fromStdString(units); m_settings->setValue("cameraUnits", m_cameraUnits); @@ -882,7 +882,7 @@ void Preferences::setCameraUnits(string units) } //----------------------------------------------------------------- -void Preferences::setScanLevelType(string type) +void Preferences::setScanLevelType(std::string type) { m_scanLevelType = QString::fromStdString(type); m_settings->setValue("scanLevelType", m_scanLevelType); diff --git a/toonz/sources/toonzlib/rasterstrokegenerator.cpp b/toonz/sources/toonzlib/rasterstrokegenerator.cpp index 35f92f1..de8ddc0 100644 --- a/toonz/sources/toonzlib/rasterstrokegenerator.cpp +++ b/toonz/sources/toonzlib/rasterstrokegenerator.cpp @@ -37,7 +37,7 @@ bool RasterStrokeGenerator::add(const TThickPoint &p) //Disegna il tratto interamente void RasterStrokeGenerator::generateStroke(bool isPencil) const { - vector points(m_points); + std::vector points(m_points); int size = points.size(); //Prende un buffer trasparente di appoggio TRect box = getBBox(points); @@ -48,12 +48,12 @@ void RasterStrokeGenerator::generateStroke(bool isPencil) const //Trasla i punti secondo il nuovo sitema di riferimento translatePoints(points, newOrigin); - vector partialPoints; + std::vector partialPoints; if (size == 1) { rasterBrush(rasBuffer, points, m_styleId, !isPencil); placeOver(m_raster, rasBuffer, newOrigin); } else if (size <= 3) { - vector partialPoints; + std::vector partialPoints; partialPoints.push_back(points[0]); partialPoints.push_back(points[1]); rasterBrush(rasBuffer, partialPoints, m_styleId, !isPencil); @@ -61,7 +61,7 @@ void RasterStrokeGenerator::generateStroke(bool isPencil) const } else if (size % 2 == 1) /*-- 奇数の場合 --*/ { int strokeCount = (size - 1) / 2 - 1; - vector partialPoints; + std::vector partialPoints; partialPoints.push_back(points[0]); partialPoints.push_back(points[1]); rasterBrush(rasBuffer, partialPoints, m_styleId, !isPencil); @@ -79,14 +79,14 @@ void RasterStrokeGenerator::generateStroke(bool isPencil) const placeOver(m_raster, rasBuffer, newOrigin); } } else { - vector partialPoints; + std::vector partialPoints; partialPoints.push_back(points[0]); partialPoints.push_back(points[1]); rasterBrush(rasBuffer, partialPoints, m_styleId, !isPencil); placeOver(m_raster, rasBuffer, newOrigin); if (size > 2) { partialPoints.clear(); - vector::iterator it = points.begin(); + std::vector::iterator it = points.begin(); it++; partialPoints.insert(partialPoints.begin(), it, points.end()); rasterBrush(rasBuffer, partialPoints, m_styleId, !isPencil); @@ -99,7 +99,7 @@ void RasterStrokeGenerator::generateStroke(bool isPencil) const TRect RasterStrokeGenerator::generateLastPieceOfStroke(bool isPencil, bool closeStroke) { - vector points; + std::vector points; int size = m_points.size(); if (size == 3) { @@ -131,7 +131,7 @@ TRect RasterStrokeGenerator::generateLastPieceOfStroke(bool isPencil, bool close //----------------------------------------------------------- //Ritorna il rettangolo contenente i dischi generati con centri in "points" e diametro "points.thick" +3 pixel a bordo -TRect RasterStrokeGenerator::getBBox(const vector &points) const +TRect RasterStrokeGenerator::getBBox(const std::vector &points) const { double x0 = (std::numeric_limits::max)(), y0 = (std::numeric_limits::max)(), x1 = -(std::numeric_limits::max)(), y1 = -(std::numeric_limits::max)(); @@ -152,7 +152,7 @@ TRect RasterStrokeGenerator::getBBox(const vector &points) const //----------------------------------------------------------- //Ricalcola i punti in un nuovo sistema di riferimento -void RasterStrokeGenerator::translatePoints(vector &points, const TPoint &newOrigin) const +void RasterStrokeGenerator::translatePoints(std::vector &points, const TPoint &newOrigin) const { TPointD p(newOrigin.x, newOrigin.y); for (int i = 0; i < (int)points.size(); i++) @@ -303,7 +303,7 @@ void RasterStrokeGenerator::placeOver(const TRasterCM32P &out, const TRasterCM32 TRect RasterStrokeGenerator::getLastRect() const { - vector points; + std::vector points; int size = m_points.size(); if (size == 3) { diff --git a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h index e0ee507..c7d9525 100644 --- a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h +++ b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.h @@ -31,12 +31,12 @@ class CPatternPosition bool findEmptyPos(const int lX, const int lY, const UCHAR *lSel, int &xPos, int &yPos, SRECT &bb); void eraseCurrentArea(const int lX, const int lY, UCHAR *lSel, - vector &ddc, const int xx, const int yy); + std::vector &ddc, const int xx, const int yy); void sel0255To01(const int lX, const int lY, UCHAR *sel, SRECT &bb); - void prepareCircle(vector &v, const double r); + void prepareCircle(std::vector &v, const double r); public: - vector m_pos; + std::vector m_pos; CPatternPosition() : m_pos(0){}; virtual ~CPatternPosition(); @@ -66,7 +66,7 @@ public: template void drawTest(CSTColSelPic

&pic) { - for (vector::iterator pv = m_pos.begin(); + for (std::vector::iterator pv = m_pos.begin(); pv != m_pos.end(); pv++) { int xx = pv->x; diff --git a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h index 48cdd5a..922a9bc 100644 --- a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h +++ b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h @@ -177,7 +177,7 @@ public: return 0; } - int makeSelectionRGB(const vector &col, + int makeSelectionRGB(const std::vector &col, const double dA, const double dAB) { int nbCol; @@ -254,7 +254,7 @@ public: dp.m = (int)sp->m; } - int makeSelectionRGB1(const vector &col, const double dA) + int makeSelectionRGB1(const std::vector &col, const double dA) { P *pPic = CSTPic

::m_pic; UCHAR *pSel = m_sel; @@ -337,7 +337,7 @@ public: */ } - int makeSelectionRGB2(const vector &col, + int makeSelectionRGB2(const std::vector &col, const double dA, const double dAB) { P *pPic; @@ -370,7 +370,7 @@ public: return nbPixel; } - int makeSelectionRGB3(const vector &col, + int makeSelectionRGB3(const std::vector &col, const double dA, const double dAB) { P *pPic = CSTPic

::m_pic; @@ -407,7 +407,7 @@ public: return nbPixel; } - int makeSelectionRGBMore(const vector &col, + int makeSelectionRGBMore(const std::vector &col, const double dA, const double dAB) { int nbPixel = 0, i, j, k; @@ -420,7 +420,7 @@ public: return nbPixel; } - int makeSelectionRGBMore(const vector &col, + int makeSelectionRGBMore(const std::vector &col, const double dA, const double dAB, const int i, const int j, const int k) { diff --git a/toonz/sources/toonzlib/sandor_fxs/STPic.h b/toonz/sources/toonzlib/sandor_fxs/STPic.h index 3e1c3db..dc79993 100644 --- a/toonz/sources/toonzlib/sandor_fxs/STPic.h +++ b/toonz/sources/toonzlib/sandor_fxs/STPic.h @@ -53,7 +53,7 @@ typedef enum { template class CSTPic { - string m_cacheId; + std::string m_cacheId; TRasterImageP m_picP; public: diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h index a4cd93e..d44434e 100644 --- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h +++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h @@ -32,11 +32,11 @@ public: double m_dSample; int m_nbSample; double m_dA, m_dAB; - string m_name; + std::string m_name; bool m_isCM; // for RGBM color groups - vector m_color; + std::vector m_color; // for CMAP color indides COLOR_INDEX_LIST m_ink, m_paint; @@ -88,7 +88,7 @@ public: // void blurPixel(CSTColSelPic& pic, const int xx, const int yy, // const CBlurMatrix& bm, UC_PIXEL& col,const UCHAR osel); // bool isContourOnPath(const int xx, const int yy, - // vector::const_iterator pBS, + // std::vector::const_iterator pBS, // CSTColSelPic& pic); // void addPixel(I_PIXEL& p, const UC_PIXEL* pic); // void addPixel(I_PIXEL& p, const CSTColSelPic& pic, @@ -109,10 +109,10 @@ public: // Checks the path from blurred pixel to the sample pixel. template bool isContourOnPath(const int xx, const int yy, - vector::const_iterator pBS, + std::vector::const_iterator pBS, CSTColSelPic

&pic) { - for (vector::const_iterator p = pBS->begin(); + for (std::vector::const_iterator p = pBS->begin(); p != pBS->end(); ++p) { int x = xx + p->x; @@ -162,7 +162,7 @@ public: int nb = 0; int xxyy = yy * pic.m_lX + xx; - for (vector::const_iterator pBS = bm.m_m[iBm].begin(); + for (std::vector::const_iterator pBS = bm.m_m[iBm].begin(); pBS != bm.m_m[iBm].end(); ++pBS) { @@ -208,7 +208,7 @@ public: bool isRealMixture(CSTColSelPic

&pic, const int xx, const int yy, const CBlurMatrix &bm, const int iBm, const UCHAR osel) const { - for (vector::const_iterator pBS = bm.m_m[iBm].begin(); + for (std::vector::const_iterator pBS = bm.m_m[iBm].begin(); pBS != bm.m_m[iBm].end(); ++pBS) { // const SXYD* xyd= pBS->begin(); diff --git a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp index 0d8f851..561e569 100644 --- a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp @@ -43,7 +43,7 @@ const char *strsave(const char *t) void convertParam(double param[], const char *cParam[], int cParamLen) { - string app; + std::string app; for (int i = 1; i < 12; i++) { app = toString(param[i]); cParam[i] = strsave(app.c_str()); diff --git a/toonz/sources/toonzlib/scenefx.cpp b/toonz/sources/toonzlib/scenefx.cpp index 98b8a3c..347365d 100644 --- a/toonz/sources/toonzlib/scenefx.cpp +++ b/toonz/sources/toonzlib/scenefx.cpp @@ -85,7 +85,7 @@ public: bool canHandle(const TRenderSettings &info, double frame) { return true; } - string getPluginId() const { return string(); } + std::string getPluginId() const { return std::string(); } void compute(TFlash &flash, int frame) { @@ -114,7 +114,7 @@ public: return TRasterFxP(m_port.getFx())->doGetBBox(m_frame, bbox, info); } - string getAlias(double frame, const TRenderSettings &info) const + std::string getAlias(double frame, const TRenderSettings &info) const { return TRasterFx::getAlias(m_frame, info); } @@ -204,7 +204,7 @@ public: TAffine getParentPlacement(double frame) { return m_stageObject->getPlacement(frame); } - string getPluginId() const { return string(); } + std::string getPluginId() const { return std::string(); } private: // not implemented diff --git a/toonz/sources/toonzlib/sceneproperties.cpp b/toonz/sources/toonzlib/sceneproperties.cpp index 9d7afc3..4d05695 100644 --- a/toonz/sources/toonzlib/sceneproperties.cpp +++ b/toonz/sources/toonzlib/sceneproperties.cpp @@ -176,7 +176,7 @@ void TSceneProperties::saveData(TOStream &os) const for (i = 0; i < (int)outputs.size(); i++) { TOutputProperties &out = *outputs[i]; const TRenderSettings &rs = out.getRenderSettings(); - std::map attr; + std::map attr; attr["name"] = i == 0 ? "main" : "preview"; os.openChild("output", attr); @@ -272,13 +272,13 @@ void TSceneProperties::saveData(TOStream &os) const os.child("offset") << out.getOffset(); os.openChild("formatsProperties"); - std::vector fileExtensions; + std::vector fileExtensions; out.getFileFormatPropertiesExtensions(fileExtensions); for (int i = 0; i < (int)fileExtensions.size(); i++) { - string ext = fileExtensions[i]; + std::string ext = fileExtensions[i]; TPropertyGroup *pg = out.getFileFormatProperties(ext); assert(pg); - std::map attr; + std::map attr; attr["ext"] = ext; os.openChild("formatProperties", attr); pg->saveData(os); @@ -320,7 +320,7 @@ void TSceneProperties::loadData(TIStream &is, bool isLoadingProject) int globFrom = -1, globTo = 0, globStep = 1; double globFrameRate = -1; - string tagName; + std::string tagName; *m_outputProp = *m_previewProp = TOutputProperties(); while (is.matchTag(tagName)) { if (tagName == "projectPath") { @@ -355,7 +355,7 @@ void TSceneProperties::loadData(TIStream &is, bool isLoadingProject) } //back compatibility else if (tagName == "playrange") //back compatibility { - string dummy; + std::string dummy; is >> globFrom >> globTo >> dummy; } else if (tagName == "camera") //back compatibility with tab 2.2 { @@ -397,7 +397,7 @@ void TSceneProperties::loadData(TIStream &is, bool isLoadingProject) if (tagName == "output" || tagName == "outputStream") { TOutputProperties dummyOut; TOutputProperties *outPtr = &dummyOut; - string name = is.getTagAttribute("name"); + std::string name = is.getTagAttribute("name"); if (name == "preview") outPtr = m_previewProp; else if (name == "main") @@ -433,7 +433,7 @@ void TSceneProperties::loadData(TIStream &is, bool isLoadingProject) } else if (tagName == "path") { TFilePath fp; is >> fp; - string ext = fp.getUndottedType(); + std::string ext = fp.getUndottedType(); TPropertyGroup *pg = out.getFileFormatProperties(ext); if (ext == "avi" && pg->getPropertyCount() != 1) fp = fp.withType("tif"); @@ -543,13 +543,13 @@ void TSceneProperties::loadData(TIStream &is, bool isLoadingProject) TDimension d(0, 0); is >> d.lx >> d.ly; if (!is.eos()) { - string s; + std::string s; is >> s; } } else if (tagName == "formatsProperties") { while (is.matchTag(tagName)) { if (tagName == "formatProperties") { - string ext = is.getTagAttribute("ext"); + std::string ext = is.getTagAttribute("ext"); TPropertyGroup *pg = out.getFileFormatProperties(ext); if (ext == "avi") { diff --git a/toonz/sources/toonzlib/sceneresources.cpp b/toonz/sources/toonzlib/sceneresources.cpp index bea5d20..98d3758 100644 --- a/toonz/sources/toonzlib/sceneresources.cpp +++ b/toonz/sources/toonzlib/sceneresources.cpp @@ -30,7 +30,7 @@ bool changeSavePath(TFilePath &path, TFilePath oldSavePath, TFilePath newSavePat if (oldSavePath == newSavePath) return false; TFilePath fp = path.getParentDir(); - wstring head; + std::wstring head; TFilePath tail; fp.split(head, tail); if (head != L"" && tail == oldSavePath) { @@ -58,7 +58,7 @@ TFilePath restorePsdPath(const TFilePath &fp) bool makePathUnique(ToonzScene *scene, TFilePath &path) { - wstring name = path.getWideName(); + std::wstring name = path.getWideName(); int id = 2; int i = name.length() - 1; int num = 0, p = 1; @@ -145,7 +145,7 @@ TFilePath ResourceImportStrategy::process(ToonzScene *scene, ToonzScene *srcScen std::wstring levelName = srcPath.getWideName(); TLevelSet *parentLevelSet = scene->getLevelSet(); NameModifier nm(levelName); - wstring newName; + std::wstring newName; for (;;) { newName = nm.getNext(); if (!parentLevelSet->hasLevel(newName)) @@ -589,22 +589,22 @@ TFilePath ResourceImporter::codePath(const TFilePath &oldPath, const TFilePath & //----------------------------------------------------------------------------- -string ResourceImporter::extractPsdSuffix(TFilePath &path) +std::string ResourceImporter::extractPsdSuffix(TFilePath &path) { if (path.getType() != "psd") return ""; - string name = path.getName(); + std::string name = path.getName(); int i = name.find("#"); - if (i == string::npos) + if (i == std::string::npos) return ""; - string suffix = name.substr(i); + std::string suffix = name.substr(i); path = path.withName(name.substr(0, i)); return suffix; } //----------------------------------------------------------------------------- -TFilePath ResourceImporter::buildPsd(const TFilePath &basePath, const string &suffix) +TFilePath ResourceImporter::buildPsd(const TFilePath &basePath, const std::string &suffix) { return basePath.withName(basePath.getName() + suffix); } @@ -618,7 +618,7 @@ void ResourceImporter::process(TXshSimpleLevel *sl) TFilePath newPath; TFilePath slPath = sl->getPath(); - string suffix = extractPsdSuffix(slPath); + std::string suffix = extractPsdSuffix(slPath); TFilePath imgRefPath; if (sl->getPalette()) diff --git a/toonz/sources/toonzlib/screensavermaker.cpp b/toonz/sources/toonzlib/screensavermaker.cpp index 360aff8..fda2653 100644 --- a/toonz/sources/toonzlib/screensavermaker.cpp +++ b/toonz/sources/toonzlib/screensavermaker.cpp @@ -19,7 +19,7 @@ void makeScreenSaver( TFilePath scrFn, TFilePath swfFn, - string screenSaverName) + std::string screenSaverName) { struct _stat results; if (_wstat(swfFn.getWideString().c_str(), &results) != 0) @@ -36,7 +36,7 @@ void makeScreenSaver( TFilePath svscrn = TSystem::getBinDir() + "screensaver.dat"; if (!TFileStatus(svscrn).doesExist()) { throw TException( - wstring(L"Screensaver template not found: ") + + std::wstring(L"Screensaver template not found: ") + svscrn.getWideString()); } TSystem::copyFile(scrFn, svscrn); @@ -81,7 +81,7 @@ void previewScreenSaver(TFilePath scr) void installScreenSaver(TFilePath scr) { - wstring cmd = wstring(L"desk.cpl,InstallScreenSaver ") + scr.getWideString(); + std::wstring cmd = L"desk.cpl,InstallScreenSaver " + scr.getWideString(); int ret = (int) ShellExecuteW(0, L"open", L"rundll32.exe", cmd.c_str(), 0, SW_SHOWNORMAL); if (ret <= 32) @@ -93,7 +93,7 @@ void installScreenSaver(TFilePath scr) void makeScreenSaver( TFilePath scrFn, TFilePath swfFn, - string screenSaverName) + std::string screenSaverName) { } /* diff --git a/toonz/sources/toonzlib/scriptbinding_renderer.cpp b/toonz/sources/toonzlib/scriptbinding_renderer.cpp index 056d231..f7248c0 100644 --- a/toonz/sources/toonzlib/scriptbinding_renderer.cpp +++ b/toonz/sources/toonzlib/scriptbinding_renderer.cpp @@ -182,11 +182,11 @@ public: if (m_outputImage) m_outputImage->setImg(img); else if (m_outputLevel) { - std::vector ids; + std::vector ids; for (int i = 0; i < (int)renderData.m_frames.size(); i++) { TFrameId fid((int)(renderData.m_frames[i]) + 1); m_outputLevel->setFrame(fid, img); - string id = m_outputLevel->getSimpleLevel()->getImageId(fid); + std::string id = m_outputLevel->getSimpleLevel()->getImageId(fid); ids.push_back(id); } img = TImageP(); diff --git a/toonz/sources/toonzlib/stage.cpp b/toonz/sources/toonzlib/stage.cpp index 27f3853..cd8425f 100644 --- a/toonz/sources/toonzlib/stage.cpp +++ b/toonz/sources/toonzlib/stage.cpp @@ -138,8 +138,8 @@ class StackingOrder public: StackingOrder() {} inline bool operator()( - const pair &a, - const pair &b) const + const std::pair &a, + const std::pair &b) const { return a.first < b.first; } @@ -193,7 +193,7 @@ public: int m_currentXsheetLevel; // level of the current xsheet, see: editInPlace int m_xsheetLevel; // xsheet-level of the column being processed - vector m_ancestors; + std::vector m_ancestors; const ImagePainter::VisualSettings *m_vs; @@ -234,8 +234,8 @@ public: // debug! #ifdef _DEBUG - void dumpPlayerSet(PlayerSet &players, ostream &out); - void dumpAll(ostream &out); + void dumpPlayerSet(PlayerSet &players, std::ostream &out); + void dumpAll(std::ostream &out); #endif }; @@ -257,7 +257,7 @@ StageBuilder::~StageBuilder() //----------------------------------------------------------------------------- #ifdef _DEBUG -void StageBuilder::dumpPlayerSet(PlayerSet &players, ostream &out) +void StageBuilder::dumpPlayerSet(PlayerSet &players, std::ostream &out) { out << "["; int m = players.size(); @@ -278,7 +278,7 @@ void StageBuilder::dumpPlayerSet(PlayerSet &players, ostream &out) //----------------------------------------------------------------------------- -void StageBuilder::dumpAll(ostream &out) +void StageBuilder::dumpAll(std::ostream &out) { dumpPlayerSet(m_players, out); for (unsigned int i = 0; i < m_maskPool.size(); i++) { @@ -418,7 +418,7 @@ void StageBuilder::addCell( TAffine childCameraAff = childCamera->getPlacement(childRow); double childCameraZ = childCamera->getZ(childRow); - vector originalOpacity(childXsheet->getColumnCount()); + std::vector originalOpacity(childXsheet->getColumnCount()); for (int c = 0; c < childXsheet->getColumnCount(); c++) { originalOpacity[c] = childXsheet->getColumn(c)->getOpacity(); @@ -458,7 +458,7 @@ void StageBuilder::addCell( //----------------------------------------------------------------------------- -bool alreadyAdded(TXsheet *xsh, int row, int index, const vector &rows, int col) +bool alreadyAdded(TXsheet *xsh, int row, int index, const std::vector &rows, int col) { int i; for (i = 0; i < index; i++) @@ -529,9 +529,9 @@ void StageBuilder::addCellWithOnionSkin( m_shiftTraceGhostId = NO_GHOST; } } else if (locals::doStandardOnionSkin(this, xsh, level, col)) { - vector rows; + std::vector rows; m_onionSkinMask.getAll(row, rows); - vector::iterator it = rows.begin(); + std::vector::iterator it = rows.begin(); while (it != rows.end() && *it < row) it++; std::sort(rows.begin(), it, descending); @@ -719,7 +719,7 @@ void StageBuilder::visit(PlayerSet &players, Visitor &visitor, bool isPlaying) // debug class DummyVisitor : public Visitor { - ostrstream m_ss; + std::ostrstream m_ss; public: void onImage(const Stage::Player &data) { m_ss << "img "; } @@ -727,10 +727,10 @@ public: void endMask() { m_ss << "endMask "; } void enableMask() { m_ss << "enableMask "; } void disableMask() { m_ss << "disableMask "; } - string getLog() + std::string getLog() { m_ss << '\0'; - string log = m_ss.str(); + std::string log = m_ss.str(); m_ss.freeze(0); return log; } diff --git a/toonz/sources/toonzlib/stagevisitor.cpp b/toonz/sources/toonzlib/stagevisitor.cpp index c9dc3ed..1de4ee0 100644 --- a/toonz/sources/toonzlib/stagevisitor.cpp +++ b/toonz/sources/toonzlib/stagevisitor.cpp @@ -340,7 +340,7 @@ int Picker::getColumnIndex() const //----------------------------------------------------------------------------- -void Picker::getColumnIndexes(vector &indexes) const +void Picker::getColumnIndexes(std::vector &indexes) const { indexes = m_columnIndexes; } @@ -696,12 +696,12 @@ void RasterPainter::drawRasterImages(QPainter &p, QPolygon cameraPol) } void buildAutocloseImage(TVectorImage *vaux, TVectorImage *vi, - const vector> &startPoints, const vector> &endPoints) + const std::vector> &startPoints, const std::vector> &endPoints) { for (UINT i = 0; i < startPoints.size(); i++) { TThickPoint p1 = vi->getStroke(startPoints[i].first)->getThickPoint(startPoints[i].second); TThickPoint p2 = vi->getStroke(endPoints[i].first)->getThickPoint(endPoints[i].second); - vector points(3); + std::vector points(3); points[0] = p1; points[1] = 0.5 * (p1 + p2); points[2] = p2; @@ -722,7 +722,7 @@ void drawAutocloses(TVectorImage *vi, TVectorRenderData &rd) plt->addStyle(TPixel::Magenta); } - vector> startPoints, endPoints; + std::vector> startPoints, endPoints; getClosingPoints(vi->getBBox(), AutocloseFactor, vi, startPoints, endPoints); TVectorImage *vaux = new TVectorImage(); @@ -1058,7 +1058,7 @@ void OpenGlPainter::onRasterImage(TRasterImage *ri, const Stage::Player &player) assert(false); // dealing with tlv stuff! bool premultiplied = tlvFlag; // xD - static vector matteChan; // Wtf this is criminal. Altough probably this + static std::vector matteChan; // Wtf this is criminal. Altough probably this // stuff is used only in the main thread... hmmm.... TRaster32P r = (TRaster32P)ri->getRaster(); r->lock(); diff --git a/toonz/sources/toonzlib/studiopalette.cpp b/toonz/sources/toonzlib/studiopalette.cpp index 1abd1f3..7fb824a 100644 --- a/toonz/sources/toonzlib/studiopalette.cpp +++ b/toonz/sources/toonzlib/studiopalette.cpp @@ -31,10 +31,10 @@ TFilePath makeUniqueName(TFilePath fp) { if (TFileStatus(fp).doesExist() == false) return fp; - wstring name = fp.getWideName(); + std::wstring name = fp.getWideName(); int index = 2; int j = name.find_last_not_of(L"0123456789"); - if (j != (int)wstring::npos && j + 1 < (int)name.length()) { + if (j != (int)std::wstring::npos && j + 1 < (int)name.length()) { index = toInt(name.substr(j + 1)) + 1; name = name.substr(0, j + 1); } @@ -117,16 +117,16 @@ TPalette *loadToonz46Palette(const TFilePath &fp) //------------------------------------------------------------------- -wstring readPaletteGlobalName(TFilePath path) +std::wstring readPaletteGlobalName(TFilePath path) { try { TIStream is(path); if (!is) return L""; - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "palette") return L""; - string name; + std::string name; if (is.getTagParam("name", name)) return toWideString(name); } catch (...) { @@ -135,7 +135,7 @@ wstring readPaletteGlobalName(TFilePath path) } //------------------------------------------------------------------- -TFilePath searchPalette(TFilePath path, wstring paletteId) +TFilePath searchPalette(TFilePath path, std::wstring paletteId) { TFilePathSet q; try { @@ -146,7 +146,7 @@ TFilePath searchPalette(TFilePath path, wstring paletteId) for (TFilePathSet::iterator i = q.begin(); i != q.end(); ++i) { TFilePath fp = *i; if (fp.getType() == "tpl") { - wstring gname = readPaletteGlobalName(fp); + std::wstring gname = readPaletteGlobalName(fp); if (gname == paletteId) return fp; } else if (TFileStatus(fp).isDirectory()) { @@ -160,7 +160,7 @@ TFilePath searchPalette(TFilePath path, wstring paletteId) bool studioPaletteHasBeenReferred = false; -static std::map table; +static std::map table; //------------------------------------------------------------------- } // namespace @@ -296,7 +296,7 @@ void StudioPalette::movePalette(const TFilePath &dstPath, const TFilePath &srcPa } catch (...) { return; } - wstring id = readPaletteGlobalName(dstPath); + std::wstring id = readPaletteGlobalName(dstPath); table.erase(id); FolderListenerManager::instance()->notifyFolderChanged(dstPath.getParentDir()); notifyMove(dstPath, srcPath); @@ -391,7 +391,7 @@ TFilePath StudioPalette::createFolder(const TFilePath &parentFolderPath) //------------------------------------------------------------------- -void StudioPalette::createFolder(const TFilePath &parentFolderPath, wstring name) +void StudioPalette::createFolder(const TFilePath &parentFolderPath, std::wstring name) { TFilePath fp = parentFolderPath + name; if (TFileStatus(fp).doesExist()) @@ -407,7 +407,7 @@ void StudioPalette::createFolder(const TFilePath &parentFolderPath, wstring name //------------------------------------------------------------------- -TFilePath StudioPalette::createPalette(const TFilePath &folderPath, string name) +TFilePath StudioPalette::createPalette(const TFilePath &folderPath, std::string name) { TPalette *palette = 0; if (name == "") @@ -416,7 +416,7 @@ TFilePath StudioPalette::createPalette(const TFilePath &folderPath, string name) TFilePath fp = makeUniqueName(folderPath + (name + ".tpl")); time_t ltime; time(<ime); - wstring gname = toWideString((int)ltime) + L"_" + toWideString(rand()); + std::wstring gname = toWideString((int)ltime) + L"_" + toWideString(rand()); palette->setGlobalName(gname); setStylesGlobalNames(palette); save(fp, palette); @@ -433,7 +433,7 @@ void StudioPalette::setPalette(const TFilePath &palettePath, const TPalette *plt TPalette *palette = plt->clone(); palette->setIsLocked(plt->isLocked()); palette->addRef(); - wstring pgn = palette->getGlobalName(); + std::wstring pgn = palette->getGlobalName(); if (TFileStatus(palettePath).doesExist()) pgn = readPaletteGlobalName(palettePath); palette->setGlobalName(pgn); @@ -475,7 +475,7 @@ TFilePath StudioPalette::importPalette( const TFilePath &srcPath) { TPaletteP palette; - string ext = srcPath.getType(); + std::string ext = srcPath.getType(); try { if (ext == "plt") palette = loadToonz46Palette(srcPath); @@ -488,7 +488,7 @@ TFilePath StudioPalette::importPalette( if (!palette) return TFilePath(); - wstring name = srcPath.getWideName(); + std::wstring name = srcPath.getWideName(); assert(!palette->isCleanupPalette()); // convertToLevelPalette(palette.getPointer()); @@ -496,7 +496,7 @@ TFilePath StudioPalette::importPalette( TFilePath fp = makeUniqueName(dstFolder + (name + L".tpl")); time_t ltime; time(<ime); - wstring gname = toWideString((int)ltime) + L"_" + toWideString(rand()); + std::wstring gname = toWideString((int)ltime) + L"_" + toWideString(rand()); palette->setGlobalName(gname); setStylesGlobalNames(palette.getPointer()); TSystem::touchParentDir(fp); @@ -514,14 +514,14 @@ TFilePath StudioPalette::importPalette( //------------------------------------------------------------------- -void foobar(wstring paletteId) +void foobar(std::wstring paletteId) { table.erase(paletteId); } -TFilePath StudioPalette::getPalettePath(wstring paletteId) +TFilePath StudioPalette::getPalettePath(std::wstring paletteId) { - std::map::iterator it = table.find(paletteId); + std::map::iterator it = table.find(paletteId); if (it != table.end()) return it->second; TFilePath fp = searchPalette(m_root, paletteId); @@ -534,7 +534,7 @@ TFilePath StudioPalette::getPalettePath(wstring paletteId) //------------------------------------------------------------------- -TPalette *StudioPalette::getPalette(wstring paletteId) +TPalette *StudioPalette::getPalette(std::wstring paletteId) { TFilePath palettePath = getPalettePath(paletteId); if (palettePath != TFilePath()) @@ -545,7 +545,7 @@ TPalette *StudioPalette::getPalette(wstring paletteId) //------------------------------------------------------------------- -TColorStyle *StudioPalette::getStyle(wstring styleId) +TColorStyle *StudioPalette::getStyle(std::wstring styleId) { return 0; @@ -558,13 +558,13 @@ std::pair StudioPalette::getSourceStyle(TColorStyle *cs) std::pair ret(TFilePath(), -1); if (!cs) return ret; - wstring gname = cs->getGlobalName(); + std::wstring gname = cs->getGlobalName(); if (gname == L"") return ret; int k = gname.find_first_of(L'-', 1); - if (k == (int)wstring::npos) + if (k == (int)std::wstring::npos) return ret; - wstring paletteId = gname.substr(1, k - 1); + std::wstring paletteId = gname.substr(1, k - 1); ret.first = getPalettePath(paletteId) - m_root; ret.second = toInt(gname.substr(k + 1)); return ret; @@ -576,18 +576,18 @@ std::pair StudioPalette::getSourceStyle(TColorStyle *cs) bool StudioPalette::updateLinkedColors(TPalette *palette) { bool paletteIsChanged = false; - std::map table; + std::map table; for (int i = 0; i < palette->getStyleCount(); i++) { TColorStyle *cs = palette->getStyle(i); - wstring gname = cs->getGlobalName(); + std::wstring gname = cs->getGlobalName(); if (gname == L"" || gname[0] != L'+') continue; int k = gname.find_first_of(L'-', 1); - if (k == (int)wstring::npos) + if (k == (int)std::wstring::npos) continue; - wstring paletteId = gname.substr(1, k - 1); - std::map::iterator it; + std::wstring paletteId = gname.substr(1, k - 1); + std::map::iterator it; it = table.find(paletteId); TPalette *spPalette = 0; if (it == table.end()) { @@ -630,7 +630,7 @@ void StudioPalette::setStylesGlobalNames(TPalette *palette) TColorStyle *cs = palette->getStyle(i); // set global name only to the styles of which the global name is empty if (cs->getGlobalName() == L"") { - wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(i); + std::wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(i); cs->setGlobalName(gname); } } @@ -641,7 +641,7 @@ void StudioPalette::setStylesGlobalNames(TPalette *palette) void StudioPalette::save(const TFilePath &path, TPalette *palette) { TOStream os(path); - std::map attr; + std::map attr; attr["name"] = toString(palette->getGlobalName()); os.openChild("palette", attr); palette->saveData(os); @@ -656,10 +656,10 @@ TPalette *StudioPalette::load(const TFilePath &path) TIStream is(path); if (!is) return 0; - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "palette") return 0; - string gname; + std::string gname; is.getTagParam("name", gname); TPalette *palette = new TPalette(); palette->loadData(is); diff --git a/toonz/sources/toonzlib/studiopalettecmd.cpp b/toonz/sources/toonzlib/studiopalettecmd.cpp index 6d7e6ec..b8c861d 100644 --- a/toonz/sources/toonzlib/studiopalettecmd.cpp +++ b/toonz/sources/toonzlib/studiopalettecmd.cpp @@ -342,7 +342,7 @@ class AdjustIntoCurrentPaletteUndo : public TUndo TPaletteHandle *m_paletteHandle; TPaletteP m_oldPalette, m_newPalette; TFrameId m_fid; - string m_oldImageId; + std::string m_oldImageId; static int m_idCount; int m_undoSize; int m_tolerance; @@ -415,11 +415,11 @@ void StudioPaletteCmd::loadIntoCurrentPalette(TPaletteHandle *paletteHandle, namespace { -map ToleranceMap; +std::map ToleranceMap; -int findClosest(const TPixel &color, map &colorMap, int tolerance) +int findClosest(const TPixel &color, std::map &colorMap, int tolerance) { - map::const_iterator it; + std::map::const_iterator it; it = ToleranceMap.find(color); if (it != ToleranceMap.end()) return it->second; @@ -450,9 +450,9 @@ int findClosest(const TPixel &color, map &colorMap, int tolerance) //-------------------------------------------------------------------------------------- -int getIndex(const TPixel &color, map &colorMap, TPalette *plt, int tolerance) +int getIndex(const TPixel &color, std::map &colorMap, TPalette *plt, int tolerance) { - map::const_iterator it; + std::map::const_iterator it; it = colorMap.find(color); if (it != colorMap.end()) return it->second; @@ -471,7 +471,7 @@ int getIndex(const TPixel &color, map &colorMap, TPalette *plt, int //------------------------------------------- -void adaptIndexes(TToonzImageP timg, map &colorMap, TPalette *plt, int tolerance) +void adaptIndexes(TToonzImageP timg, std::map &colorMap, TPalette *plt, int tolerance) { TPalette *origPlt = timg->getPalette(); TRasterCM32P r = timg->getRaster(); @@ -515,13 +515,13 @@ void adaptLevelToPalette(TXshLevelHandle *currentLevelHandle, TPaletteHandle *pa ToleranceMap.clear(); - map colorMap; + std::map colorMap; for (int i = 0; i < plt->getStyleCount(); i++) { if (!plt->getStylePage(i)) continue; colorMap[plt->getStyle(i)->getMainColor()] = i; } - vector fids; + std::vector fids; sl->getFids(fids); for (int i = 0; i < (int)fids.size(); i++) { @@ -693,7 +693,7 @@ void StudioPaletteCmd::updateAllLinkedStyles(TPaletteHandle *paletteHandle, TXsh std::vector::iterator it; for (it = fids.begin(); it != fids.end(); ++it) { TFrameId fid = *it; - string id = sl->getImageId(fid); + std::string id = sl->getImageId(fid); } } } @@ -731,7 +731,7 @@ void StudioPaletteCmd::movePalette(const TFilePath &dstPath, const TFilePath &sr If there are any problems send an error message. */ TFilePath StudioPaletteCmd::createPalette(const TFilePath &folderName, - string paletteName, + std::string paletteName, const TPalette *palette) { TFilePath palettePath; diff --git a/toonz/sources/toonzlib/tcamera.cpp b/toonz/sources/toonzlib/tcamera.cpp index 724bbd0..90ce47a 100644 --- a/toonz/sources/toonzlib/tcamera.cpp +++ b/toonz/sources/toonzlib/tcamera.cpp @@ -167,7 +167,7 @@ void TCamera::saveData(TOStream &os) const void TCamera::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "cameraSize" || tagName == "size") is >> m_size.lx >> m_size.ly; diff --git a/toonz/sources/toonzlib/tcenterlineadjustments.cpp b/toonz/sources/toonzlib/tcenterlineadjustments.cpp index 81898e5..856f881 100644 --- a/toonz/sources/toonzlib/tcenterlineadjustments.cpp +++ b/toonz/sources/toonzlib/tcenterlineadjustments.cpp @@ -294,8 +294,8 @@ public: class JunctionArea { public: - vector m_enteringSequences; - vector m_jointsAbsorbed; + std::vector m_enteringSequences; + std::vector m_jointsAbsorbed; TPointD m_newJointPosition; JunctionArea() {} diff --git a/toonz/sources/toonzlib/tcenterlinepolygonizer.cpp b/toonz/sources/toonzlib/tcenterlinepolygonizer.cpp index 028f0fe..d21aafb 100644 --- a/toonz/sources/toonzlib/tcenterlinepolygonizer.cpp +++ b/toonz/sources/toonzlib/tcenterlinepolygonizer.cpp @@ -397,8 +397,8 @@ BorderList *extractBorders(const TRasterP &ras, int threshold, int despeckling) Signaturemap byteImage(ras, threshold); BorderList *borderHierarchy = new BorderList; - vector outerBorders; - list innerBorders; + std::vector outerBorders; + std::list innerBorders; RawBorder *foundPath; int x, y; @@ -442,7 +442,7 @@ BorderList *extractBorders(const TRasterP &ras, int threshold, int despeckling) //Now, we have all borders found, but no hierarchy between them. unsigned int i; - list::iterator l; + std::list::iterator l; //Build hierarchy diff --git a/toonz/sources/toonzlib/tcenterlineskeletonizer.cpp b/toonz/sources/toonzlib/tcenterlineskeletonizer.cpp index 25faf25..75301b0 100644 --- a/toonz/sources/toonzlib/tcenterlineskeletonizer.cpp +++ b/toonz/sources/toonzlib/tcenterlineskeletonizer.cpp @@ -1447,13 +1447,13 @@ inline void Event::processVertexEvent() // as impossible opposite edges the adjacent of the other node. if (newLeftNode->m_concave) { newLeftNode->m_notOpposites = m_generator->m_notOpposites; - append, vector::reverse_iterator>(newLeftNode->m_notOpposites, m_coGenerator->m_notOpposites); + append, std::vector::reverse_iterator>(newLeftNode->m_notOpposites, m_coGenerator->m_notOpposites); newLeftNode->m_notOpposites.push_back(newRightNode->m_edge); newLeftNode->m_notOpposites.push_back(newRightNode->m_prev->m_edge); } else if (newLeftNode->m_concave) { newRightNode->m_notOpposites = m_generator->m_notOpposites; - append, vector::reverse_iterator>(newRightNode->m_notOpposites, m_coGenerator->m_notOpposites); + append, std::vector::reverse_iterator>(newRightNode->m_notOpposites, m_coGenerator->m_notOpposites); newRightNode->m_notOpposites.push_back(newLeftNode->m_edge); newRightNode->m_notOpposites.push_back(newLeftNode->m_prev->m_edge); diff --git a/toonz/sources/toonzlib/tcolumnfx.cpp b/toonz/sources/toonzlib/tcolumnfx.cpp index be90606..02bf3f7 100644 --- a/toonz/sources/toonzlib/tcolumnfx.cpp +++ b/toonz/sources/toonzlib/tcolumnfx.cpp @@ -190,7 +190,7 @@ std::string getAlias(TXsheet *xsh, double frame, const TRenderSettings &info) // Local namespace - Colormap (Sandor) Fxs stuff //**************************************************************************************** -bool vectorMustApplyCmappedFx(const vector &fxs) +bool vectorMustApplyCmappedFx(const std::vector &fxs) { std::vector::const_iterator ft, fEnd(fxs.end()); for (ft = fxs.begin(); ft != fEnd; ++ft) { @@ -220,7 +220,7 @@ bool vectorMustApplyCmappedFx(const vector &fxs) //------------------------------------------------------------------- -bool mustApplySandorFx(const vector &fxs) +bool mustApplySandorFx(const std::vector &fxs) { std::vector::const_iterator ft, fEnd(fxs.end()); for (ft = fxs.begin(); ft != fEnd; ++ft) { @@ -234,7 +234,7 @@ bool mustApplySandorFx(const vector &fxs) //------------------------------------------------------------------- -int getEnlargement(const vector &fxs, double scale) +int getEnlargement(const std::vector &fxs, double scale) { int enlargement = 1; @@ -247,8 +247,8 @@ int getEnlargement(const vector &fxs, double scale) case BlendTz: { //Nothing happen, unless we have color 0 among the blended ones. In such case, //we have to enlarge the bbox proportionally to the amount param. - vector items; - string indexes = std::string(sandorData->m_argv[0]); + std::vector items; + std::string indexes = std::string(sandorData->m_argv[0]); parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); @@ -340,18 +340,18 @@ inline bool fxLess(TRasterFxRenderDataP a, TRasterFxRenderDataP b) //------------------------------------------------------------------- -inline void sortCmappedFxs(vector &fxs) +inline void sortCmappedFxs(std::vector &fxs) { std::stable_sort(fxs.begin(), fxs.end(), fxLess); } //------------------------------------------------------------------- -vector getAllBut(vector &colorIds) +std::vector getAllBut(std::vector &colorIds) { assert(TPixelCM32::getMaxInk() == TPixelCM32::getMaxPaint()); - vector curColorIds; + std::vector curColorIds; std::sort(colorIds.begin(), colorIds.end()); // Taking all colors EXCEPT those in colorIds @@ -375,14 +375,14 @@ vector getAllBut(vector &colorIds) //! necessary informations before calling it - however, since the intent was that of //! optimizing memory usage, please avoid copying the entire image buffer... -TImageP applyCmappedFx(TToonzImageP &ti, const vector &fxs, int frame, double scale) +TImageP applyCmappedFx(TToonzImageP &ti, const std::vector &fxs, int frame, double scale) { TImageP result = ti; TTile resultTile; //Just a quick wrapper to the ImageCache TPalette *inPalette, *tempPlt; TPaletteP filteredPalette; TRasterCM32P copyRas; - string cmRasCacheId; + std::string cmRasCacheId; //Retrieve the image dpi double dpiX, dpiY; @@ -436,7 +436,7 @@ TImageP applyCmappedFx(TToonzImageP &ti, const vector &fxs for (it = fxsCopy.rbegin(); it != fxsCopy.rend(); ++it) { PaletteFilterFxRenderData *PaletteFilterData = dynamic_cast(it->getPointer()); if (PaletteFilterData && PaletteFilterData->m_type != eApplyToInksAndPaints) { - vector indexes; + std::vector indexes; indexes.resize(PaletteFilterData->m_colors.size()); set::const_iterator jt = PaletteFilterData->m_colors.begin(); @@ -482,8 +482,8 @@ TImageP applyCmappedFx(TToonzImageP &ti, const vector &fxs param.superSampling = sandorData->m_blendParams.m_superSampling; //Build the color indexes - vector items; - string indexes = std::string(sandorData->m_argv[0]); + std::vector items; + std::string indexes = std::string(sandorData->m_argv[0]); parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); @@ -513,8 +513,8 @@ TImageP applyCmappedFx(TToonzImageP &ti, const vector &fxs cmRas = TToonzImageP(TImageCache::instance()->get(cmRasCacheId, true))->getRaster(); //Apply a palette filter in order to keep only the colors specified in the sandor argv - vector items; - string indexes = std::string(sandorData->m_argv[0]); + std::vector items; + std::string indexes = std::string(sandorData->m_argv[0]); parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); @@ -620,7 +620,7 @@ TImageP applyCmappedFx(TToonzImageP &ti, const vector &fxs //------------------------------------------------------------------- -void applyCmappedFx(TVectorImageP &vi, const vector &fxs, int frame) +void applyCmappedFx(TVectorImageP &vi, const std::vector &fxs, int frame) { TRasterP ras; bool keep = false; @@ -670,7 +670,7 @@ class LevelFxBuilder : public ResourceBuilder TRect m_rasBounds; public: - LevelFxBuilder(const string &resourceName, double frame, const TRenderSettings &rs, + LevelFxBuilder(const std::string &resourceName, double frame, const TRenderSettings &rs, TXshSimpleLevel *sl, TFrameId fid) : ResourceBuilder(resourceName, 0, frame, rs), m_loadedRas(), m_palette(), m_sl(sl), m_fid(fid), m_64bit(rs.m_bpp == 64) {} @@ -895,7 +895,7 @@ void TLevelColumnFx::doDryCompute(TRectD &rect, double frame, const TRenderSetti int renderStatus = TRenderer::instance().getRenderStatus(TRenderer::renderId()); - string alias = getAlias(frame, TRenderSettings()) + "_image"; + std::string alias = getAlias(frame, TRenderSettings()) + "_image"; TImageInfo imageInfo; getImageInfo(imageInfo, sl, cell.m_frameId); @@ -1304,7 +1304,7 @@ void TLevelColumnFx::getImageInfo(TImageInfo &info, TXshSimpleLevel *sl, TFrameI if (type == PLI_XSHLEVEL) return; - string imageId = sl->getImageId(frameId); + std::string imageId = sl->getImageId(frameId); const TImageInfo *storedInfo = ImageManager::instance()->getInfo(imageId, ImageManager::none, 0); @@ -1394,7 +1394,7 @@ const TPersistDeclaration *TLevelColumnFx::getDeclaration() const //------------------------------------------------------------------- -string TLevelColumnFx::getPluginId() const +std::string TLevelColumnFx::getPluginId() const { return "Toonz_"; } @@ -1421,7 +1421,7 @@ void TLevelColumnFx::setColumn(TXshLevelColumn *column) //------------------------------------------------------------------- -wstring TLevelColumnFx::getColumnId() const +std::wstring TLevelColumnFx::getColumnId() const { if (!m_levelColumn) return L"Col?"; @@ -1430,7 +1430,7 @@ wstring TLevelColumnFx::getColumnId() const //------------------------------------------------------------------- -wstring TLevelColumnFx::getColumnName() const +std::wstring TLevelColumnFx::getColumnName() const { if (!m_levelColumn) return L""; @@ -1440,10 +1440,10 @@ wstring TLevelColumnFx::getColumnName() const //------------------------------------------------------------------- -string TLevelColumnFx::getAlias(double frame, const TRenderSettings &info) const +std::string TLevelColumnFx::getAlias(double frame, const TRenderSettings &info) const { if (!m_levelColumn || m_levelColumn->getCell((int)frame).isEmpty()) - return string(); + return std::string(); const TXshCell &cell = m_levelColumn->getCell((int)frame); @@ -1456,7 +1456,7 @@ string TLevelColumnFx::getAlias(double frame, const TRenderSettings &info) const if (childLevel) return ::getAlias(childLevel->getXsheet(), frame, info); - return string(); + return std::string(); } TFilePath path = sl->getPath(); @@ -1465,7 +1465,7 @@ string TLevelColumnFx::getAlias(double frame, const TRenderSettings &info) const else fp = path; - string rdata; + std::string rdata; std::vector::const_iterator it = info.m_data.begin(); for (; it != info.m_data.end(); ++it) { TRasterFxRenderDataP data = *it; @@ -1650,7 +1650,7 @@ const TPersistDeclaration *TPaletteColumnFx::getDeclaration() const //------------------------------------------------------------------- -string TPaletteColumnFx::getPluginId() const +std::string TPaletteColumnFx::getPluginId() const { return "Toonz_"; } @@ -1666,7 +1666,7 @@ TFxTimeRegion TPaletteColumnFx::getTimeRegion() const //------------------------------------------------------------------- -wstring TPaletteColumnFx::getColumnName() const +std::wstring TPaletteColumnFx::getColumnName() const { if (!m_paletteColumn) return L"Col?"; @@ -1675,7 +1675,7 @@ wstring TPaletteColumnFx::getColumnName() const //------------------------------------------------------------------- -wstring TPaletteColumnFx::getColumnId() const +std::wstring TPaletteColumnFx::getColumnId() const { if (!m_paletteColumn) return L"Col?"; @@ -1684,7 +1684,7 @@ wstring TPaletteColumnFx::getColumnId() const //------------------------------------------------------------------- -string TPaletteColumnFx::getAlias(double frame, const TRenderSettings &info) const +std::string TPaletteColumnFx::getAlias(double frame, const TRenderSettings &info) const { TFilePath palettePath = getPalettePath(frame); return "TPaletteColumnFx[" + toString(palettePath.getWideString()) + "]"; @@ -1765,7 +1765,7 @@ const TPersistDeclaration *TZeraryColumnFx::getDeclaration() const //------------------------------------------------------------------- -string TZeraryColumnFx::getPluginId() const +std::string TZeraryColumnFx::getPluginId() const { return "Toonz_"; } @@ -1786,14 +1786,14 @@ void TZeraryColumnFx::setColumn(TXshZeraryFxColumn *column) //------------------------------------------------------------------- -wstring TZeraryColumnFx::getColumnName() const +std::wstring TZeraryColumnFx::getColumnName() const { return getZeraryFx()->getName(); } //------------------------------------------------------------------- -wstring TZeraryColumnFx::getColumnId() const +std::wstring TZeraryColumnFx::getColumnId() const { return getZeraryFx()->getFxId(); } @@ -1823,7 +1823,7 @@ void TZeraryColumnFx::setZeraryFx(TFx *fx) //------------------------------------------------------------------- -string TZeraryColumnFx::getAlias(double frame, const TRenderSettings &info) const +std::string TZeraryColumnFx::getAlias(double frame, const TRenderSettings &info) const { return "TZeraryColumnFx[" + m_fx->getAlias(frame, info) + "]"; } @@ -1905,16 +1905,16 @@ bool TXsheetFx::doGetBBox(double frame, TRectD &bBox, const TRenderSettings &inf //------------------------------------------------------------------- -string TXsheetFx::getPluginId() const +std::string TXsheetFx::getPluginId() const { return "Toonz_"; } //------------------------------------------------------------------- -string TXsheetFx::getAlias(double frame, const TRenderSettings &info) const +std::string TXsheetFx::getAlias(double frame, const TRenderSettings &info) const { - string alias = getFxType(); + std::string alias = getFxType(); alias += "["; //Add each terminal fx's alias @@ -1966,7 +1966,7 @@ bool TOutputFx::doGetBBox(double frame, TRectD &bBox, const TRenderSettings &inf //------------------------------------------------------------------- -string TOutputFx::getPluginId() const +std::string TOutputFx::getPluginId() const { return "Toonz_"; } diff --git a/toonz/sources/toonzlib/tcolumnfxset.cpp b/toonz/sources/toonzlib/tcolumnfxset.cpp index 28040bb..707190b 100644 --- a/toonz/sources/toonzlib/tcolumnfxset.cpp +++ b/toonz/sources/toonzlib/tcolumnfxset.cpp @@ -107,7 +107,7 @@ void TFxSet::loadData(TIStream &is) { clear(); - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "fxnode") { TPersist *p = 0; diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cpp index 37ab2f9..9b7f342 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; + std::ostrstream os; os << "texture size = " << outX << "x" << outY << " fmt " << intFmt << " cmpt# " << cmpt << " " << rSize << "," << gSize << "," << bSize << "," << aSize << '\n' << '\0'; TSystem::outputDebug(os.str()); os.freeze(false); diff --git a/toonz/sources/toonzlib/tlog.cpp b/toonz/sources/toonzlib/tlog.cpp index c874d9e..6cf5bce 100644 --- a/toonz/sources/toonzlib/tlog.cpp +++ b/toonz/sources/toonzlib/tlog.cpp @@ -71,7 +71,7 @@ int Level2XPriority(LEVEL level) } #endif -void notify(LEVEL level, const string &msg) +void notify(LEVEL level, const std::string &msg) { #ifdef _WIN32 TCHAR buf[_MAX_PATH + 1]; @@ -110,7 +110,7 @@ static TThread::Mutex MyMutex; //------------------------------------------------------------------------------ -void TSysLog::success(const string &msg) +void TSysLog::success(const std::string &msg) { QMutexLocker sl(&MyMutex); notify(LEVEL_SUCCESS, msg); @@ -118,7 +118,7 @@ void TSysLog::success(const string &msg) //------------------------------------------------------------------------------ -void TSysLog::warning(const string &msg) +void TSysLog::warning(const std::string &msg) { QMutexLocker sl(&MyMutex); notify(LEVEL_WARNING, msg); @@ -126,7 +126,7 @@ void TSysLog::warning(const string &msg) //------------------------------------------------------------------------------ -void TSysLog::error(const string &msg) +void TSysLog::error(const std::string &msg) { QMutexLocker sl(&MyMutex); notify(LEVEL_ERROR, msg); @@ -134,7 +134,7 @@ void TSysLog::error(const string &msg) //------------------------------------------------------------------------------ -void TSysLog::info(const string &msg) +void TSysLog::info(const std::string &msg) { QMutexLocker sl(&MyMutex); notify(LEVEL_INFO, msg); @@ -163,7 +163,7 @@ public: delete m_os; } - void write(const string &msg); + void write(const std::string &msg); TThread::Mutex m_mutex; std::ostream *m_os; @@ -172,7 +172,7 @@ public: //------------------------------------------------------------------------------ -void TUserLogAppend::Imp::write(const string &msg) +void TUserLogAppend::Imp::write(const std::string &msg) { QMutexLocker sl(&m_mutex); *m_os << msg.c_str(); @@ -186,7 +186,7 @@ namespace //-------------------------------------------------------------------- -string myGetCurrentTime() +std::string myGetCurrentTime() { QString tmp = QTime::currentTime().toString("hh:mm:ss"); return tmp.toStdString(); @@ -214,11 +214,11 @@ TUserLogAppend::~TUserLogAppend() //------------------------------------------------------------------------------ -void TUserLogAppend::warning(const string &msg) +void TUserLogAppend::warning(const std::string &msg) { DVGui::warning(QString::fromStdString(msg)); - string fullMsg(myGetCurrentTime()); + std::string fullMsg(myGetCurrentTime()); fullMsg += " WRN:"; fullMsg += "\n"; fullMsg += msg; @@ -228,10 +228,10 @@ void TUserLogAppend::warning(const string &msg) //------------------------------------------------------------------------------ -void TUserLogAppend::error(const string &msg) +void TUserLogAppend::error(const std::string &msg) { DVGui::error(QString::fromStdString(msg)); - string fullMsg(myGetCurrentTime()); + std::string fullMsg(myGetCurrentTime()); fullMsg += " ERR:"; fullMsg += "\n"; fullMsg += msg; @@ -241,9 +241,9 @@ void TUserLogAppend::error(const string &msg) //------------------------------------------------------------------------------ -void TUserLogAppend::info(const string &msg) +void TUserLogAppend::info(const std::string &msg) { - string fullMsg(""); + std::string fullMsg(""); //fullMsg += " INF:"; //fullMsg += "\n"; fullMsg += msg; diff --git a/toonz/sources/toonzlib/tobjecthandle.cpp b/toonz/sources/toonzlib/tobjecthandle.cpp index 5e68f76..f9a50ef 100644 --- a/toonz/sources/toonzlib/tobjecthandle.cpp +++ b/toonz/sources/toonzlib/tobjecthandle.cpp @@ -34,7 +34,7 @@ void setSpline(TVectorImage *srcImg, TStageObjectId objId, TStageObjectSpline *c return; if (srcImg->getStrokeCount() == 0) { double d = 30; - vector points; + std::vector points; points.push_back(TPointD(-d, 0)); points.push_back(TPointD(0, 0)); points.push_back(TPointD(d, 0)); diff --git a/toonz/sources/toonzlib/toonzfolders.cpp b/toonz/sources/toonzlib/toonzfolders.cpp index 4bca216..a715f6a 100644 --- a/toonz/sources/toonzlib/toonzfolders.cpp +++ b/toonz/sources/toonzlib/toonzfolders.cpp @@ -95,7 +95,7 @@ TFilePath ToonzFolder::getModuleFile(TFilePath filename) return fp; } -TFilePath ToonzFolder::getModuleFile(string fn) +TFilePath ToonzFolder::getModuleFile(std::string fn) { return ToonzFolder::getModuleFile(TFilePath(fn)); } diff --git a/toonz/sources/toonzlib/toonzimageutils.cpp b/toonz/sources/toonzlib/toonzimageutils.cpp index 61cef06..5f59706 100644 --- a/toonz/sources/toonzlib/toonzimageutils.cpp +++ b/toonz/sources/toonzlib/toonzimageutils.cpp @@ -344,9 +344,9 @@ TRect ToonzImageUtils::eraseRect(const TToonzImageP &ti, const TRectD &area, int //------------------------------------------------------------------- -vector ToonzImageUtils::paste(const TToonzImageP &ti, const TTileSetCM32 *tileSet) +std::vector ToonzImageUtils::paste(const TToonzImageP &ti, const TTileSetCM32 *tileSet) { - vector rects; + std::vector rects; TRasterCM32P raster = ti->getRaster(); //for(int i=0;igetTileCount();i++) for (int i = tileSet->getTileCount() - 1; i >= 0; i--) { @@ -378,7 +378,7 @@ vector ToonzImageUtils::paste(const TToonzImageP &ti, const TTileSetCM32 TToonzImageP ToonzImageUtils::vectorToToonzImage( const TVectorImageP &vimage, const TAffine &aff, TPalette *palette, const TPointD &outputPos, const TDimension &outputSize, - const vector *fxs, bool transformThickness) + const std::vector *fxs, bool transformThickness) { if (!vimage || !palette) return 0; @@ -397,8 +397,8 @@ TToonzImageP ToonzImageUtils::vectorToToonzImage( vi->transform(TTranslation(-outputPos)); int strokeCount = vi->getStrokeCount(); - vector strokeIndex(strokeCount); - vector strokes(strokeCount); + std::vector strokeIndex(strokeCount); + std::vector strokes(strokeCount); int maxStyleId = palette->getStyleCount() - 1; int i; @@ -417,8 +417,8 @@ TToonzImageP ToonzImageUtils::vectorToToonzImage( for (i = 0; i < (int)fxs->size(); i++) { SandorFxRenderData *sandorData = dynamic_cast((*fxs)[i].getPointer()); if (sandorData && sandorData->m_type == BlendTz) { - string indexes = toString(sandorData->m_blendParams.m_colorIndex); - vector items; + std::string indexes = toString(sandorData->m_blendParams.m_colorIndex); + std::vector items; parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); @@ -484,8 +484,8 @@ TPalette *ToonzImageUtils::loadTzPalette(const TFilePath &pltFile) if (!rasPlt) return 0; - map> pltColorNames; - map>::iterator it; + std::map> pltColorNames; + std::map>::iterator it; loader.getTzpPaletteColorNames(pltColorNames); TPalette *palette = new TPalette(); @@ -501,7 +501,7 @@ TPalette *ToonzImageUtils::loadTzPalette(const TFilePath &pltFile) for (; x < rasPlt->getLx(); ++x) { TSolidColorStyle *style = new TSolidColorStyle(pixelRow[x]); if ((it = pltColorNames.find(x)) != pltColorNames.end()) { - string styleName = it->second.second; + std::string styleName = it->second.second; style->setName(toWideString(styleName)); } if (x < count) @@ -518,13 +518,13 @@ TPalette *ToonzImageUtils::loadTzPalette(const TFilePath &pltFile) // tolgo quest'ultimo page->removeStyle(1); // aggiungo gli altri - map pages; - map::iterator itpage; + std::map pages; + std::map::iterator itpage; pixelRow = rasPlt->pixels(1); for (x = 0; x < rasPlt->getLx(); ++x) { if ((it = pltColorNames.find(x)) != pltColorNames.end()) { - wstring pageName; + std::wstring pageName; pageName = toWideString(it->second.first); if (x == 0) { page = palette->getPage(0); @@ -749,7 +749,7 @@ void ToonzImageUtils::eraseImage(const TToonzImageP &ti, const TRaster32P &image //----------------------------------------------------------------------- -string ToonzImageUtils::premultiply(const TFilePath &levelPath) +std::string ToonzImageUtils::premultiply(const TFilePath &levelPath) { assert(0); /* diff --git a/toonz/sources/toonzlib/toonzscene.cpp b/toonz/sources/toonzlib/toonzscene.cpp index a0091a5..3bf1474 100644 --- a/toonz/sources/toonzlib/toonzscene.cpp +++ b/toonz/sources/toonzlib/toonzscene.cpp @@ -59,7 +59,7 @@ const VersionNumber l_currentVersion(71, 0); //----------------------------------------------------------------------------- -string getFolderName(int levelType) +std::string getFolderName(int levelType) { switch (levelType) { case TZI_XSHLEVEL: @@ -344,7 +344,7 @@ ToonzScene::~ToonzScene() //----------------------------------------------------------------------------- -void ToonzScene::setSceneName(wstring name) +void ToonzScene::setSceneName(std::wstring name) { m_scenePath = m_scenePath.withName(name); } @@ -423,7 +423,7 @@ int ToonzScene::loadFrameCount(const TFilePath &fp) throw TException(fp.getWideString() + L": Can't open file"); try { //Leggo il primo tag () ed estraggo il framecount (se c'e') - string tagName = ""; + std::string tagName = ""; if (!is.matchTag(tagName)) throw TException("Bad file format"); @@ -501,16 +501,16 @@ void ToonzScene::loadTnzFile(const TFilePath &fp) if (!is) throw TException(fp.getWideString() + L": Can't open file"); try { - string tagName = ""; + std::string tagName = ""; if (!is.matchTag(tagName)) throw TException("Bad file format"); if (tagName == "tab" || tagName == "tnz") { - string rootTagName = tagName; - string v = is.getTagAttribute("version"); + std::string rootTagName = tagName; + std::string v = is.getTagAttribute("version"); VersionNumber versionNumber(0, 0); int k = v.find("."); - if (k != (int)string::npos && 0 < k && k < (int)v.length()) { + if (k != (int)std::string::npos && 0 < k && k < (int)v.length()) { versionNumber.first = toInt(v.substr(0, k)); versionNumber.second = toInt(v.substr(k + 1)); } @@ -520,8 +520,8 @@ void ToonzScene::loadTnzFile(const TFilePath &fp) is.setVersion(versionNumber); while (is.matchTag(tagName)) { if (tagName == "generator") { - string program = is.getString(); - reading22 = program.find("2.2") != string::npos; + std::string program = is.getString(); + reading22 = program.find("2.2") != std::string::npos; } else if (tagName == "properties") m_properties->loadData(is, false); else if (tagName == "palette") // per compatibilita' beta1 @@ -594,7 +594,7 @@ void ToonzScene::loadTnzFile(const TFilePath &fp) void ToonzScene::setUntitled() { m_isUntitled = true; - const string baseName = "untitled"; + const std::string baseName = "untitled"; TFilePath tempDir = getUntitledScenesDir(); if (TFileStatus(tempDir).doesExist() == false) { try { @@ -603,7 +603,7 @@ void ToonzScene::setUntitled() } } - string name = baseName; + std::string name = baseName; if (TFileStatus(tempDir + name).doesExist()) { int count = 2; do { @@ -678,7 +678,7 @@ void ToonzScene::save(const TFilePath &fp, TXsheet *subxsh) if (xsh == 0) xsh = m_childStack->getTopXsheet(); - std::map attr; + std::map attr; attr["version"] = (QString::number(l_currentVersion.first) + "." // From now on, version numbers in saved files will have + QString::number(l_currentVersion.second)) // the signature "MAJOR.MINOR", where: .toStdString(); // @@ -712,7 +712,7 @@ void ToonzScene::save(const TFilePath &fp, TXsheet *subxsh) os.openChild("history"); QString data = getContentHistory()->serialize(); int i = 0, j; - // non scrivo tutta la string di seguito per evitare problemi se diventa + // non scrivo tutta la std::string di seguito per evitare problemi se diventa // troppo lunga. Cerco di spezzarla in modo che sia "bella da leggere" nel tnz while ((j = data.indexOf("||", i)) >= i) { os << data.mid(i, j - i + 1).toStdWString(); @@ -838,7 +838,7 @@ void ToonzScene::renderFrame(const TRaster32P &ras, int row, const TXsheet *xsh, //----------------------------------------------------------------------------- -TXshLevel *ToonzScene::createNewLevel(int type, wstring levelName, const TDimension &dim, double dpi, TFilePath fp) +TXshLevel *ToonzScene::createNewLevel(int type, std::wstring levelName, const TDimension &dim, double dpi, TFilePath fp) { TLevelSet *levelSet = getLevelSet(); @@ -1244,12 +1244,12 @@ TFilePath ToonzScene::decodeFilePath(const TFilePath &path) const bool projectIsEmpty = false; TFilePath fp = path; - wstring head; + std::wstring head; TFilePath tail; path.split(head, tail); - string h; - wstring s; + std::string h; + std::wstring s; if (head != L"" && head[0] == L'+') { if (TProjectManager::instance()->isTabModeEnabled()) { return m_scenePath.getParentDir() + @@ -1278,13 +1278,13 @@ TFilePath ToonzScene::decodeFilePath(const TFilePath &path) const } } if (s != L"") { - map table; + std::map table; // se la scena e' untitled e l'espansione del path // dipende dalla scena (o perche' l'espansione contiene // $scenename, $scenepath o perche' si usa il savepath) if (m_isUntitled && - (s.find(L"$scene") != wstring::npos || + (s.find(L"$scene") != std::wstring::npos || project->getUseScenePath(h) || fp.getParentDir().getName() == getScenePath().getName())) { TFilePath parentDir = getScenePath().getParentDir(); @@ -1309,13 +1309,13 @@ TFilePath ToonzScene::decodeFilePath(const TFilePath &path) const table[L"$scenepath"] = scenePath.withType("").getWideString(); table[L"$scenename"] = scenePath.withType("").getWideString(); - std::map::reverse_iterator it; + std::map::reverse_iterator it; for (it = table.rbegin(); it != table.rend(); ++it) { - wstring keyword = it->first; + std::wstring keyword = it->first; int i = 0; for (;;) { int j = s.find(keyword, i); - if (j == (int)wstring::npos) + if (j == (int)std::wstring::npos) break; s.replace(j, keyword.length(), it->second); i = j; @@ -1351,7 +1351,7 @@ TFilePath ToonzScene::codeFilePath(const TFilePath &path) const //----------------------------------------------------------------------------- -TFilePath ToonzScene::getDefaultLevelPath(int levelType, wstring levelName) const +TFilePath ToonzScene::getDefaultLevelPath(int levelType, std::wstring levelName) const { TProject *project = getProject(); assert(project); @@ -1374,7 +1374,7 @@ TFilePath ToonzScene::getDefaultLevelPath(int levelType, wstring levelName) cons default: levelPath = TFilePath(levelName + L"..png"); } - string folderName = getFolderName(levelType); + std::string folderName = getFolderName(levelType); if (project->getUseScenePath(folderName)) return TFilePath("+" + folderName) + getSavePath() + levelPath; else @@ -1383,7 +1383,7 @@ TFilePath ToonzScene::getDefaultLevelPath(int levelType, wstring levelName) cons //----------------------------------------------------------------------------- -const wstring savePathString(L"$savepath"); +const std::wstring savePathString(L"$savepath"); //----------------------------------------------------------------------------- @@ -1412,7 +1412,7 @@ TFilePath ToonzScene::codeSavePath(TFilePath path) const head == TFilePath() || head.getWideString()[0] != L'+') return originalPath; - string folderName = toString(head.getWideString().substr(1)); + std::string folderName = toString(head.getWideString().substr(1)); if (!getProject()->getUseScenePath(folderName)) return originalPath; return head + savePathString + filename; @@ -1422,9 +1422,9 @@ TFilePath ToonzScene::codeSavePath(TFilePath path) const TFilePath ToonzScene::decodeSavePath(TFilePath path) const { - wstring s = path.getWideString(); + std::wstring s = path.getWideString(); int i = s.find(savePathString); - if (i != (int)wstring::npos) { + if (i != (int)std::wstring::npos) { TFilePath savePath = getSavePath(); s.replace(i, savePathString.length(), savePath.getWideString()); return TFilePath(s); @@ -1547,7 +1547,7 @@ TFilePath ToonzScene::getIconPath(const TFilePath &scenePath) TFilePath ToonzScene::getSavePath() const { - string sceneName = getScenePath().getName(); + std::string sceneName = getScenePath().getName(); if (isUntitled()) return TFilePath(sceneName); TFilePath sceneRoot = decodeFilePath(TFilePath("+" + TProject::Scenes)); diff --git a/toonz/sources/toonzlib/toutlinevectorizer.cpp b/toonz/sources/toonzlib/toutlinevectorizer.cpp index bebfc19..b4e4faa 100644 --- a/toonz/sources/toonzlib/toutlinevectorizer.cpp +++ b/toonz/sources/toonzlib/toutlinevectorizer.cpp @@ -189,12 +189,12 @@ public: OutlineConfiguration m_configuration; DataRasterP m_dataRaster; - vector> m_dataRasterArray; + std::vector> m_dataRasterArray; TVectorImageP m_vimage; - vector m_nodes; - list> m_protoOutlines; + std::vector m_nodes; + std::list> m_protoOutlines; - vector m_junctions; + std::vector m_junctions; OutlineVectorizer(const OutlineConfiguration &configuration, TPalette *palette) : m_configuration(configuration), m_palette(palette) {} @@ -636,7 +636,7 @@ void OutlineVectorizer::makeDataRaster(const TRasterP &src) } assert(inkId); - m_dataRasterArray.push_back(pair(inkId, dataRaster)); + m_dataRasterArray.push_back(std::pair(inkId, dataRaster)); int maxDistance2 = m_configuration.m_threshold * m_configuration.m_threshold; for (y = 0; y < m_src->getLy(); y++) { @@ -672,7 +672,7 @@ void OutlineVectorizer::makeDataRaster(const TRasterP &src) } assert(inkId); - m_dataRasterArray.push_back(pair(inkId, dataRaster)); + m_dataRasterArray.push_back(std::pair(inkId, dataRaster)); int threshold = m_configuration.m_threshold; for (y = 0; y < m_src->getLy(); y++) { @@ -712,7 +712,7 @@ void OutlineVectorizer::makeDataRaster(const TRasterP &src) } assert(inkId); - m_dataRasterArray.push_back(pair(inkId, dataRaster)); + m_dataRasterArray.push_back(std::pair(inkId, dataRaster)); // inizializza la parte centrale for (y = 0; y < m_src->getLy(); y++) { @@ -770,7 +770,7 @@ void OutlineVectorizer::makeDataRaster(const TRasterP &src) int threshold = m_configuration.m_threshold; //tolerance: 1->MAX thresh: 1-255 currInk = nextInk; nextInk = 0; - m_dataRasterArray.push_back(pair(currInk, dataRaster)); + m_dataRasterArray.push_back(std::pair(currInk, dataRaster)); // inizializza la parte centrale for (y = 0; y < m_src->getLy(); y++) { diff --git a/toonz/sources/toonzlib/tpinnedrangeset.cpp b/toonz/sources/toonzlib/tpinnedrangeset.cpp index 20b139e..847c1e6 100644 --- a/toonz/sources/toonzlib/tpinnedrangeset.cpp +++ b/toonz/sources/toonzlib/tpinnedrangeset.cpp @@ -45,7 +45,7 @@ int TPinnedRangeSet::getRangeIndex(int frame) const void TPinnedRangeSet::setRange(int first, int second) { - vector::iterator it; + std::vector::iterator it; // finds the range which could possibly be merged before : range.second+1 >= first for (it = m_ranges.begin(); it != m_ranges.end(); ++it) if (it->second + 1 >= first) @@ -62,7 +62,7 @@ void TPinnedRangeSet::setRange(int first, int second) if (first < it->first) it->first = first; // update it->second, and find all the ranges which should be deleted - vector::iterator it2 = it; + std::vector::iterator it2 = it; for (++it2; it2 != m_ranges.end(); ++it2) if (it2->first > second + 1) break; @@ -80,7 +80,7 @@ void TPinnedRangeSet::setRange(int first, int second) void TPinnedRangeSet::removeRange(int first, int second) { - vector::iterator it; + std::vector::iterator it; // finds the first range which could possibly overlap [first,second] : range.second>=first for (it = m_ranges.begin(); it != m_ranges.end(); ++it) if (it->second >= first) @@ -94,7 +94,7 @@ void TPinnedRangeSet::removeRange(int first, int second) it->first = second + 1; m_ranges.insert(it, range); } else { - vector::iterator it2; + std::vector::iterator it2; if (it->first < first) { it->second = first - 1; ++it; @@ -141,7 +141,7 @@ void TPinnedRangeSet::loadData(TIStream &is) m_ranges.clear(); int prevFrame = 0; int i = 0; - string tagName; + std::string tagName; int count = 0; while (is.matchTag(tagName) && count < 3) { if (tagName == "permanent") { diff --git a/toonz/sources/toonzlib/tproject.cpp b/toonz/sources/toonzlib/tproject.cpp index 8d17e17..c2366f3 100644 --- a/toonz/sources/toonzlib/tproject.cpp +++ b/toonz/sources/toonzlib/tproject.cpp @@ -38,7 +38,7 @@ const int prjSuffixCount = 4; //=================================================================== /*! Default inputs folder: is used to save all scanned immage.*/ -const string +const std::string TProject::Inputs = "inputs", /*! Default drawings folder: is used to save all tlv and pli levels.*/ TProject::Drawings = "drawings", @@ -283,7 +283,7 @@ TProject::~TProject() */ void TProject::setFolder(string name, TFilePath path) { - std::map::iterator it; + std::map::iterator it; it = m_folders.find(name); if (it == m_folders.end()) { m_folderNames.push_back(name); @@ -311,7 +311,7 @@ void TProject::setFolder(string name) */ TFilePath TProject::getFolder(string name) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_folders.find(name); if (it != m_folders.end()) return it->second; @@ -376,7 +376,7 @@ string TProject::getFolderName(int index) const */ int TProject::getFolderIndex(string name) const { - std::vector::const_iterator it; + std::vector::const_iterator it; it = std::find( m_folderNames.begin(), m_folderNames.end(), @@ -439,7 +439,7 @@ void TProject::setUseScenePath(string folderName, bool on) bool TProject::getUseScenePath(string folderName) const { - std::map::const_iterator it; + std::map::const_iterator it; it = m_useScenePathFlags.find(folderName); return it != m_useScenePathFlags.end() ? it->second : false; } @@ -559,7 +559,7 @@ bool TProject::save(const TFilePath &projectPath) TFilePath folderRelativePath = getFolder(i); if (folderRelativePath == TFilePath()) continue; - std::map attr; + std::map attr; string folderName = getFolderName(i); attr["name"] = folderName; attr["path"] = toString(folderRelativePath); // escape() @@ -607,7 +607,7 @@ bool TProject::save(const TFilePath &projectPath) TFilePath relativeProjectFolder = makeRelative(folderpath, m_path.getParentDir()); TOStream os2(xmlPath); - std::map attr; + std::map attr; attr["type"] = "projectFolder"; os2.openChild("parentProject", attr); os2 << relativeProjectFolder; @@ -904,7 +904,7 @@ TFilePath TProjectManager::getProjectPathByName(const TFilePath &projectName) /*! Gets all project folder names and put them in the passed vector \b names. \note All previous data contained in \b names are lost.*/ -void TProjectManager::getFolderNames(std::vector &names) +void TProjectManager::getFolderNames(std::vector &names) { names.clear(); TFilePath fp = ToonzFolder::getProfileFolder() + "project_folders.txt"; @@ -930,7 +930,7 @@ void TProjectManager::getFolderNames(std::vector &names) } } catch (...) { } - const string stdNames[] = { + const std::string stdNames[] = { TProject::Inputs, TProject::Drawings, TProject::Scenes, TProject::Extras, TProject::Outputs, TProject::Scripts}; for (int i = 0; i < (int)tArrayCount(stdNames); i++) { diff --git a/toonz/sources/toonzlib/trasterimageutils.cpp b/toonz/sources/toonzlib/trasterimageutils.cpp index d1f1dce..f3f8911 100644 --- a/toonz/sources/toonzlib/trasterimageutils.cpp +++ b/toonz/sources/toonzlib/trasterimageutils.cpp @@ -237,7 +237,7 @@ TRectD TRasterImageUtils::convertRasterToWorld(const TRect &area, const TRasterI TRasterImageP TRasterImageUtils::vectorToFullColorImage( const TVectorImageP &vimage, const TAffine &aff, TPalette *palette, const TPointD &outputPos, const TDimension &outputSize, - const vector *fxs, bool transformThickness) + const std::vector *fxs, bool transformThickness) { if (!vimage || !palette) return 0; @@ -256,8 +256,8 @@ TRasterImageP TRasterImageUtils::vectorToFullColorImage( vi->transform(TTranslation(-outputPos)); int strokeCount = vi->getStrokeCount(); - vector strokeIndex(strokeCount); - vector strokes(strokeCount); + std::vector strokeIndex(strokeCount); + std::vector strokes(strokeCount); int i; for (i = 0; i < strokeCount; ++i) { strokeIndex[i] = i; @@ -276,8 +276,8 @@ TRasterImageP TRasterImageUtils::vectorToFullColorImage( for (i = 0; i < (int)fxs->size(); i++) { SandorFxRenderData *sandorData = dynamic_cast((*fxs)[i].getPointer()); if (sandorData && sandorData->m_type == BlendTz) { - string indexes = toString(sandorData->m_blendParams.m_colorIndex); - vector items; + std::string indexes = toString(sandorData->m_blendParams.m_colorIndex); + std::vector items; parseIndexes(indexes, items); PaletteFilterFxRenderData paletteFilterData; insertIndexes(items, &paletteFilterData); @@ -334,9 +334,9 @@ TRect TRasterImageUtils::eraseRect(const TRasterImageP &ri, const TRectD &area) //------------------------------------------------------------------- -vector TRasterImageUtils::paste(const TRasterImageP &ri, const TTileSetFullColor *tileSet) +std::vector TRasterImageUtils::paste(const TRasterImageP &ri, const TTileSetFullColor *tileSet) { - vector rects; + std::vector rects; TRasterP raster = ri->getRaster(); for (int i = 0; i < tileSet->getTileCount(); i++) { const TTileSetFullColor::Tile *tile = tileSet->getTile(i); @@ -351,7 +351,7 @@ vector TRasterImageUtils::paste(const TRasterImageP &ri, const TTileSetFu //------------------------------------------------------------------- void TRasterImageUtils::addSceneNumbering(const TRasterImageP &ri, int globalIndex, - const wstring &sceneName, int sceneIndex) + const std::wstring &sceneName, int sceneIndex) { if (!ri) return; @@ -403,7 +403,7 @@ void TRasterImageUtils::addSceneNumbering(const TRasterImageP &ri, int globalInd //------------------------------------------------------------------- -void TRasterImageUtils::addGlobalNumbering(const TRasterImageP &ri, const wstring &sceneName, int globalIndex) +void TRasterImageUtils::addGlobalNumbering(const TRasterImageP &ri, const std::wstring &sceneName, int globalIndex) { if (!ri) return; diff --git a/toonz/sources/toonzlib/tstageobject.cpp b/toonz/sources/toonzlib/tstageobject.cpp index 67fb3d7..1c1fc84 100644 --- a/toonz/sources/toonzlib/tstageobject.cpp +++ b/toonz/sources/toonzlib/tstageobject.cpp @@ -1697,7 +1697,7 @@ void TStageObject::updateKeyframes() void TStageObject::saveData(TOStream &os) { TStageObjectId parentId = getParent(); - std::map attr; + std::map attr; attr["id"] = parentId.toString(); attr["handle"] = m_handle; attr["parentHandle"] = m_parentHandle; diff --git a/toonz/sources/toonzlib/tstageobjectcmd.cpp b/toonz/sources/toonzlib/tstageobjectcmd.cpp index 1955901..ea94ec3 100644 --- a/toonz/sources/toonzlib/tstageobjectcmd.cpp +++ b/toonz/sources/toonzlib/tstageobjectcmd.cpp @@ -540,14 +540,14 @@ public: class RemoveColumnsUndo : public TUndo { - vector m_deletedFx; - vector m_terminalFx; + std::vector m_deletedFx; + std::vector m_terminalFx; QMap> m_columnFxConnections; QList m_notTerminalColumns; TXsheetHandle *m_xshHandle; public: - RemoveColumnsUndo(const vector &deletedFx, const vector &terminalFx, + RemoveColumnsUndo(const std::vector &deletedFx, const std::vector &terminalFx, const QMap> columnFxConnections, const QList ¬TerminalColumns, TXsheetHandle *xshHandle) @@ -699,7 +699,7 @@ class UndoUngroup : public TUndo QList m_objsId; QList m_positions; int m_groupId; - wstring m_groupName; + std::wstring m_groupName; TXsheetHandle *m_xshHandle; public: @@ -773,13 +773,13 @@ class UndoRenameGroup : public TUndo { QList m_objs; QList m_positions; - wstring m_oldGroupName; - wstring m_newGroupName; + std::wstring m_oldGroupName; + std::wstring m_newGroupName; TXsheetHandle *m_xshHandle; public: UndoRenameGroup(const QList &objs, const QList &positions, - const wstring &newName, const wstring &oldName, TXsheetHandle *xshHandle) + const std::wstring &newName, const std::wstring &oldName, TXsheetHandle *xshHandle) : m_objs(objs), m_newGroupName(newName), m_oldGroupName(oldName), m_xshHandle(xshHandle), m_positions(positions) { assert(objs.size() > 0); @@ -979,7 +979,7 @@ void removeColums(const QVector &columnIndexes, TXsheetHandle *xshHandle, int j, outputPortCount = fx->getOutputConnectionCount(); for (j = outputPortCount - 1; j >= 0; j--) { TFxPort *port = fx->getOutputConnection(j); - vector::iterator it = std::find(fxsToKill.begin(), fxsToKill.end(), port->getOwnerFx()); + std::vector::iterator it = std::find(fxsToKill.begin(), fxsToKill.end(), port->getOwnerFx()); std::set::iterator it2 = std::find(leafesFx.begin(), leafesFx.end(), port->getFx()); if (it == fxsToKill.end() && it2 == leafesFx.end()) port->setFx(0); @@ -1122,17 +1122,17 @@ public: //------------------------------------------------------------------- -class StageObjectRenameUndo : public SetAttributeUndo +class StageObjectRenameUndo : public SetAttributeUndo { public: - StageObjectRenameUndo(const TStageObjectId &id, TXsheetHandle *xshHandle, string oldName, string newName) - : SetAttributeUndo(id, xshHandle, oldName, newName) {} - void setAttribute(TStageObject *pegbar, string name) const { pegbar->setName(name); } + StageObjectRenameUndo(const TStageObjectId &id, TXsheetHandle *xshHandle, std::string oldName, std::string newName) + : SetAttributeUndo(id, xshHandle, oldName, newName) {} + void setAttribute(TStageObject *pegbar, std::string name) const { pegbar->setName(name); } QString getActionName() { return QString("Rename Object"); } - QString getStringFromValue(string value) + QString getStringFromValue(std::string value) { return QString::fromStdString(value); } @@ -1179,23 +1179,23 @@ public: //------------------------------------------------------------------- -class SetHandleUndo : public SetAttributeUndo +class SetHandleUndo : public SetAttributeUndo { TPointD m_center, m_offset; TXsheetHandle *m_xshHandle; public: - SetHandleUndo(const TStageObjectId &id, string oldHandle, string newHandle, TXsheetHandle *xshHandle) - : SetAttributeUndo(id, xshHandle, oldHandle, newHandle), m_xshHandle(xshHandle) + SetHandleUndo(const TStageObjectId &id, std::string oldHandle, std::string newHandle, TXsheetHandle *xshHandle) + : SetAttributeUndo(id, xshHandle, oldHandle, newHandle), m_xshHandle(xshHandle) { TStageObject *pegbar = getStageObject(); if (pegbar) pegbar->getCenterAndOffset(m_center, m_offset); } - void setAttribute(TStageObject *pegbar, string handle) const { pegbar->setHandle(handle); } + void setAttribute(TStageObject *pegbar, std::string handle) const { pegbar->setHandle(handle); } void undo() const { - SetAttributeUndo::undo(); + SetAttributeUndo::undo(); TStageObject *pegbar = getStageObject(); if (pegbar) pegbar->setCenterAndOffset(m_center, m_offset); @@ -1205,7 +1205,7 @@ public: { return QString("Set Handle"); } - QString getStringFromValue(string value) + QString getStringFromValue(std::string value) { return QString::fromStdString(value); } @@ -1213,17 +1213,17 @@ public: //------------------------------------------------------------------- -class SetParentHandleUndo : public SetAttributeUndo +class SetParentHandleUndo : public SetAttributeUndo { public: - SetParentHandleUndo(const TStageObjectId &id, TXsheetHandle *xshHandle, string oldHandle, string newHandle) - : SetAttributeUndo(id, xshHandle, oldHandle, newHandle) {} - void setAttribute(TStageObject *pegbar, string handle) const { pegbar->setParentHandle(handle); } + SetParentHandleUndo(const TStageObjectId &id, TXsheetHandle *xshHandle, std::string oldHandle, std::string newHandle) + : SetAttributeUndo(id, xshHandle, oldHandle, newHandle) {} + void setAttribute(TStageObject *pegbar, std::string handle) const { pegbar->setParentHandle(handle); } QString getActionName() { return QString("Set Parent Handle"); } - QString getStringFromValue(string value) + QString getStringFromValue(std::string value) { return QString::fromStdString(value); } @@ -1231,15 +1231,15 @@ public: //------------------------------------------------------------------- -typedef std::pair ParentIdAndHandle; +typedef std::pair ParentIdAndHandle; class SetParentUndo : public SetAttributeUndo { public: SetParentUndo( const TStageObjectId &id, TXsheetHandle *xshHandle, - TStageObjectId oldParentId, string oldParentHandle, - TStageObjectId newParentId, string newParentHandle) + TStageObjectId oldParentId, std::string oldParentHandle, + TStageObjectId newParentId, std::string newParentHandle) : SetAttributeUndo(id, xshHandle, ParentIdAndHandle(oldParentId, oldParentHandle), ParentIdAndHandle(newParentId, newParentHandle)) {} @@ -1346,12 +1346,12 @@ public: // //------------------------------------------------------------------- -void TStageObjectCmd::rename(const TStageObjectId &id, string name, TXsheetHandle *xshHandle) +void TStageObjectCmd::rename(const TStageObjectId &id, std::string name, TXsheetHandle *xshHandle) { TStageObject *pegbar = xshHandle->getXsheet()->getStageObject(id); if (!pegbar) return; - string oldName = pegbar->getName(); + std::string oldName = pegbar->getName(); if (oldName == name) return; pegbar->setName(name); @@ -1415,12 +1415,12 @@ void TStageObjectCmd::resetPosition(const TStageObjectId &id, TXsheetHandle *xsh // //------------------------------------------------------------------- -void TStageObjectCmd::setHandle(const TStageObjectId &id, string handle, TXsheetHandle *xshHandle) +void TStageObjectCmd::setHandle(const TStageObjectId &id, std::string handle, TXsheetHandle *xshHandle) { TStageObject *peg = xshHandle->getXsheet()->getStageObject(id); if (!peg) return; - string oldHandle = peg->getHandle(); + std::string oldHandle = peg->getHandle(); TUndoManager::manager()->add(new SetHandleUndo(id, oldHandle, handle, xshHandle)); peg->setHandle(handle); } @@ -1431,14 +1431,14 @@ void TStageObjectCmd::setHandle(const TStageObjectId &id, string handle, TXsheet // //------------------------------------------------------------------- -void TStageObjectCmd::setParentHandle(const std::vector &ids, string handle, TXsheetHandle *xshHandle) +void TStageObjectCmd::setParentHandle(const std::vector &ids, std::string handle, TXsheetHandle *xshHandle) { for (int i = 0; i < (int)ids.size(); i++) { TStageObjectId id = ids[i]; TStageObject *peg = xshHandle->getXsheet()->getStageObject(id); if (!peg) continue; - string oldHandle = peg->getParentHandle(); + std::string oldHandle = peg->getParentHandle(); peg->setParentHandle(handle); TUndoManager::manager()->add(new SetParentHandleUndo(id, xshHandle, oldHandle, handle)); } @@ -1453,7 +1453,7 @@ void TStageObjectCmd::setParentHandle(const std::vector &ids, st void TStageObjectCmd::setParent( const TStageObjectId &id, TStageObjectId parentId, - string parentHandle, + std::string parentHandle, TXsheetHandle *xshHandle, bool doUndo) { if (parentId == TStageObjectId::NoneId) { @@ -1467,7 +1467,7 @@ void TStageObjectCmd::setParent( if (!stageObject) return; TStageObjectId oldParentId = stageObject->getParent(); - string oldParentHandle; + std::string oldParentHandle; if (oldParentId != TStageObjectId::NoneId) oldParentHandle = stageObject->getParentHandle(); @@ -1737,9 +1737,9 @@ void TStageObjectCmd::ungroup(int groupId, TXsheetHandle *xshHandle) // //------------------------------------------------------------------- -void TStageObjectCmd::renameGroup(const QList objs, const wstring &name, bool fromEditor, TXsheetHandle *xshHandle) +void TStageObjectCmd::renameGroup(const QList objs, const std::wstring &name, bool fromEditor, TXsheetHandle *xshHandle) { - wstring oldName; + std::wstring oldName; TStageObjectTree *pegTree = xshHandle->getXsheet()->getStageObjectTree(); QList positions; int i; diff --git a/toonz/sources/toonzlib/tstageobjectspline.cpp b/toonz/sources/toonzlib/tstageobjectspline.cpp index d5039fd..f60dcea 100644 --- a/toonz/sources/toonzlib/tstageobjectspline.cpp +++ b/toonz/sources/toonzlib/tstageobjectspline.cpp @@ -115,7 +115,7 @@ TStageObjectSpline::TStageObjectSpline() : TSmartObject(m_classCode), m_stroke(0), m_dagNodePos(TConst::nowhere), m_id(-1), m_idBase(toString(idBaseCode++)), m_name(""), m_isOpened(false) { double d = 30; - vector points; + std::vector points; points.push_back(TPointD(0, 0)); points.push_back(TPointD(d, 0)); points.push_back(TPointD(2.0 * d, 0)); @@ -180,7 +180,7 @@ void TStageObjectSpline::setStroke(TStroke *stroke) void TStageObjectSpline::loadData(TIStream &is) { - vector points; + std::vector points; VersionNumber tnzVersion = is.getVersion(); if (tnzVersion < VersionNumber(1, 16)) { while (!is.eos()) { @@ -189,7 +189,7 @@ void TStageObjectSpline::loadData(TIStream &is) points.push_back(p); } } else { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "splineId") is >> m_id; @@ -253,7 +253,7 @@ int TStageObjectSpline::getId() const //----------------------------------------------------------------------------- -string TStageObjectSpline::getName() const +std::string TStageObjectSpline::getName() const { if (m_name == "") return "Path" + toString(m_id + 1); @@ -262,7 +262,7 @@ string TStageObjectSpline::getName() const //----------------------------------------------------------------------------- -string TStageObjectSpline::getIconId() +std::string TStageObjectSpline::getIconId() { return "spline" + m_idBase; } diff --git a/toonz/sources/toonzlib/tstageobjecttree.cpp b/toonz/sources/toonzlib/tstageobjecttree.cpp index a67bb20..26ea2c8 100644 --- a/toonz/sources/toonzlib/tstageobjecttree.cpp +++ b/toonz/sources/toonzlib/tstageobjecttree.cpp @@ -24,7 +24,7 @@ struct TStageObjectTree::TStageObjectTreeImp { eSmall = 1 }; //!The map contains generic pegbar of pegbar tree. - map m_pegbarTable; + std::map m_pegbarTable; //!Define pegbar tree current camera . TStageObjectId m_currentCameraId; @@ -389,7 +389,7 @@ void TStageObjectTree::swapColumns(int i, int j) void TStageObjectTree::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "splines") { while (!is.eos()) { @@ -400,7 +400,7 @@ void TStageObjectTree::loadData(TIStream &is) } is.matchEndTag(); } else if (tagName == "pegbar") { - string idStr = is.getTagAttribute("id"); + std::string idStr = is.getTagAttribute("id"); if (idStr == "") // vecchio formato { is >> idStr; @@ -421,7 +421,7 @@ void TStageObjectTree::loadData(TIStream &is) m_imp->m_groupIdCount = pegbar->getGroupId(); is.matchEndTag(); - string name = pegbar->getName(); + std::string name = pegbar->getName(); } else if (tagName == "grid_dimension") { is >> m_imp->m_dagGridDimension; is.matchEndTag(); @@ -455,7 +455,7 @@ void TStageObjectTree::saveData(TOStream &os, int occupiedColumnCount) if (objectId.isColumn() && objectId.getIndex() >= occupiedColumnCount) continue; - std::map attr; + std::map attr; attr["id"] = objectId.toString(); if (objectId == m_imp->m_currentCameraId && objectId == m_imp->m_currentPreviewCameraId) attr["activeboth"] = "yes"; @@ -559,7 +559,7 @@ void TStageObjectTree::setHandleManager(HandleManager *hm) //----------------------------------------------------------------------------- -TPointD TStageObjectTree::getHandlePos(const TStageObjectId &id, string handle, int row) const +TPointD TStageObjectTree::getHandlePos(const TStageObjectId &id, std::string handle, int row) const { if (m_imp->m_handleManager) return m_imp->m_handleManager->getHandlePos(id, handle, row); @@ -579,7 +579,7 @@ int TStageObjectTree::getSplineCount() const TStageObjectSpline *TStageObjectTree::getSpline(int index) const { assert(0 <= index && index < getSplineCount()); - map::iterator it = m_imp->m_splines.begin(); + std::map::iterator it = m_imp->m_splines.begin(); for (int i = 0; i < index; i++) it++; return it->second; @@ -589,7 +589,7 @@ TStageObjectSpline *TStageObjectTree::getSpline(int index) const TStageObjectSpline *TStageObjectTree::getSplineById(int splineId) const { - map::iterator it = m_imp->m_splines.find(splineId); + std::map::iterator it = m_imp->m_splines.find(splineId); if (it != m_imp->m_splines.end()) return it->second; return 0; diff --git a/toonz/sources/toonzlib/ttileset.cpp b/toonz/sources/toonzlib/ttileset.cpp index b5abd29..df00008 100644 --- a/toonz/sources/toonzlib/ttileset.cpp +++ b/toonz/sources/toonzlib/ttileset.cpp @@ -41,7 +41,7 @@ void TTileSet::add(Tile *tile) //------------------------------------------------------------------------------------------ -void TTileSet::getRects(vector &rects) const +void TTileSet::getRects(std::vector &rects) const { for (Tiles::const_iterator it = m_tiles.begin(); it != m_tiles.end(); ++it) rects.push_back((*it)->m_rasterBounds); diff --git a/toonz/sources/toonzlib/txshchildlevel.cpp b/toonz/sources/toonzlib/txshchildlevel.cpp index fd913cc..fb534b2 100644 --- a/toonz/sources/toonzlib/txshchildlevel.cpp +++ b/toonz/sources/toonzlib/txshchildlevel.cpp @@ -20,7 +20,7 @@ PERSIST_IDENTIFIER(TXshChildLevel, "childLevel") //============================================================================= // TXshChildLevel -TXshChildLevel::TXshChildLevel(wstring name) +TXshChildLevel::TXshChildLevel(std::wstring name) : TXshLevel(m_classCode, name), m_xsheet(new TXsheet()), m_iconId() { m_xsheet->addRef(); @@ -49,10 +49,10 @@ void TXshChildLevel::loadData(TIStream &is) m_xsheet = 0; is >> m_xsheet; m_xsheet->addRef(); - string tagName; + std::string tagName; if (is.matchTag(tagName)) { if (tagName == "name") { - wstring name; + std::wstring name; is >> name; setName(name); } diff --git a/toonz/sources/toonzlib/txsheetexpr.cpp b/toonz/sources/toonzlib/txsheetexpr.cpp index 7ac9138..6c68b94 100644 --- a/toonz/sources/toonzlib/txsheetexpr.cpp +++ b/toonz/sources/toonzlib/txsheetexpr.cpp @@ -173,20 +173,20 @@ public: XsheetReferencePattern(TXsheet *xsh) : m_xsh(xsh) { setDescription( - string("object.action\nTransformation reference\n") + + std::string("object.action\nTransformation reference\n") + "object can be: tab, table, cam, camera, col, peg, pegbar\n" + "action can be: ns,ew,rot,ang,angle,z,zdepth,sx,sy,sc,scale,scalex,scaley,path,pos,shx,shy"); } TStageObjectId matchObjectName(const Token &token) const { - string s = toLower(token.getText()); + std::string s = toLower(token.getText()); int len = (int)s.length(), i, j; for (i = 0; i < len && isascii(s[i]) && isalpha(s[i]); i++) { } if (i == 0) return TStageObjectId::NoneId; - string a = s.substr(0, i); + std::string a = s.substr(0, i); int index = 0; for (j = i; j < len && isascii(s[j]) && isdigit(s[j]); j++) index = index * 10 + (s[j] - '0'); @@ -208,7 +208,7 @@ public: TStageObject::Channel matchChannelName(const Token &token) const { - string s = toLower(token.getText()); + std::string s = toLower(token.getText()); if (s == "ns") return TStageObject::T_Y; else if (s == "ew") @@ -268,7 +268,7 @@ public: void getAcceptableKeywords(std::vector &keywords) const { - const string ks[] = {"table", "tab", "col", "cam", "camera", "peg", "pegbar"}; + const std::string ks[] = { "table", "tab", "col", "cam", "camera", "peg", "pegbar" }; for (int i = 0; i < tArrayCount(ks); i++) keywords.push_back(ks[i]); } @@ -284,7 +284,7 @@ public: TStageObjectId objectId = matchObjectName(tokens[0]); - string field = toLower(tokens[2].getText()); + std::string field = toLower(tokens[2].getText()); if (field == "cell" || field == "cel" || field == "cels") { int columnIndex = objectId.getIndex(); stack.push_back(new XsheetDrawingCalculatorNode(calc, m_xsh, columnIndex, frameNode)); @@ -316,13 +316,13 @@ public: int i; for (i = 0; i < fx->getParams()->getParamCount(); i++) { TParam *param = fx->getParams()->getParam(i); - string paramName = toString(TStringTable::translate(fx->getFxType() + "." + param->getName())); + std::string paramName = toString(TStringTable::translate(fx->getFxType() + "." + param->getName())); int i = paramName.find(" "); - while (i != string::npos) { + while (i != std::string::npos) { paramName.erase(i, 1); i = paramName.find(" "); } - string paramNameToCheck = token.getText(); + std::string paramNameToCheck = token.getText(); if (paramName == paramNameToCheck || toLower(paramName) == toLower(paramNameToCheck)) return param; } @@ -333,19 +333,19 @@ public: int i; for (i = 0; i < paramSet->getParamCount(); i++) { TParam *param = paramSet->getParam(i).getPointer(); - string paramName = param->getName(); + std::string paramName = param->getName(); int i = paramName.find(" "); - while (i != string::npos) { + while (i != std::string::npos) { paramName.erase(i, 1); i = paramName.find(" "); } - string paramNameToCheck = token.getText(); + std::string paramNameToCheck = token.getText(); if (paramName == paramNameToCheck || toLower(paramName) == toLower(paramNameToCheck)) return param; } return 0; } - string getFirstKeyword() const { return "fx"; } + std::string getFirstKeyword() const { return "fx"; } bool expressionExpected(const std::vector &previousTokens) const { return !previousTokens.empty() && previousTokens.back().getText() == "("; @@ -353,7 +353,7 @@ public: bool matchToken(const std::vector &previousTokens, const Token &token) const { int i = (int)previousTokens.size(); - string s = toLower(token.getText()); + std::string s = toLower(token.getText()); if (i == 0 && s == "fx") return true; else if (i == 1) @@ -470,7 +470,7 @@ public: "action must be one of the parameter names available for a Plastic Skeleton vertex"); } - virtual string getFirstKeyword() const { return "vertex"; } + virtual std::string getFirstKeyword() const { return "vertex"; } bool expressionExpected(const std::vector &previousTokens) const { diff --git a/toonz/sources/toonzlib/txshlevel.cpp b/toonz/sources/toonzlib/txshlevel.cpp index 9931f90..4e30bf7 100644 --- a/toonz/sources/toonzlib/txshlevel.cpp +++ b/toonz/sources/toonzlib/txshlevel.cpp @@ -6,7 +6,7 @@ //----------------------------------------------------------------------------- -TXshLevel::TXshLevel(ClassCode code, wstring name) +TXshLevel::TXshLevel(ClassCode code, std::wstring name) : TSmartObject(code), m_name(name), m_type(UNKNOWN_XSHLEVEL), m_hookSet(new HookSet()), m_scene(0) { updateShortName(); @@ -28,7 +28,7 @@ void TXshLevel::setScene(ToonzScene *scene) //----------------------------------------------------------------------------- -void TXshLevel::setName(wstring name) +void TXshLevel::setName(std::wstring name) { m_name = name; updateShortName(); diff --git a/toonz/sources/toonzlib/txshlevelcolumn.cpp b/toonz/sources/toonzlib/txshlevelcolumn.cpp index 412d371..033a1db 100644 --- a/toonz/sources/toonzlib/txshlevelcolumn.cpp +++ b/toonz/sources/toonzlib/txshlevelcolumn.cpp @@ -117,7 +117,7 @@ TXshColumn *TXshLevelColumn::clone() const void TXshLevelColumn::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "status") { int status; diff --git a/toonz/sources/toonzlib/txshmeshcolumn.cpp b/toonz/sources/toonzlib/txshmeshcolumn.cpp index 4b4f211..023b201 100644 --- a/toonz/sources/toonzlib/txshmeshcolumn.cpp +++ b/toonz/sources/toonzlib/txshmeshcolumn.cpp @@ -132,7 +132,7 @@ void TXshMeshColumn::saveData(TOStream &os) void TXshMeshColumn::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "status") { int status; diff --git a/toonz/sources/toonzlib/txshnoteset.cpp b/toonz/sources/toonzlib/txshnoteset.cpp index b31f5d5..44b0bd1 100644 --- a/toonz/sources/toonzlib/txshnoteset.cpp +++ b/toonz/sources/toonzlib/txshnoteset.cpp @@ -144,11 +144,11 @@ void TXshNoteSet::setNotePos(int noteIndex, TPointD pos) void TXshNoteSet::loadData(TIStream &is) { while (!is.eos()) { - string tagName; + std::string tagName; if (is.matchTag(tagName)) { if (tagName == "notes") { while (!is.eos()) { - string tagName; + std::string tagName; if (is.matchTag(tagName)) { if (tagName == "note") { Note note; diff --git a/toonz/sources/toonzlib/txshpalettecolumn.cpp b/toonz/sources/toonzlib/txshpalettecolumn.cpp index 53ae869..9f6f9d9 100644 --- a/toonz/sources/toonzlib/txshpalettecolumn.cpp +++ b/toonz/sources/toonzlib/txshpalettecolumn.cpp @@ -60,7 +60,7 @@ bool TXshPaletteColumn::canSetCell(const TXshCell &cell) const void TXshPaletteColumn::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "cells") { while (is.openChild(tagName)) { diff --git a/toonz/sources/toonzlib/txshpalettelevel.cpp b/toonz/sources/toonzlib/txshpalettelevel.cpp index 89f7fe1..50c35ba 100644 --- a/toonz/sources/toonzlib/txshpalettelevel.cpp +++ b/toonz/sources/toonzlib/txshpalettelevel.cpp @@ -17,7 +17,7 @@ PERSIST_IDENTIFIER(TXshPaletteLevel, "paletteLevel") //============================================================================= // TXshPaletteLevel -TXshPaletteLevel::TXshPaletteLevel(wstring name) +TXshPaletteLevel::TXshPaletteLevel(std::wstring name) : TXshLevel(m_classCode, name), m_palette(0) { m_type = PLT_XSHLEVEL; @@ -60,10 +60,10 @@ void TXshPaletteLevel::setPath(const TFilePath &path) void TXshPaletteLevel::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "name") { - wstring name; + std::wstring name; is >> name; setName(name); } else if (tagName == "path") { diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cpp index b031098..2c4736a 100644 --- a/toonz/sources/toonzlib/txshsimplelevel.cpp +++ b/toonz/sources/toonzlib/txshsimplelevel.cpp @@ -191,7 +191,7 @@ bool TXshSimpleLevel::m_fillFullColorRaster = false; //----------------------------------------------------------------------------- -TXshSimpleLevel::TXshSimpleLevel(const wstring &name) +TXshSimpleLevel::TXshSimpleLevel(const std::wstring &name) : TXshLevel(m_classCode, name), m_properties(new LevelProperties), m_palette(0), m_idBase(toString(idBaseCode++)), m_editableRangeUserInfo(L""), m_isSubsequence(false), m_16BitChannelLevel(false), m_isReadOnly(false), m_temporaryHookMerged(false) { } @@ -208,7 +208,7 @@ TXshSimpleLevel::~TXshSimpleLevel() //----------------------------------------------------------------------------- -void TXshSimpleLevel::setEditableRange(unsigned int from, unsigned int to, const wstring &userName) +void TXshSimpleLevel::setEditableRange(unsigned int from, unsigned int to, const std::wstring &userName) { assert(from <= to && to < (unsigned int)getFrameCount()); unsigned int i; @@ -218,7 +218,7 @@ void TXshSimpleLevel::setEditableRange(unsigned int from, unsigned int to, const QString hostName = TSystem::getHostName(); m_editableRangeUserInfo = userName + L"_" + hostName.toStdWString(); - wstring fileName = getEditableFileName(); + std::wstring fileName = getEditableFileName(); TFilePath dstPath = getScene()->decodeFilePath(m_path); dstPath = dstPath.withName(fileName).withType(dstPath.getType()); @@ -247,7 +247,7 @@ void TXshSimpleLevel::mergeTemporaryHookFile(unsigned int from, unsigned int to, HookSet *tempHookSet = new HookSet; TIStream is(hookFile); - string tagName; + std::string tagName; try { if (is.matchTag(tagName) && tagName == "hooks") tempHookSet->loadData(is); @@ -290,12 +290,12 @@ void TXshSimpleLevel::clearEditableRange() //----------------------------------------------------------------------------- -wstring TXshSimpleLevel::getEditableFileName() +std::wstring TXshSimpleLevel::getEditableFileName() { #ifdef MACOSX - wstring fileName = L"." + m_path.getWideName(); + std::wstring fileName = L"." + m_path.getWideName(); #else - wstring fileName = m_path.getWideName(); + std::wstring fileName = m_path.getWideName(); #endif fileName += L"_" + m_editableRangeUserInfo; int from, to; @@ -351,11 +351,11 @@ void TXshSimpleLevel::touchFrame(const TFrameId &fid) ch->frameModifiedNow(fid); if (getType() == PLI_XSHLEVEL) { - string id = rasterized(getImageId(fid)); + std::string id = rasterized(getImageId(fid)); ImageManager::instance()->invalidate(id); } if (getType() & FULLCOLOR_TYPE) { - string id = filled(getImageId(fid)); + std::string id = filled(getImageId(fid)); ImageManager::instance()->invalidate(id); } } @@ -369,11 +369,11 @@ void TXshSimpleLevel::onPaletteChanged() const TFrameId &fid = *ft; if (getType() == PLI_XSHLEVEL) { - string id = rasterized(getImageId(fid)); + std::string id = rasterized(getImageId(fid)); ImageManager::instance()->invalidate(id); } if (getType() & FULLCOLOR_TYPE) { - string id = filled(getImageId(fid)); + std::string id = filled(getImageId(fid)); ImageManager::instance()->invalidate(id); } @@ -404,7 +404,7 @@ void TXshSimpleLevel::setPath(const TFilePath &fp, bool keepFrames) if (getType() != PLI_XSHLEVEL) { if (!m_frames.empty()) { - string imageId = getImageId(getFirstFid()); + std::string imageId = getImageId(getFirstFid()); const TImageInfo *imageInfo = ImageManager::instance()->getInfo(imageId, ImageManager::none, 0); if (imageInfo) { TDimension imageRes(0, 0); @@ -604,7 +604,7 @@ TImageP TXshSimpleLevel::getFrame(const TFrameId &fid, UCHAR imFlags, int subsam if (m_frames.count(fid) == 0) return TImageP(); - const string &imgId = getImageId(fid); + const std::string &imgId = getImageId(fid); ImageLoader::BuildExtData extData(this, fid, subsampling); TImageP img = ImageManager::instance()->getImage( @@ -628,7 +628,7 @@ TImageInfo *TXshSimpleLevel::getFrameInfo(const TFrameId &fid, bool toBeModified if (m_frames.count(fid) == 0) return 0; - const string &imgId = getImageId(fid); + const std::string &imgId = getImageId(fid); TImageInfo *info = ImageManager::instance()->getInfo( imgId, toBeModified ? ImageManager::toBeModified : ImageManager::none, 0); @@ -691,7 +691,7 @@ TRasterImageP TXshSimpleLevel::getFrameToCleanup(const TFrameId &fid) const return TImageP(); bool flag = (m_scannedPath != TFilePath()); - string imageId = getImageId(fid, flag ? Scanned : 0); + std::string imageId = getImageId(fid, flag ? Scanned : 0); ImageLoader::BuildExtData extData(this, fid, 1); TRasterImageP img = ImageManager::instance()->getImage(imageId, ImageManager::dontPutInCache, &extData); @@ -718,7 +718,7 @@ TImageP TXshSimpleLevel::getFullsampledFrame(const TFrameId &fid, UCHAR imFlags) if (it == m_frames.end()) return TRasterImageP(); - string imageId = getImageId(fid); + std::string imageId = getImageId(fid); ImageLoader::BuildExtData extData(this, fid, 1); TImageP img = ImageManager::instance()->getImage(imageId, imFlags, &extData); @@ -733,14 +733,14 @@ TImageP TXshSimpleLevel::getFullsampledFrame(const TFrameId &fid, UCHAR imFlags) //----------------------------------------------------------------------------- -string TXshSimpleLevel::getIconId(const TFrameId &fid, int frameStatus) const +std::string TXshSimpleLevel::getIconId(const TFrameId &fid, int frameStatus) const { return "icon:" + getImageId(fid, frameStatus); } //----------------------------------------------------------------------------- -string TXshSimpleLevel::getIconId(const TFrameId &fid, const TDimension &size) const +std::string TXshSimpleLevel::getIconId(const TFrameId &fid, const TDimension &size) const { return getImageId(fid) + ":" + toString(size.lx) + "x" + toString(size.ly); } @@ -844,7 +844,7 @@ void TXshSimpleLevel::setFrame(const TFrameId &fid, const TImageP &img) // Deal with the ImageManger: ensure the identifiers are bound, and the // associated image is either modified to img or (if !img) invalidated. - const string &imageId = getImageId(fid); + const std::string &imageId = getImageId(fid); if (!ImageManager::instance()->isBound(imageId)) { const TFilePath &decodedPath = getScene()->decodeFilePath(path); @@ -859,7 +859,7 @@ void TXshSimpleLevel::setFrame(const TFrameId &fid, const TImageP &img) // b) The latter is used only in LineTest - which does not have Cleanup if (m_type == PLI_XSHLEVEL) { - const string &imageId2 = rasterized(imageId); + const std::string &imageId2 = rasterized(imageId); if (!ImageManager::instance()->isBound(imageId2)) ImageManager::instance()->bind(imageId2, new ImageRasterizer); else @@ -867,7 +867,7 @@ void TXshSimpleLevel::setFrame(const TFrameId &fid, const TImageP &img) } if (m_type == OVL_XSHLEVEL || m_type == TZI_XSHLEVEL) { - const string &imageId2 = filled(imageId); + const std::string &imageId2 = filled(imageId); if (!ImageManager::instance()->isBound(imageId2)) ImageManager::instance()->bind(imageId2, new ImageFiller); else @@ -946,7 +946,7 @@ void TXshSimpleLevel::clearFrames() void TXshSimpleLevel::loadData(TIStream &is) { - string tagName; + std::string tagName; bool flag = false; int type = UNKNOWN_XSHLEVEL; @@ -960,7 +960,7 @@ void TXshSimpleLevel::loadData(TIStream &is) is >> m_scannedPath; is.matchEndTag(); } else if (tagName == "info") { - string v; + std::string v; double xdpi = 0, ydpi = 0; int subsampling = 1; int doPremultiply = 0; @@ -973,7 +973,7 @@ void TXshSimpleLevel::loadData(TIStream &is) ydpi = toDouble(v); if (xdpi != 0 && ydpi != 0) dpiPolicy = LevelProperties::DP_CustomDpi; - string dpiType = is.getTagAttribute("dpiType"); + std::string dpiType = is.getTagAttribute("dpiType"); if (dpiType == "image") dpiPolicy = LevelProperties::DP_ImageDpi; if (is.getTagParam("type", v) && v == "s") @@ -999,7 +999,7 @@ void TXshSimpleLevel::loadData(TIStream &is) if (flag) break; // ci puo' essere un solo nome flag = true; - wstring token; + std::wstring token; is >> token; if (token == L"__empty") { // empty = true; @@ -1018,7 +1018,7 @@ void TXshSimpleLevel::loadData(TIStream &is) } else if (token == L"__raster") // obsoleto (Tab2.2) { double xdpi = 1, ydpi = 1; - string extension; + std::string extension; is >> xdpi >> ydpi >> m_name >> extension; setName(m_name); type = OVL_XSHLEVEL; @@ -1032,7 +1032,7 @@ void TXshSimpleLevel::loadData(TIStream &is) } } if (type == UNKNOWN_XSHLEVEL) { - string ext = m_path.getType(); + std::string ext = m_path.getType(); if (ext == "pli" || ext == "svg") type = PLI_XSHLEVEL; else if (ext == "tlv" || ext == "tzu" || ext == "tzp" || ext == "tzl") @@ -1139,7 +1139,7 @@ void TXshSimpleLevel::load() m_isSubsequence = loadingLevelRange.isEnabled(); TFilePath checkpath = getScene()->decodeFilePath(m_path); - string type = checkpath.getType(); + std::string type = checkpath.getType(); if (m_scannedPath != TFilePath()) { getProperties()->setDirtyFlag(false); // Level is now supposedly loaded from disk @@ -1236,7 +1236,7 @@ void TXshSimpleLevel::load() TPointD imageDpi; const TFrameId &firstFid = getFirstFid(); - string imageId = getImageId(firstFid); + std::string imageId = getImageId(firstFid); const TImageInfo *imageInfo = ImageManager::instance()->getInfo(imageId, ImageManager::none, 0); if (imageInfo) { @@ -1288,7 +1288,7 @@ void TXshSimpleLevel::load() if (!hookFile.isEmpty()) { TIStream is(hookFile); - string tagName; + std::string tagName; try { if (is.matchTag(tagName) && tagName == "hooks") hookSet->loadData(is); @@ -1347,7 +1347,7 @@ void TXshSimpleLevel::load(const std::vector &fIds) if (m_properties->getImageDpi() == TPointD() && !m_frames.empty()) { TDimension imageRes(0, 0); TPointD imageDpi; - string imageId = getImageId(getFirstFid()); + std::string imageId = getImageId(getFirstFid()); const TImageInfo *imageInfo = ImageManager::instance()->getInfo(imageId, ImageManager::none, 0); if (imageInfo) { imageRes.lx = imageInfo->m_lx; @@ -1376,7 +1376,7 @@ void TXshSimpleLevel::saveData(TOStream &os) { os << m_name; - map attr; + std::map attr; if (getProperties()->getDpiPolicy() == LevelProperties::DP_CustomDpi) { TPointD dpi = getProperties()->getDpi(); if (dpi.x != 0 && dpi.y != 0) { @@ -1464,7 +1464,7 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp, bool ove throw TSystemException(dDstPath, "The level cannot be saved: it is a read only level."); else if (getType() != OVL_XSHLEVEL) { //file partially unlocked - wstring fileName = getEditableFileName(); + std::wstring fileName = getEditableFileName(); assert(!fileName.empty()); TFilePath app = dDstPath.withName(fileName).withType(dDstPath.getType()); @@ -1652,7 +1652,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite ImageLoader::BuildExtData extData(this, TFrameId()); for (it = fids.begin(); it != fids.end(); ++it) { - string imageId = getImageId(*it, Normal); // Retrieve the actual level frames ("L_whatever") + std::string imageId = getImageId(*it, Normal); // Retrieve the actual level frames ("L_whatever") if (!ImageManager::instance()->isModified(imageId)) continue; @@ -1706,12 +1706,12 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite updater.getLevelWriter()->renumberFids(m_renumberTable); if (!m_editableRange.empty()) - fids = vector(m_editableRange.begin(), m_editableRange.end()); + fids = std::vector(m_editableRange.begin(), m_editableRange.end()); ImageLoader::BuildExtData extData(this, TFrameId()); for (it = fids.begin(); it != fids.end(); ++it) { - string imageId = getImageId(*it, Normal); // Retrieve the actual level frames ("L_whatever") + std::string imageId = getImageId(*it, Normal); // Retrieve the actual level frames ("L_whatever") if (!ImageManager::instance()->isModified(imageId)) continue; @@ -1758,7 +1758,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite } //file partially unlocked - wstring fileName = getEditableFileName(); + std::wstring fileName = getEditableFileName(); assert(!fileName.empty()); TFilePath app = decodedFp.withName(fileName).withType(decodedFp.getType()); hookFile = getHookPath(app); @@ -1810,12 +1810,12 @@ std::string TXshSimpleLevel::getImageId(const TFrameId &fid, int frameStatus) co { if (frameStatus < 0) frameStatus = getFrameStatus(fid); - string prefix = "L"; + std::string prefix = "L"; if (frameStatus & CleanupPreview) prefix = "P"; else if ((frameStatus & (Scanned | Cleanupped)) == Scanned) prefix = "S"; - string imageId = m_idBase + "_" + prefix + fid.expand(); + std::string imageId = m_idBase + "_" + prefix + fid.expand(); return imageId; } @@ -1875,7 +1875,7 @@ void TXshSimpleLevel::invalidateFrames() /*- 指定したFIdのみInvalidateする -*/ void TXshSimpleLevel::invalidateFrame(const TFrameId &fid) { - string id = getImageId(fid); + std::string id = getImageId(fid); ImageManager::instance()->invalidate(id); } @@ -1948,7 +1948,7 @@ TPointD TXshSimpleLevel::getImageDpi(const TFrameId &fid, int frameStatus) return TPointD(); const TFrameId &theFid = (fid == TFrameId::NO_FRAME || !isFid(fid)) ? getFirstFid() : fid; - const string &imageId = getImageId(theFid, frameStatus); + const std::string &imageId = getImageId(theFid, frameStatus); const TImageInfo *imageInfo = ImageManager::instance()->getInfo(imageId, ImageManager::none, 0); diff --git a/toonz/sources/toonzlib/txshsoundcolumn.cpp b/toonz/sources/toonzlib/txshsoundcolumn.cpp index d72a91b..8c216dc 100644 --- a/toonz/sources/toonzlib/txshsoundcolumn.cpp +++ b/toonz/sources/toonzlib/txshsoundcolumn.cpp @@ -105,7 +105,7 @@ ColumnLevel *ColumnLevel::clone() const void ColumnLevel::loadData(TIStream &is) { - string tagName; + std::string tagName; is.openChild(tagName); if (tagName == "SoundCells") { TPersist *p = 0; diff --git a/toonz/sources/toonzlib/txshsoundlevel.cpp b/toonz/sources/toonzlib/txshsoundlevel.cpp index f125bf6..58178dc 100644 --- a/toonz/sources/toonzlib/txshsoundlevel.cpp +++ b/toonz/sources/toonzlib/txshsoundlevel.cpp @@ -18,7 +18,7 @@ PERSIST_IDENTIFIER(TXshSoundLevel, "soundLevel") //============================================================================= -TXshSoundLevel::TXshSoundLevel(wstring name, int startOffset, int endOffset) +TXshSoundLevel::TXshSoundLevel(std::wstring name, int startOffset, int endOffset) : TXshLevel(m_classCode, name), m_soundTrack(0), m_duration(0), m_samplePerFrame(0), m_frameSoundCount(0), m_fps(12), m_path() { } @@ -120,7 +120,7 @@ void TXshSoundLevel::loadData(TIStream &is) is >> m_name; setName(m_name); - string tagName; + std::string tagName; bool flag = false; int type = UNKNOWN_XSHLEVEL; @@ -131,7 +131,7 @@ void TXshSoundLevel::loadData(TIStream &is) is >> m_path; is.matchEndTag(); } else if (tagName == "type") { - string v; + std::string v; is >> v; if (v == "sound") type = SND_XSHLEVEL; @@ -150,7 +150,7 @@ void TXshSoundLevel::saveData(TOStream &os) { os << m_name; - map attr; + std::map attr; os.child("type") << L"sound"; os.child("path") << m_path; } @@ -202,7 +202,7 @@ void TXshSoundLevel::computeValues(int frameHeight) (TINT32)(i * m_samplePerFrame + j * samplePerPixel), (TINT32)(i * m_samplePerFrame + (j + 1) * samplePerPixel - 1), TSound::MONO, min, max); - m_values.insert(pair>(p + j, pair(min * weightA, max * weightA))); + m_values.insert(std::pair>(p + j, std::pair(min * weightA, max * weightA))); } double min = 0.0; @@ -211,7 +211,7 @@ void TXshSoundLevel::computeValues(int frameHeight) (TINT32)(i * m_samplePerFrame + j * samplePerPixel), (TINT32)((i + 1) * m_samplePerFrame - 1), TSound::MONO, min, max); - m_values.insert(pair>(p + j, pair(min * weightA, max * weightA))); + m_values.insert(std::pair>(p + j, std::pair(min * weightA, max * weightA))); ++i; p += frameHeight; diff --git a/toonz/sources/toonzlib/txshsoundtextcolumn.cpp b/toonz/sources/toonzlib/txshsoundtextcolumn.cpp index bfd8524..4324fb8 100644 --- a/toonz/sources/toonzlib/txshsoundtextcolumn.cpp +++ b/toonz/sources/toonzlib/txshsoundtextcolumn.cpp @@ -72,7 +72,7 @@ TXshColumn *TXshSoundTextColumn::clone() const void TXshSoundTextColumn::loadData(TIStream &is) { - string tagName; + std::string tagName; while (is.openChild(tagName)) { if (tagName == "cells") { while (is.openChild(tagName)) { diff --git a/toonz/sources/toonzlib/txshsoundtextlevel.cpp b/toonz/sources/toonzlib/txshsoundtextlevel.cpp index 0821666..c97ced2 100644 --- a/toonz/sources/toonzlib/txshsoundtextlevel.cpp +++ b/toonz/sources/toonzlib/txshsoundtextlevel.cpp @@ -12,7 +12,7 @@ PERSIST_IDENTIFIER(TXshSoundTextLevel, "soundTextLevel") //============================================================================= -TXshSoundTextLevel::TXshSoundTextLevel(wstring name) +TXshSoundTextLevel::TXshSoundTextLevel(std::wstring name) : TXshLevel(m_classCode, name), m_framesText() { } @@ -55,11 +55,11 @@ void TXshSoundTextLevel::loadData(TIStream &is) { is >> m_name; setName(m_name); - string tagName; + std::string tagName; int type = UNKNOWN_XSHLEVEL; while (is.matchTag(tagName)) { if (tagName == "type") { - string v; + std::string v; is >> v; if (v == "textSound") type = SND_TXT_XSHLEVEL; diff --git a/toonz/sources/toonzlib/txshzeraryfxcolumn.cpp b/toonz/sources/toonzlib/txshzeraryfxcolumn.cpp index da876f3..8b0df69 100644 --- a/toonz/sources/toonzlib/txshzeraryfxcolumn.cpp +++ b/toonz/sources/toonzlib/txshzeraryfxcolumn.cpp @@ -40,7 +40,7 @@ TXshZeraryFxColumn::TXshZeraryFxColumn(const TXshZeraryFxColumn &src) assert((int)src.m_cells.size() == (int)m_cells.size()); TFx *fx = src.getZeraryColumnFx()->getZeraryFx(); if (fx) { - wstring fxName = fx->getName(); + std::wstring fxName = fx->getName(); fx = fx->clone(false); fx->setName(fxName); m_zeraryColumnFx->setZeraryFx(fx); @@ -150,7 +150,7 @@ void TXshZeraryFxColumn::loadData(TIStream &is) int r0, r1; bool touched = false; const TXshCell cell(m_zeraryFxLevel, TFrameId(1)); - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == "status") { int status; diff --git a/toonz/sources/toonzlib/vectorizerparameters.cpp b/toonz/sources/toonzlib/vectorizerparameters.cpp index 217ab2f..90fbe8f 100644 --- a/toonz/sources/toonzlib/vectorizerparameters.cpp +++ b/toonz/sources/toonzlib/vectorizerparameters.cpp @@ -74,7 +74,7 @@ void saveData(const VectorizerConfiguration &conf, TOStream &os) void loadData(VectorizerConfiguration &conf, TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == s_threshold) is >> conf.m_threshold, is.matchEndTag(); @@ -110,7 +110,7 @@ void saveData(const CenterlineConfiguration &conf, TOStream &os) void loadData(CenterlineConfiguration &conf, TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == s_generalConfiguration) loadData(static_cast(conf), is), is.matchEndTag(); @@ -157,7 +157,7 @@ void saveData(const NewOutlineConfiguration &conf, TOStream &os) void loadData(NewOutlineConfiguration &conf, TIStream &is) { - string tagName; + std::string tagName; while (is.matchTag(tagName)) { if (tagName == s_generalConfiguration) loadData(static_cast(conf), is), is.matchEndTag(); diff --git a/toonz/sources/toonzqt/addfxcontextmenu.cpp b/toonz/sources/toonzqt/addfxcontextmenu.cpp index 4132b0d..ec7d038 100644 --- a/toonz/sources/toonzqt/addfxcontextmenu.cpp +++ b/toonz/sources/toonzqt/addfxcontextmenu.cpp @@ -40,7 +40,7 @@ std::map plugin_dict_; namespace { -TFx *createFxByName(string fxId) +TFx *createFxByName(std::string fxId) { if (fxId.find("_ext_") == 0) return TExternFx::create(fxId.substr(5)); @@ -62,7 +62,7 @@ TFx *createFxByName(string fxId) TFx *createPresetFxByName(TFilePath path) { - string id = path.getParentDir().getName(); + std::string id = path.getParentDir().getName(); TFx *fx = createFxByName(id); if (fx) { TIStream is(path); @@ -90,14 +90,14 @@ TFx *createMacroFxByPath(TFilePath path, TXsheet *xsheet) FxDag *fxDag = xsheet->getFxDag(); if (!fxDag) return fx; - vector fxs; + std::vector fxs; fxs = fx->getFxs(); - QMap oldNewId; + QMap oldNewId; int i; for (i = 0; i < (int)fxs.size(); i++) { - wstring oldId = fxs[i]->getFxId(); + std::wstring oldId = fxs[i]->getFxId(); fxDag->assignUniqueId(fxs[i].getPointer()); - wstring newId = fxs[i]->getFxId(); + std::wstring newId = fxs[i]->getFxId(); oldNewId[oldId] = newId; //cambiando l'id degli effetti interni di una macro si rompono i legami tra il nome della porta @@ -112,7 +112,7 @@ TFx *createMacroFxByPath(TFilePath path, TXsheet *xsheet) } } } - /* QStack > newPortNames; + /* QStack > newPortNames; //Devo cambiare il nome alle porte: contengono l'id dei vecchi effetti for(i=fx->getInputPortCount()-1; i>=0; i--) @@ -126,12 +126,12 @@ TFx *createMacroFxByPath(TFilePath path, TXsheet *xsheet) newPortName.erase(newPortName.find_last_of("_")+1,newPortName.size()-1); newPortName.append(inFxNewId); TFxPort* fxPort = fx->getInputPort(i); - newPortNames.append(QPair(newPortName,fxPort)); + newPortNames.append(QPair(newPortName,fxPort)); fx->removeInputPort(oldPortName); } while(!newPortNames.isEmpty()) { - QPair newPort = newPortNames.pop(); + QPair newPort = newPortNames.pop(); fx->addInputPort(newPort.first,*newPort.second); }*/ @@ -156,7 +156,7 @@ TFx *createFx(QAction *action, TXsheetHandle *xshHandle) TFilePath path = TFilePath(text.toStdWString()); if (TFileStatus(path).doesExist() && TFileStatus(path.getParentDir()).isDirectory()) { - string folder = path.getParentDir().getName(); + std::string folder = path.getParentDir().getName(); if (folder == "macroFx") //have to load a Macro fx = createMacroFxByPath(path, xsh); else { @@ -262,7 +262,7 @@ void AddFxContextMenu::loadFxs() TIStream is(m_fxListPath); try { - string tagName; + std::string tagName; if (is.matchTag(tagName) && tagName == "fxs") { loadFxGroup(&is); is.closeChild(); @@ -296,7 +296,7 @@ void AddFxContextMenu::loadFxPluginGroup() void AddFxContextMenu::loadFxGroup(TIStream *is) { while (!is->eos()) { - string tagName; + std::string tagName; if (is->matchTag(tagName)) { QString groupName = QString::fromStdString(tagName); @@ -395,7 +395,7 @@ void AddFxContextMenu::loadFxPlugins(QMenu *insertFxGroup, QMenu *addFxGroup, QM void AddFxContextMenu::loadFx(TIStream *is, QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup) { while (!is->eos()) { - string fxName; + std::string fxName; *is >> fxName; if (!fxName.empty()) { @@ -424,7 +424,7 @@ void AddFxContextMenu::loadFx(TIStream *is, QMenu *insertFxGroup, QMenu *addFxGr //--------------------------------------------------- -bool AddFxContextMenu::loadPreset(const string &name, +bool AddFxContextMenu::loadPreset(const std::string &name, QMenu *insertFxGroup, QMenu *addFxGroup, QMenu *replaceFxGroup) { TFilePath presetsFilepath(m_presetPath + name); diff --git a/toonz/sources/toonzqt/doublefield.cpp b/toonz/sources/toonzqt/doublefield.cpp index 6dc429e..1b7b268 100644 --- a/toonz/sources/toonzqt/doublefield.cpp +++ b/toonz/sources/toonzqt/doublefield.cpp @@ -405,7 +405,7 @@ void MeasuredDoubleLineEdit::getRange(double &minValue, double &maxValue) //----------------------------------------------------------------------------- -void MeasuredDoubleLineEdit::setMeasure(string name) +void MeasuredDoubleLineEdit::setMeasure(std::string name) { delete m_value; m_value = new TMeasuredValue(name != "" ? name : "dummy"); @@ -509,7 +509,7 @@ MeasuredDoubleField::MeasuredDoubleField(QWidget *parent, bool isRollerHide) ///---------------------------------------------------------------------------- -void MeasuredDoubleField::setMeasure(string measureName) +void MeasuredDoubleField::setMeasure(std::string measureName) { MeasuredDoubleLineEdit *lineEdit = dynamic_cast(m_lineEdit); assert(lineEdit); diff --git a/toonz/sources/toonzqt/doublepairfield.cpp b/toonz/sources/toonzqt/doublepairfield.cpp index 6aa46e9..861982c 100644 --- a/toonz/sources/toonzqt/doublepairfield.cpp +++ b/toonz/sources/toonzqt/doublepairfield.cpp @@ -352,7 +352,7 @@ MeasuredDoublePairField::MeasuredDoublePairField(QWidget *parent, bool isMaxRang //----------------------------------------------------------------------------- -void MeasuredDoublePairField::setMeasure(string measureName) +void MeasuredDoublePairField::setMeasure(std::string measureName) { MeasuredDoubleLineEdit *leftLineEdit = dynamic_cast(m_leftLineEdit); assert(leftLineEdit); diff --git a/toonz/sources/toonzqt/dvdialog.cpp b/toonz/sources/toonzqt/dvdialog.cpp index 0900b16..bd984a3 100644 --- a/toonz/sources/toonzqt/dvdialog.cpp +++ b/toonz/sources/toonzqt/dvdialog.cpp @@ -1201,7 +1201,7 @@ bool isStyleIdInPalette(int styleId, const TPalette *palette) int DVGui::eraseStylesInDemand(TPalette *palette, const TXsheetHandle *xsheetHandle, TPalette *newPalette) { //Verifico se gli stili della paletta sono usati : eraseStylesInDemand() - vector styleIds; + std::vector styleIds; int h; for (h = 0; h < palette->getPageCount(); h++) { TPalette::Page *page = palette->getPage(h); diff --git a/toonz/sources/toonzqt/expressionfield.cpp b/toonz/sources/toonzqt/expressionfield.cpp index 1d6bb27..c18938a 100644 --- a/toonz/sources/toonzqt/expressionfield.cpp +++ b/toonz/sources/toonzqt/expressionfield.cpp @@ -210,12 +210,12 @@ void ExpressionField::hideEvent(QHideEvent *e) QTextEdit::hideEvent(e); } -void ExpressionField::setExpression(string expression) +void ExpressionField::setExpression(std::string expression) { setPlainText(QString::fromStdString(expression)); } -string ExpressionField::getExpression() const +std::string ExpressionField::getExpression() const { return toPlainText().toStdString(); } @@ -261,7 +261,7 @@ void ExpressionField::keyPressEvent(QKeyEvent *e) QTextEdit::keyPressEvent(e); if (m_completerPopup->isVisible()) { updateCompleterPopup(); - } else if (Qt::Key_A <= e->key() && e->key() <= Qt::Key_Z || string("+&|!*/=?,:-").find(e->key()) != string::npos) { + } else if (Qt::Key_A <= e->key() && e->key() <= Qt::Key_Z || std::string("+&|!*/=?,:-").find(e->key()) != std::string::npos) { openCompleterPopup(); } setFocus(); @@ -348,7 +348,7 @@ bool ExpressionField::updateCompleterPopup() { int start = m_completerStartPos; int pos = textCursor().position(); - string text = getExpression(); + std::string text = getExpression(); if (m_suggestions.empty() || start < 0 || start > pos || pos > (int)text.length()) { if (m_completerPopup->isVisible()) m_completerPopup->hide(); @@ -356,11 +356,11 @@ bool ExpressionField::updateCompleterPopup() } QStandardItemModel *model = new QStandardItemModel(); - string prefix = toLower(text.substr(start, pos - start)); + std::string prefix = toLower(text.substr(start, pos - start)); int prefixLength = prefix.length(); int count = 0; for (int i = 0; i < (int)m_suggestions.size(); i++) { - string item = m_suggestions[i].first; + std::string item = m_suggestions[i].first; if ((int)item.length() >= prefixLength && toLower(item.substr(0, prefixLength)) == prefix) { QStandardItem *item = new QStandardItem(); item->setData(QString::fromStdString(m_suggestions[i].first), Qt::EditRole); @@ -396,7 +396,7 @@ int ExpressionField::computeSuggestions() m_completerStartPos = -1; m_suggestions.clear(); - string text = getExpression(); + std::string text = getExpression(); int pos = textCursor().position(); int start = pos; if (start > 0) { diff --git a/toonz/sources/toonzqt/functionpaneltools.cpp b/toonz/sources/toonzqt/functionpaneltools.cpp index c47da71..ee169c1 100644 --- a/toonz/sources/toonzqt/functionpaneltools.cpp +++ b/toonz/sources/toonzqt/functionpaneltools.cpp @@ -338,7 +338,7 @@ void MoveHandleDragTool::click(QMouseEvent *e) if (m_keyframe.m_linkedHandles) { if (m_handle == FunctionPanel::SpeedIn && m_kIndex + 1 < m_curve->getKeyframeCount() && (m_keyframe.m_type != TDoubleKeyframe::SpeedInOut && (m_keyframe.m_type != TDoubleKeyframe::Expression || - m_keyframe.m_expressionText.find("cycle") == string::npos))) + m_keyframe.m_expressionText.find("cycle") == std::string::npos))) speed = m_curve->getSpeedIn(m_kIndex); else if (m_handle == FunctionPanel::SpeedOut && m_keyframe.m_prevType != TDoubleKeyframe::SpeedInOut && m_kIndex > 0) speed = m_curve->getSpeedOut(m_kIndex); diff --git a/toonz/sources/toonzqt/functionsegmentviewer.cpp b/toonz/sources/toonzqt/functionsegmentviewer.cpp index a674e64..e3f9f6a 100644 --- a/toonz/sources/toonzqt/functionsegmentviewer.cpp +++ b/toonz/sources/toonzqt/functionsegmentviewer.cpp @@ -362,7 +362,7 @@ void SpeedInOutSegmentPage::getGuiValues(TPointD &speedIn, TPointD &speedOut) EaseInOutSegmentPage::EaseInOutSegmentPage(bool isPercentage, FunctionSegmentViewer *parent) : FunctionSegmentPage(parent), m_fieldScale(isPercentage ? 100.0 : 1.0), m_isPercentage(isPercentage) { - string measureName = isPercentage ? "percentage" : ""; + std::string measureName = isPercentage ? "percentage" : ""; m_ease0Fld = new DVGui::MeasuredDoubleLineEdit(); m_ease0Fld->setMeasure(measureName); @@ -534,13 +534,13 @@ void FunctionExpressionSegmentPage::refresh() } TDoubleKeyframe kf0 = curve->getKeyframeAt(getR0()); - string expression = kf0.m_expressionText; + std::string expression = kf0.m_expressionText; bool oldBlockSignalsStatus = m_expressionFld->blockSignals(true); m_expressionFld->setGrammar(curve->getGrammar()); m_expressionFld->setExpression(expression); m_expressionFld->blockSignals(oldBlockSignalsStatus); - wstring unitName = toWideString(kf0.m_unitName); + std::wstring unitName = toWideString(kf0.m_unitName); if (unitName == L"" && curve->getMeasure()) unitName = curve->getMeasure()->getCurrentUnit()->getDefaultExtension(); @@ -583,7 +583,7 @@ void FunctionExpressionSegmentPage::init(int segmentLength) } else { m_expressionFld->setExpression("0"); - wstring unitName = L"inch"; + std::wstring unitName = L"inch"; if (curve->getMeasure()) unitName = curve->getMeasure()->getCurrentUnit()->getDefaultExtension(); m_unitFld->setText(QString::fromStdWString(unitName)); @@ -611,7 +611,7 @@ void FunctionExpressionSegmentPage::apply() return; } - string unitName = m_unitFld->text().toStdString(); + std::string unitName = m_unitFld->text().toStdString(); KeyframeSetter setter(curve, kIndex); setter.setExpression(m_expressionFld->getExpression()); @@ -725,7 +725,7 @@ public: if (curve && kf.m_isKeyframe) { TFilePath path; int fieldIndex = 0; - string unitName = ""; + std::string unitName = ""; if (kf.m_type == TDoubleKeyframe::File) { path = kf.m_fileParams.m_path; fieldIndex = kf.m_fileParams.m_fieldIndex; @@ -754,7 +754,7 @@ public: return; TMeasure *measure = curve->getMeasure(); - string unitName = ""; + std::string unitName = ""; if (measure) { const TUnit *unit = measure->getCurrentUnit(); if (unit) @@ -784,7 +784,7 @@ public: fileParams.m_path = TFilePath(stringPath.toStdWString()); fileParams.m_fieldIndex = qMax(0, m_fieldIndexFld->text().toInt() - 1); - string unitName = m_measureFld->text().toStdString(); + std::string unitName = m_measureFld->text().toStdString(); KeyframeSetter setter(curve, kIndex); setter.setFile(fileParams); @@ -840,7 +840,7 @@ void SimilarShapeSegmentPage::refresh() } TDoubleKeyframe kf0 = curve->getKeyframeAt(getR0()); - string expression = kf0.m_expressionText; + std::string expression = kf0.m_expressionText; bool oldBlockSignalsStatus = m_expressionFld->blockSignals(true); m_expressionFld->setGrammar(curve->getGrammar()); m_expressionFld->setExpression(expression); @@ -860,7 +860,7 @@ void SimilarShapeSegmentPage::init(int segmentLength) m_expressionFld->setEnabled(true); TDoubleKeyframe kf0 = curve->getKeyframeAt(getR0()); - string expression = kf0.m_expressionText; + std::string expression = kf0.m_expressionText; bool oldBlockSignalsStatus = m_expressionFld->blockSignals(true); m_expressionFld->setGrammar(curve->getGrammar()); m_expressionFld->setExpression(expression); diff --git a/toonz/sources/toonzqt/functiontreeviewer.cpp b/toonz/sources/toonzqt/functiontreeviewer.cpp index 4ffc693..6915b3d 100644 --- a/toonz/sources/toonzqt/functiontreeviewer.cpp +++ b/toonz/sources/toonzqt/functiontreeviewer.cpp @@ -56,7 +56,7 @@ namespace class ParamChannelGroup : public FunctionTreeModel::ParamWrapper, public FunctionTreeModel::ChannelGroup { public: - ParamChannelGroup(TParam *param, const wstring &fxId, string ¶mName); + ParamChannelGroup(TParam *param, const std::wstring &fxId, std::string ¶mName); void refresh(); void *getInternalPointer() const; @@ -285,8 +285,8 @@ StageObjectChannelGroup::~StageObjectChannelGroup() QVariant StageObjectChannelGroup::data(int role) const { if (role == Qt::DisplayRole) { - string name = m_stageObject->getName(); - string id = m_stageObject->getId().toString(); + std::string name = m_stageObject->getName(); + std::string id = m_stageObject->getId().toString(); return (name == id) ? QString::fromStdString(name) : QString::fromStdString(id + " (" + name + ")"); @@ -406,8 +406,8 @@ QVariant FxChannelGroup::data(int role) const return isAnimated ? isOpen() ? folderAnimOpen : folderAnimClose : isOpen() ? folderOpen : folderClose; } } else if (role == Qt::DisplayRole) { - wstring name = m_fx->getName(); - wstring id = m_fx->getFxId(); + std::wstring name = m_fx->getName(); + std::wstring id = m_fx->getFxId(); if (name == id) return QString::fromStdWString(name); else @@ -457,7 +457,7 @@ void FxChannelGroup::refresh() { TParamContainer *paramContainer = 0; if (macroFx) { - const wstring &fxId = wrap->getFxId(); + const std::wstring &fxId = wrap->getFxId(); TFx *subFx = macroFx->getFxById(fxId); if (!subFx) continue; @@ -484,7 +484,7 @@ void FxChannelGroup::refresh() // //----------------------------------------------------------------------------- -ParamChannelGroup::ParamChannelGroup(TParam *param, const wstring &fxId, string ¶mName) +ParamChannelGroup::ParamChannelGroup(TParam *param, const std::wstring &fxId, std::string ¶mName) : ParamWrapper(param, fxId), ChannelGroup(param->hasUILabel() ? QString::fromStdString(param->getUILabel()) : QString::fromStdWString(TStringTable::translate(paramName))) { } @@ -563,7 +563,7 @@ QVariant SkVDChannelGroup::data(int role) const //----------------------------------------------------------------------------- FunctionTreeModel::Channel::Channel(FunctionTreeModel *model, TDoubleParam *param, - string paramNamePref, wstring fxId) + std::string paramNamePref, std::wstring fxId) : ParamWrapper(param, fxId), m_model(model), m_group(0), m_isActive(false), m_paramNamePref(paramNamePref) { } @@ -606,8 +606,8 @@ QVariant FunctionTreeModel::Channel::data(int role) const if (m_param->hasUILabel()) { return QString::fromStdString(m_param->getUILabel()); } - string name = m_paramNamePref + m_param->getName(); - wstring translatedName = TStringTable::translate(name); + std::string name = m_paramNamePref + m_param->getName(); + std::wstring translatedName = TStringTable::translate(name); if (m_fxId.size() > 0) return QString::fromStdWString(translatedName + L" (" + m_fxId + L")"); return QString::fromStdWString(translatedName); @@ -632,8 +632,8 @@ QString FunctionTreeModel::Channel::getShortName() const if (m_param->hasUILabel()) { return QString::fromStdString(m_param->getUILabel()); } - string name = m_paramNamePref + m_param->getName(); - wstring translatedName = TStringTable::translate(name); + std::string name = m_paramNamePref + m_param->getName(); + std::wstring translatedName = TStringTable::translate(name); return QString::fromStdWString(translatedName); } @@ -986,7 +986,7 @@ void FunctionTreeModel::refreshFxs(TXsheet *xsh) continue; TMacroFx *macroFx = dynamic_cast(fx); if (macroFx) { - const vector ¯oFxs = macroFx->getFxs(); + const std::vector ¯oFxs = macroFx->getFxs(); int j; for (j = 0; j < (int)macroFxs.size(); j++) { TParamContainer *params = macroFxs[j]->getParams(); @@ -1127,12 +1127,12 @@ void FunctionTreeModel::addChannels(TFx *fx, ChannelGroup *groupItem, TParamCont { FxChannelGroup *fxItem = static_cast(groupItem); - wstring fxId = L""; + std::wstring fxId = L""; TMacroFx *macro = dynamic_cast(fxItem->getFx()); if (macro) fxId = fx->getFxId(); - const string ¶mNamePref = fx->getFxType() + "."; + const std::string ¶mNamePref = fx->getFxType() + "."; int p, pCount = params->getParamCount(); for (p = 0; p != pCount; ++p) diff --git a/toonz/sources/toonzqt/fxhistogramrender.cpp b/toonz/sources/toonzqt/fxhistogramrender.cpp index dd2f411..1cba931 100644 --- a/toonz/sources/toonzqt/fxhistogramrender.cpp +++ b/toonz/sources/toonzqt/fxhistogramrender.cpp @@ -109,7 +109,7 @@ void FxHistogramRender::computeHistogram(TFxP fx, int frame) TRasterFxP rasterFx(buildedFx); if (!rasterFx) return; - string alias = rasterFx->getAlias(frame, rs); + std::string alias = rasterFx->getAlias(frame, rs); if (!TImageCache::instance()->isCached(alias + ".noext" + toString(frame))) { TDimension size = m_scene->getCurrentCamera()->getRes(); TRectD area(TPointD(-0.5 * size.lx, -0.5 * size.ly), TDimensionD(size.lx, size.ly)); @@ -124,7 +124,7 @@ void FxHistogramRender::computeHistogram(TFxP fx, int frame) m_lastFrameInfo.m_fx = fx; m_lastFrameInfo.m_fxAlias = alias; } else { - string id = toString(fx->getIdentifier()) + ".noext" + toString(frame); + std::string id = toString(fx->getIdentifier()) + ".noext" + toString(frame); TRasterImageP img = TImageCache::instance()->get(id, false); m_histograms->setRaster(img->getRaster()); } @@ -157,7 +157,7 @@ void FxHistogramRender::updateRenderer(int frame) int i; for (i = 0; i < m_scene->getFrameCount(); i++) { - string id = toString(m_lastFrameInfo.m_fx->getIdentifier()) + ".noext" + toString(i); + std::string id = toString(m_lastFrameInfo.m_fx->getIdentifier()) + ".noext" + toString(i); TImageCache::instance()->remove(id); } m_lastFrameInfo.m_frame = frame; @@ -182,7 +182,7 @@ void FxHistogramRender::remakeRender() TRasterFxP rasterFx(buildedFx); if (!rasterFx) return; - string alias = rasterFx->getAlias(m_lastFrameInfo.m_frame, rs); + std::string alias = rasterFx->getAlias(m_lastFrameInfo.m_frame, rs); TFxPair fxPair; fxPair.m_frameA = buildedFx; m_lastFrameInfo.m_renderId = m_renderer.startRendering((double)m_lastFrameInfo.m_frame, rs, fxPair); @@ -203,7 +203,7 @@ void FxHistogramRender::onRenderCompleted(const TRasterP &raster, UINT renderId) QMutexLocker sl(&m_mutex); TRasterImageP img(raster); - string id = toString(m_lastFrameInfo.m_fx->getIdentifier()) + ".noext" + toString(m_lastFrameInfo.m_frame); + std::string id = toString(m_lastFrameInfo.m_fx->getIdentifier()) + ".noext" + toString(m_lastFrameInfo.m_frame); TImageCache::instance()->add(id, img, true); m_histograms->setRaster(raster); diff --git a/toonz/sources/toonzqt/fxiconmanager.cpp b/toonz/sources/toonzqt/fxiconmanager.cpp index ac04a24..c8a558f 100644 --- a/toonz/sources/toonzqt/fxiconmanager.cpp +++ b/toonz/sources/toonzqt/fxiconmanager.cpp @@ -12,9 +12,9 @@ FxIconPixmapManager *FxIconPixmapManager::instance() return &_instance; } -const QPixmap &FxIconPixmapManager::getFxIconPm(string type) +const QPixmap &FxIconPixmapManager::getFxIconPm(std::string type) { - std::map::iterator it; + std::map::iterator it; it = m_pms.find(type); if (it != m_pms.end()) return it->second; diff --git a/toonz/sources/toonzqt/fxschematicnode.cpp b/toonz/sources/toonzqt/fxschematicnode.cpp index f9fead7..d896fa5 100644 --- a/toonz/sources/toonzqt/fxschematicnode.cpp +++ b/toonz/sources/toonzqt/fxschematicnode.cpp @@ -96,9 +96,9 @@ void drawCachedFxFlap(QPainter *painter, const QPointF &pos) //----------------------------------------------------- -int getIndex(TFxPort *port, const vector &ports) +int getIndex(TFxPort *port, const std::vector &ports) { - vector::const_iterator it = std::find(ports.begin(), ports.end(), port); + std::vector::const_iterator it = std::find(ports.begin(), ports.end(), port); if (it == ports.end()) return -1; return std::distance(ports.begin(), it); @@ -589,7 +589,7 @@ void FxPalettePainter::contextMenuEvent(QGraphicsSceneContextMenuEvent *cme) //***************************************************** FxPainter::FxPainter(FxSchematicNode *parent, double width, double height, - const QString &name, eFxType type, string fxType) + const QString &name, eFxType type, std::string fxType) : QGraphicsItem(parent), m_parent(parent), m_name(name), m_width(width), m_height(height), m_type(type), m_fxType(fxType) { setFlag(QGraphicsItem::ItemIsMovable, false); @@ -1600,7 +1600,7 @@ SchematicPort *FxSchematicPort::searchPort(const QPointF &scenePos) } //----------------------------------------------------- -void FxSchematicPort::handleSnappedLinksOnDynamicPortFx(const vector &groupedPorts, int targetIndex, int startIndex) +void FxSchematicPort::handleSnappedLinksOnDynamicPortFx(const std::vector &groupedPorts, int targetIndex, int startIndex) { FxSchematicNode *node = dynamic_cast(getNode()); if (!m_ownerFx->hasDynamicPortGroups() || !node) @@ -1806,7 +1806,7 @@ void FxSchematicPort::mouseReleaseEvent(QGraphicsSceneMouseEvent *me) return; } - vector groupedPorts = targetOwnerFx->dynamicPortGroup(targetGroupId)->ports(); + std::vector groupedPorts = targetOwnerFx->dynamicPortGroup(targetGroupId)->ports(); int groupedPortCount = groupedPorts.size(); if (targetOwnerFx != m_ownerFx && me->modifiers() == Qt::ControlModifier && linkTo(targetPort, true)) { //trying to link different fxs insertin the new link and shifting the others @@ -1907,7 +1907,7 @@ FxSchematicDock::FxSchematicDock(FxSchematicNode *parent, const QString &name, d QGraphicsScene *graphicScene = scene(); FxSchematicScene *schematicScene = dynamic_cast(graphicScene); if (schematicScene) { - string colName = schematicScene->getXsheet()->getStageObject(objId)->getName(); + std::string colName = schematicScene->getXsheet()->getStageObject(objId)->getName(); setToolTip(QString::fromStdString(colName)); } } else { @@ -1997,7 +1997,7 @@ void FxSchematicNode::setSchematicNodePos(const QPointF &pos) const TMacroFx *macro = dynamic_cast(m_fx.getPointer()); if (macro) { TPointD delta = p - macro->getRoot()->getAttributes()->getDagNodePos(); - vector fxs = macro->getFxs(); + std::vector fxs = macro->getFxs(); int i; for (i = 0; i < (int)fxs.size(); i++) { TPointD oldPos = fxs[i]->getAttributes()->getDagNodePos(); @@ -2428,7 +2428,7 @@ void FxSchematicXSheetNode::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *me) //TODO: Fxの分類、各Fxに自己申告させるべき 2016/1/8 shun_iwasawa namespace { -bool isImageAdjustFx(string id) +bool isImageAdjustFx(std::string id) { if (id == "STD_toneCurveFx" || id == "STD_inoChannelSelectorFx" || @@ -2454,7 +2454,7 @@ bool isImageAdjustFx(string id) return false; } -bool isLayerBlendingFx(string id) +bool isLayerBlendingFx(std::string id) { if (id == "STD_inoOverFx" || id == "STD_inoCrossDissolveFx" || @@ -2483,7 +2483,7 @@ bool isLayerBlendingFx(string id) return false; } -bool isMatteFx(string id) +bool isMatteFx(std::string id) { if (id == "STD_hsvKeyFx" || id == "inFx" || @@ -2510,7 +2510,7 @@ FxSchematicNormalFxNode::FxSchematicNormalFxNode(FxSchematicScene *scene, TFx *f TMacroFx *macroFx = dynamic_cast(fx); if (macroFx) { m_type = eMacroFx; - vector fxs = macroFx->getFxs(); + std::vector fxs = macroFx->getFxs(); bool enable = false; int i; for (i = 0; i < (int)fxs.size(); i++) @@ -2521,7 +2521,7 @@ FxSchematicNormalFxNode::FxSchematicNormalFxNode(FxSchematicScene *scene, TFx *f m_linkedNode = 0; //set fx type - string id = fx->getFxType(); + std::string id = fx->getFxType(); if (isImageAdjustFx(id)) m_type = eNormalImageAdjustFx; else if (isLayerBlendingFx(id)) @@ -2574,7 +2574,7 @@ FxSchematicNormalFxNode::FxSchematicNormalFxNode(FxSchematicScene *scene, TFx *f int i, inputPorts = fx->getInputPortCount(); double lastPosY = (m_isLargeScaled) ? m_height : 0; for (i = 0; i < inputPorts; i++) { - string portName = fx->getInputPortName(i); + std::string portName = fx->getInputPortName(i); QString qPortName = QString::fromStdString(portName); QString toolTip = ""; if (isA(eMacroFx)) { @@ -2587,7 +2587,7 @@ FxSchematicNormalFxNode::FxSchematicNormalFxNode(FxSchematicScene *scene, TFx *f toolTip.append(")"); QString qInMacroFxId = qPortName; qInMacroFxId.remove(0, qInMacroFxId.indexOf("_") + 1); - vector macroFxs = macroFx->getFxs(); + std::vector macroFxs = macroFx->getFxs(); int j; for (j = 0; j < (int)macroFxs.size(); j++) { TFx *inMacroFx = macroFxs[j].getPointer(); @@ -2668,7 +2668,7 @@ void FxSchematicNormalFxNode::onRenderToggleClicked(bool value) m_fx->getAttributes()->enable(value); TMacroFx *macro = dynamic_cast(m_fx.getPointer()); if (macro) { - vector fxs = macro->getFxs(); + std::vector fxs = macro->getFxs(); int i; for (i = 0; i < (int)fxs.size(); i++) fxs[i]->getAttributes()->enable(value); @@ -2722,7 +2722,7 @@ FxSchematicZeraryNode::FxSchematicZeraryNode(FxSchematicScene *scene, TZeraryCol TFx *zeraryFx = fx->getZeraryFx(); TStageObjectId id = TStageObjectId::ColumnId(m_columnIndex); - string name = scene->getXsheet()->getStageObject(id)->getName(); + std::string name = scene->getXsheet()->getStageObject(id)->getName(); m_name = QString::fromStdString(name); m_nameItem = new SchematicName(this, 72, 20); //for rename @@ -2896,7 +2896,7 @@ FxSchematicColumnNode::FxSchematicColumnNode(FxSchematicScene *scene, TLevelColu } m_columnIndex = fx->getColumnIndex(); TStageObjectId id = TStageObjectId::ColumnId(m_columnIndex); - string name = scene->getXsheet()->getStageObject(id)->getName(); + std::string name = scene->getXsheet()->getStageObject(id)->getName(); m_name = QString::fromStdString(name); m_resizeItem = new SchematicThumbnailToggle(this, fx->getAttributes()->isOpened()); //サムネイル矢印 @@ -3122,7 +3122,7 @@ void FxSchematicColumnNode::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *me) //----------------------------------------------------- -void FxSchematicColumnNode::renameObject(const TStageObjectId &id, string name) +void FxSchematicColumnNode::renameObject(const TStageObjectId &id, std::string name) { FxSchematicScene *fxScene = dynamic_cast(scene()); if (!fxScene) @@ -3145,7 +3145,7 @@ FxSchematicPaletteNode::FxSchematicPaletteNode(FxSchematicScene *scene, TPalette } m_columnIndex = fx->getColumnIndex(); TStageObjectId id = TStageObjectId::ColumnId(m_columnIndex); - string name = scene->getXsheet()->getStageObject(id)->getFullName(); + std::string name = scene->getXsheet()->getStageObject(id)->getFullName(); m_name = QString::fromStdString(name); m_linkedNode = 0; @@ -3297,7 +3297,7 @@ void FxSchematicPaletteNode::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *me) //----------------------------------------------------- -void FxSchematicPaletteNode::renameObject(const TStageObjectId &id, string name) +void FxSchematicPaletteNode::renameObject(const TStageObjectId &id, std::string name) { FxSchematicScene *fxScene = dynamic_cast(scene()); if (!fxScene) @@ -3311,7 +3311,7 @@ void FxSchematicPaletteNode::renameObject(const TStageObjectId &id, string name) // //***************************************************** -FxGroupNode::FxGroupNode(FxSchematicScene *scene, const QList &groupedFx, const QList &roots, int groupId, const wstring &groupName) +FxGroupNode::FxGroupNode(FxSchematicScene *scene, const QList &groupedFx, const QList &roots, int groupId, const std::wstring &groupName) : FxSchematicNode(scene, roots[0].getPointer(), 90, 32, eGroupedFx), m_groupId(groupId), m_groupedFxs(groupedFx) { if (!m_isLargeScaled) { @@ -3402,7 +3402,7 @@ void FxGroupNode::updateFxsDagPosition(const TPointD &pos) const m_groupedFxs[i]->getAttributes()->setDagNodePos(m_groupedFxs[i]->getAttributes()->getDagNodePos() + delta); TMacroFx *macro = dynamic_cast(m_groupedFxs[i].getPointer()); if (macro) { - vector fxs = macro->getFxs(); + std::vector fxs = macro->getFxs(); int i; for (i = 0; i < (int)fxs.size(); i++) { TPointD oldP = fxs[i]->getAttributes()->getDagNodePos(); diff --git a/toonz/sources/toonzqt/fxschematicscene.cpp b/toonz/sources/toonzqt/fxschematicscene.cpp index 7c2e621..0b15ee8 100644 --- a/toonz/sources/toonzqt/fxschematicscene.cpp +++ b/toonz/sources/toonzqt/fxschematicscene.cpp @@ -443,7 +443,7 @@ void FxSchematicScene::updateScene() groupedFxs[fx->getAttributes()->getGroupId()].push_back(fx); continue; } else if (macro && macro->isEditing()) { - vector fxs = macro->getFxs(); + std::vector fxs = macro->getFxs(); int j; for (j = 0; j < (int)fxs.size(); j++) { SchematicNode *node = addFxSchematicNode(fxs[j].getPointer()); @@ -552,7 +552,7 @@ FxSchematicNode *FxSchematicScene::addGroupedFxSchematicNode(int groupId, const QList roots = getRoots(groupedFxs, terminals); if (roots.isEmpty()) return 0; - wstring name = roots[0]->getAttributes()->getGroupName(false); + std::wstring name = roots[0]->getAttributes()->getGroupName(false); FxGroupNode *node = new FxGroupNode(this, groupedFxs, roots, groupId, name); if (!node) return 0; @@ -856,7 +856,7 @@ void FxSchematicScene::updateLink() TFx *outFx = outConnection->getOwnerFx(); TMacroFx *outMacroFx = dynamic_cast(outFx); if (outMacroFx && outMacroFx->isEditing()) { - vector fxs = outMacroFx->getFxs(); + std::vector fxs = outMacroFx->getFxs(); int k; for (k = 0; k < (int)fxs.size(); k++) { TFx *fx = fxs[k].getPointer(); @@ -1792,7 +1792,7 @@ void FxSchematicScene::onEditGroup() fxs[i]->getAttributes()->editGroup(); TMacroFx *macro = dynamic_cast(fxs[i].getPointer()); if (macro) { - vector macroFxs = macro->getFxs(); + std::vector macroFxs = macro->getFxs(); int j; for (j = 0; j < (int)macroFxs.size(); j++) macroFxs[j]->getAttributes()->editGroup(); diff --git a/toonz/sources/toonzqt/fxsettings.cpp b/toonz/sources/toonzqt/fxsettings.cpp index cc9380b..8469e2f 100644 --- a/toonz/sources/toonzqt/fxsettings.cpp +++ b/toonz/sources/toonzqt/fxsettings.cpp @@ -48,7 +48,7 @@ using namespace DVGui; namespace { -TFxP getCurrentFx(const TFxP ¤tFx, wstring actualId) +TFxP getCurrentFx(const TFxP ¤tFx, std::wstring actualId) { if (currentFx->getFxId() == actualId) return currentFx; @@ -146,24 +146,24 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) bool isFirstParamInRow = true; while (!is.matchEndTag()) { - string tagName; + std::string tagName; if (!is.matchTag(tagName)) throw TException("expected tag"); if (tagName == "control") { /*--- 設定ファイルからインタフェースの桁数を決める (PairSliderのみ実装。) ---*/ int decimals = 0; - string decimalsStr = is.getTagAttribute("decimals"); + std::string decimalsStr = is.getTagAttribute("decimals"); if (decimalsStr != "") { decimals = QString::fromStdString(decimalsStr).toInt(); } - string name; + std::string name; is >> name; is.matchEndTag(); /*-- Layout設定名とFxParameterの名前が一致するものを取得 --*/ TParamP param = fx->getParams()->getParam(name); if (param) { - string paramName = fx->getFxType() + "." + name; + std::string paramName = fx->getFxType() + "." + name; QString str = QString::fromStdWString(TStringTable::translate(paramName)); ParamField *field = ParamField::create(this, str, param); if (field) { @@ -196,7 +196,7 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) } } } else if (tagName == "label") { - string name; + std::string name; is >> name; is.matchEndTag(); QString str; @@ -209,7 +209,7 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) } } else if (tagName == "separator") { // o - string label = is.getTagAttribute("label"); + std::string label = is.getTagAttribute("label"); QString str; Separator *sep = new Separator(str.fromStdString(label), this); int currentRow = m_mainLayout->rowCount(); @@ -239,10 +239,10 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) m_mainLayout->addWidget(tmpWidget, currentRow, 1, 1, 2); } else if (tagName == "vbox") { int shrink = 0; - string shrinkStr = is.getTagAttribute("shrink"); + std::string shrinkStr = is.getTagAttribute("shrink"); if (shrinkStr != "") { shrink = QString::fromStdString(shrinkStr).toInt(); - string label = is.getTagAttribute("label"); + std::string label = is.getTagAttribute("label"); QCheckBox *checkBox = new QCheckBox(this); QHBoxLayout *sepLay = new QHBoxLayout(); sepLay->setMargin(0); @@ -277,7 +277,7 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) /*-- PixelParamFieldが2つあるとき、一方のRGB値を他方にコピーするボタン --*/ else if (tagName == "rgb_link_button") { /*-- リンクさせたいパラメータを2つ得る --*/ - string name1, name2; + std::string name1, name2; is >> name1; is >> name2; is.matchEndTag(); @@ -309,8 +309,8 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) continue; /*-- ボタンのラベルのため 翻訳する --*/ - string paramName1 = fx->getFxType() + "." + name1; - string paramName2 = fx->getFxType() + "." + name2; + std::string paramName1 = fx->getFxType() + "." + name1; + std::string paramName2 = fx->getFxType() + "." + name2; QString str1 = QString::fromStdWString(TStringTable::translate(paramName1)); QString str2 = QString::fromStdWString(TStringTable::translate(paramName2)); QString buttonStr = QString("Copy RGB : %1 > %2").arg(str1).arg(str2); @@ -328,7 +328,7 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) QList on_items; QList off_items; while (!is.matchEndTag()) { - string tagName; + std::string tagName; if (!is.matchTag(tagName)) throw TException("expected tag"); @@ -336,7 +336,7 @@ void ParamsPage::setPageField(TIStream &is, const TFxP &fx, bool isVertical) tagName == "on" || /*-- ONのとき表示されるインタフェース --*/ tagName == "off") /*-- OFFのとき表示されるインタフェース --*/ { - string name; + std::string name; is >> name; is.matchEndTag(); for (int r = 0; r < m_mainLayout->rowCount(); r++) { @@ -838,14 +838,14 @@ void ParamsPageSet::addParamsPage(ParamsPage *page, const char *name) void ParamsPageSet::createControls(const TFxP &fx, int index) { if (TMacroFx *macroFx = dynamic_cast(fx.getPointer())) { - const vector &fxs = macroFx->getFxs(); + const std::vector &fxs = macroFx->getFxs(); for (int i = 0; i < (int)fxs.size(); i++) createControls(fxs[i], i); return; } if (RasterFxPluginHost *plugin = dynamic_cast(fx.getPointer())) { plugin->build(this); - string url = plugin->getUrl(); + std::string url = plugin->getUrl(); if (!url.empty()) { connect(m_helpButton, SIGNAL(pressed()), this, SLOT(openHelpUrl())); m_helpButton->show(); @@ -861,7 +861,7 @@ void ParamsPageSet::createControls(const TFxP &fx, int index) if (fx->getParams()->getParamCount()) { try { - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "fxlayout") throw TException("expected "); @@ -905,10 +905,10 @@ ParamsPage *ParamsPageSet::getParamsPage(int index) const void ParamsPageSet::createPage(TIStream &is, const TFxP &fx, int index) { - string tagName; + std::string tagName; if (!is.matchTag(tagName) || tagName != "page") throw TException("expected "); - string pageName = is.getTagAttribute("name"); + std::string pageName = is.getTagAttribute("name"); if (pageName == "") pageName = "page"; @@ -1017,7 +1017,7 @@ void ParamViewer::setFx(const TFxP ¤tFx, const TFxP &actualFx, int frame, m_tablePageSet->setCurrentIndex(0); return; } - string name = actualFx->getFxType(); + std::string name = actualFx->getFxType(); if (name == "macroFx") { TMacroFx *macroFx = dynamic_cast(currentFx.getPointer()); if (macroFx) @@ -1026,7 +1026,7 @@ void ParamViewer::setFx(const TFxP ¤tFx, const TFxP &actualFx, int frame, int currentIndex = -1; - QMap::iterator it; + QMap::iterator it; it = m_tableFxIndex.find(name); if (it == m_tableFxIndex.end()) { ParamsPageSet *pageSet = new ParamsPageSet(this); diff --git a/toonz/sources/toonzqt/icongenerator.cpp b/toonz/sources/toonzqt/icongenerator.cpp index 7bda543..ea21027 100644 --- a/toonz/sources/toonzqt/icongenerator.cpp +++ b/toonz/sources/toonzqt/icongenerator.cpp @@ -988,7 +988,7 @@ std::string FileIconRenderer::getId(const TFilePath &path, const TFrameId &fid) if (type == "tab" || type == "tnz" || type == "mesh" || // meshes are not currently viewable TFileType::isViewable(TFileType::getInfo(path))) { - string fidNumber; + std::string fidNumber; if (fid != TFrameId::NO_FRAME) fidNumber = "frame:" + fid.expand(TFrameId::NO_PAD); return "$:" + toString(path) + fidNumber; @@ -1594,7 +1594,7 @@ QPixmap IconGenerator::getIcon(TStageObjectSpline *spline) { if (!spline) return QPixmap(); - string iconName = spline->getIconId(); + std::string iconName = spline->getIconId(); QPixmap pix; if (::getIcon(iconName, pix)) @@ -1612,7 +1612,7 @@ void IconGenerator::invalidate(TStageObjectSpline *spline) { if (!spline) return; - string iconName = spline->getIconId(); + std::string iconName = spline->getIconId(); removeIcon(iconName); addTask(iconName, new SplineIconRenderer(iconName, getIconSize(), spline)); @@ -1624,7 +1624,7 @@ void IconGenerator::remove(TStageObjectSpline *spline) { if (!spline) return; - string iconName = spline->getIconId(); + std::string iconName = spline->getIconId(); removeIcon(iconName); } @@ -1684,7 +1684,7 @@ void IconGenerator::invalidateSceneIcon() //----------------------------------------------------------------------------- -void IconGenerator::remap(const string &newIconId, const string &oldIconId) +void IconGenerator::remap(const std::string &newIconId, const std::string &oldIconId) { IconIterator it = iconsMap.find(oldIconId); if (it == iconsMap.end()) diff --git a/toonz/sources/toonzqt/imageutils.cpp b/toonz/sources/toonzqt/imageutils.cpp index c18ed89..f3fa5fe 100644 --- a/toonz/sources/toonzqt/imageutils.cpp +++ b/toonz/sources/toonzqt/imageutils.cpp @@ -52,7 +52,7 @@ namespace { -void addOverlappedRegions(TRegion *reg, vector ®Inf) +void addOverlappedRegions(TRegion *reg, std::vector ®Inf) { regInf.push_back(TFilledRegionInf(reg->getId(), reg->getStyle())); UINT regNum = reg->getSubregionCount(); @@ -62,7 +62,7 @@ void addOverlappedRegions(TRegion *reg, vector ®Inf) //-------------------------------------------------------------------- -void addRegionsInArea(TRegion *reg, vector ®s, const TRectD &area) +void addRegionsInArea(TRegion *reg, std::vector ®s, const TRectD &area) { if (area.contains(reg->getBBox())) regs.push_back(TFilledRegionInf(reg->getId(), reg->getStyle())); @@ -148,7 +148,7 @@ TFilePath duplicate(const TFilePath &levelPath) } NameBuilder *nameBuilder = NameBuilder::getBuilder(toWideString(levelPath.getName())); - wstring levelNameOut; + std::wstring levelNameOut; do levelNameOut = nameBuilder->getNext(); while (TSystem::doesExistFileOrLevel(levelPath.withName(levelNameOut))); @@ -281,7 +281,7 @@ void premultiply(const TFilePath &levelPath) void getFillingInformationOverlappingArea( const TVectorImageP &vi, - vector ®Inf, + std::vector ®Inf, const TRectD &area1, const TRectD &area2) { @@ -305,7 +305,7 @@ void getFillingInformationOverlappingArea( void getFillingInformationInArea( const TVectorImageP &vi, - vector ®s, + std::vector ®s, const TRectD &area) { if (!vi->isComputedRegionAlmostOnce()) @@ -338,7 +338,7 @@ void assignFillingInformation( void getStrokeStyleInformationInArea( const TVectorImageP &vi, - vector> &strokesInfo, + std::vector> &strokesInfo, const TRectD &area) { if (!vi->isComputedRegionAlmostOnce()) @@ -350,12 +350,12 @@ void getStrokeStyleInformationInArea( if (!vi->inCurrentGroup(i)) continue; if (area.contains(vi->getStroke(i)->getBBox())) - strokesInfo.push_back(pair(i, vi->getStroke(i)->getStyle())); + strokesInfo.push_back(std::pair(i, vi->getStroke(i)->getStyle())); } } //-------------------------------------------------------------------- -void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWriterP &lw, const vector &frames, +void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWriterP &lw, const std::vector &frames, const TAffine &aff, const TRop::ResampleFilterType &resType, FrameTaskNotifier *frameNotifier, const TPixel &bgColor, bool removeDotBeforeFrameNumber = false) { for (int i = 0; i < (int)frames.size(); i++) { @@ -390,7 +390,7 @@ void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWr TFilePath outPath = lw->getFilePath().withFrame(frames[i]); /*--- フレーム番号と拡張子の文字数の合計。大抵8 ---*/ int index = 4 + 1 + outPath.getType().length(); - wstring renamedStr = outPath.getWideString(); + std::wstring renamedStr = outPath.getWideString(); if (renamedStr[renamedStr.length() - index - 1] == L'.') renamedStr = renamedStr.substr(0, renamedStr.length() - index - 1) + renamedStr.substr(renamedStr.length() - index, index); @@ -414,12 +414,12 @@ void convertFromCM(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWr //-------------------------------------------------------------------- -void convertFromVI(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWriterP &lw, const vector &frames, +void convertFromVI(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWriterP &lw, const std::vector &frames, const TRop::ResampleFilterType &resType, int width, FrameTaskNotifier *frameNotifier) { QString msg; int i; - vector images; + std::vector images; TRectD maxBbox; for (i = 0; i < (int)frames.size(); i++) { //trovo la bbox che possa contenere tutte le immagini try { @@ -465,11 +465,11 @@ void convertFromVI(const TLevelReaderP &lr, const TPaletteP &plt, const TLevelWr //----------------------------------------------------------------------- -void convertFromFullRaster(const TLevelReaderP &lr, const TLevelWriterP &lw, const vector &_frames, +void convertFromFullRaster(const TLevelReaderP &lr, const TLevelWriterP &lw, const std::vector &_frames, const TAffine &aff, const TRop::ResampleFilterType &resType, FrameTaskNotifier *frameNotifier, const TPixel &bgColor, bool removeDotBeforeFrameNumber = false) { - vector frames = _frames; + std::vector frames = _frames; if (frames.empty() && lr->loadInfo()->getFrameCount() == 1) //e' una immagine singola, non un livello frames.push_back(TFrameId()); @@ -519,7 +519,7 @@ void convertFromFullRaster(const TLevelReaderP &lr, const TLevelWriterP &lw, con TFilePath outPath = lw->getFilePath().withFrame(frames[i]); /*--- フレーム番号と拡張子の文字数の合計。大抵8 ---*/ int index = 4 + 1 + outPath.getType().length(); - wstring renamedStr = outPath.getWideString(); + std::wstring renamedStr = outPath.getWideString(); if (renamedStr[renamedStr.length() - index - 1] == L'.') renamedStr = renamedStr.substr(0, renamedStr.length() - index - 1) + renamedStr.substr(renamedStr.length() - index, index); const TFilePath fp(renamedStr); @@ -542,10 +542,10 @@ void convertFromFullRaster(const TLevelReaderP &lr, const TLevelWriterP &lw, con //----------------------------------------------------------------------- -void convertFromVector(const TLevelReaderP &lr, const TLevelWriterP &lw, const vector &_frames, +void convertFromVector(const TLevelReaderP &lr, const TLevelWriterP &lw, const std::vector &_frames, FrameTaskNotifier *frameNotifier) { - vector frames = _frames; + std::vector frames = _frames; TLevelP lv = lr->loadInfo(); if (frames.empty() && lv->getFrameCount() == 1) //e' una immagine singola, non un livello frames.push_back(TFrameId()); @@ -609,14 +609,14 @@ void convert(const TFilePath &source, const TFilePath &dest, res.lx = info->m_lx; res.ly = info->m_ly; - string codecName = prop->getProperty(0)->getValueAsString(); + std::string codecName = prop->getProperty(0)->getValueAsString(); if (!AviCodecRestrictions::canWriteMovie(toWideString(codecName), res)) { return; //QString msg=QObject::tr("The image resolution does not fit the chosen output file format."); //DVGui::MsgBox(DVGui::WARNING,msg); } } -#endif; +#endif // Get the frames available in level inside the [from, to] range std::vector frames; @@ -651,7 +651,7 @@ void convertNaa2Tlv( TLevelP level = lr->loadInfo(); // Get the frames available in level inside the [from, to] range - vector frames; + std::vector frames; getFrameIds(from, to, level, frames); if (frames.empty()) diff --git a/toonz/sources/toonzqt/infoviewer.cpp b/toonz/sources/toonzqt/infoviewer.cpp index 14635e9..3e1c0f7 100644 --- a/toonz/sources/toonzqt/infoviewer.cpp +++ b/toonz/sources/toonzqt/infoviewer.cpp @@ -74,14 +74,14 @@ public: TFilePath m_path; TLevelP m_level; - vector m_fids; + std::vector m_fids; QStringList m_formats; int m_currentIndex; int m_frameCount; TPalette *m_palette; QLabel m_framesLabel; IntField m_framesSlider; - vector> m_labels; + std::vector> m_labels; QLabel m_historyLabel; QTextEdit m_history; Separator m_separator1, m_separator2; @@ -98,7 +98,7 @@ public: InfoViewerImp(); ~InfoViewerImp(); void clear(); - bool setLabel(TPropertyGroup *pg, int index, string type); + bool setLabel(TPropertyGroup *pg, int index, std::string type); void create(int index, QString str); void loadPalette(const TFilePath &path); @@ -197,7 +197,7 @@ void setLabelStyle(QLabel *l) void InfoViewerImp::create(int index, QString str) { - m_labels[index] = pair(new QLabel(str), new QLabel("")); + m_labels[index] = std::pair(new QLabel(str), new QLabel("")); setLabelStyle(m_labels[index].first); } @@ -345,7 +345,7 @@ void InfoViewerImp::setGeneralFileInfo(const TFilePath &path) //---------------------------------------------------------------- -bool InfoViewerImp::setLabel(TPropertyGroup *pg, int index, string type) +bool InfoViewerImp::setLabel(TPropertyGroup *pg, int index, std::string type) { TProperty *p = pg->getProperty(type); if (!p) diff --git a/toonz/sources/toonzqt/palettesscanpopup.cpp b/toonz/sources/toonzqt/palettesscanpopup.cpp index e9f3852..d2bab77 100644 --- a/toonz/sources/toonzqt/palettesscanpopup.cpp +++ b/toonz/sources/toonzqt/palettesscanpopup.cpp @@ -66,7 +66,7 @@ void PalettesScanPopup::onOkBtnClicked() { m_timerId = startTimer(3); TFilePathSet fps; - wstring s = m_field->getPath().toStdWString(); + std::wstring s = m_field->getPath().toStdWString(); int i = 0, len = s.length(); while (i < len) { while (i < len && (s[i] == ' ' || s[i] == '\t')) @@ -79,7 +79,7 @@ void PalettesScanPopup::onOkBtnClicked() int k = j; while (k > i && (s[k - 1] == ' ' || s[k - 1] == '\t')) k--; - wstring token = s.substr(i, k - i); + std::wstring token = s.substr(i, k - i); fps.push_back(TFilePath(token)); i = j + 1; } @@ -173,7 +173,7 @@ bool PalettesScanPopup::step() push(fp); else { setLabel(fp); - string ext = fp.getType(); + std::string ext = fp.getType(); if (ext == "plt" || ext == "tpl" || ext == "pli") onPlt(fp); } diff --git a/toonz/sources/toonzqt/paletteviewer.cpp b/toonz/sources/toonzqt/paletteviewer.cpp index 2e488fa..861e4b2 100644 --- a/toonz/sources/toonzqt/paletteviewer.cpp +++ b/toonz/sources/toonzqt/paletteviewer.cpp @@ -470,7 +470,7 @@ void PaletteViewer::updateTabBar() //Aggiungo i tab in funzione delle pagine di m_palette for (i = 0; i < palette->getPageCount(); i++) { TPalette::Page *page = palette->getPage(i); - wstring ws = page->getName(); + std::wstring ws = page->getName(); QString pageName = QString::fromStdWString(ws); m_pagesBar->addTab(tabIcon, pageName); } @@ -833,7 +833,7 @@ void PaletteViewer::deletePage() return; if (m_xsheetHandle) { - vector styleIds; + std::vector styleIds; TPalette::Page *page = palette->getPage(m_indexPageToDelete); if (!page) return; //La pagina dovrebbe esserci sempre @@ -869,7 +869,7 @@ void PaletteViewer::saveStudioPalette() DVGui::warning("No current palette"); return; } - wstring gname = palette->getGlobalName(); + std::wstring gname = palette->getGlobalName(); if (gname.empty()) { StudioPaletteViewer *parentSPV = qobject_cast(parentWidget()); if (!parentSPV) { diff --git a/toonz/sources/toonzqt/paletteviewergui.cpp b/toonz/sources/toonzqt/paletteviewergui.cpp index 3c6f544..fd70763 100644 --- a/toonz/sources/toonzqt/paletteviewergui.cpp +++ b/toonz/sources/toonzqt/paletteviewergui.cpp @@ -529,7 +529,7 @@ void PageViewer::drawColorName(QPainter &p, QRect &nameRect, TColorStyle *style, */ void PageViewer::drawToggleLink(QPainter &p, QRect &chipRect, TColorStyle *style) { - wstring globalName = style->getGlobalName(); + std::wstring globalName = style->getGlobalName(); if (globalName != L"" && (globalName[0] == L'-' || globalName[0] == L'+')) { TPixel32 c = style->getMainColor(); @@ -716,8 +716,8 @@ void PageViewer::paintEvent(QPaintEvent *e) p.setFont(tmpFont); } - wstring name = style->getName(); - wstring origName = style->getOriginalName(); + std::wstring name = style->getName(); + std::wstring origName = style->getOriginalName(); //display the name (style name and original name) according to the name display mode if (m_nameDisplayMode == Style) @@ -934,7 +934,7 @@ void PageViewer::mouseDoubleClickEvent(QMouseEvent *e) if (m_viewMode != SmallChips) { QRect nameRect = getColorNameRect(index); if (nameRect.contains(e->pos())) { - wstring styleName = style->getName(); + std::wstring styleName = style->getName(); LineEdit *fld = m_renameTextField; fld->setText(QString::fromStdWString(styleName)); fld->setGeometry(nameRect); @@ -956,8 +956,8 @@ void PageViewer::createMenuAction(QMenu &menu, const char *id, QString name, con { bool ret = true; QAction *act = menu.addAction(name); - string slotName(slot); - slotName = string("1") + slotName; + std::string slotName(slot); + slotName = std::string("1") + slotName; ret = connect(act, SIGNAL(triggered()), slotName.c_str()); assert(ret); } @@ -1253,7 +1253,7 @@ bool PageViewer::event(QEvent *e) int shortcutKey = m_page->getPalette()->getStyleShortcut(styleIndex); if (shortcutKey > 0) - toolTip += QString::fromStdWString(wstring(L" (") + (wchar_t)shortcutKey + L")"); + toolTip += QString::fromStdWString(std::wstring(L" (") + (wchar_t)shortcutKey + L")"); } } if (toolTip != "") @@ -1372,7 +1372,7 @@ void PageViewer::onFrameChanged() void PageViewer::onStyleRenamed() { m_renameTextField->hide(); - wstring newName = m_renameTextField->text().toStdWString(); + std::wstring newName = m_renameTextField->text().toStdWString(); assert(getPaletteHandle()); PaletteCmd::renamePaletteStyle(getPaletteHandle(), newName); } diff --git a/toonz/sources/toonzqt/paramfield.cpp b/toonz/sources/toonzqt/paramfield.cpp index a90a25a..573adf9 100644 --- a/toonz/sources/toonzqt/paramfield.cpp +++ b/toonz/sources/toonzqt/paramfield.cpp @@ -738,7 +738,7 @@ void ParamField::setFxHandle(TFxHandle *fxHandle) // ParamFieldKeyToggle //----------------------------------------------------------------------------- -ParamFieldKeyToggle::ParamFieldKeyToggle(QWidget *parent, string name) +ParamFieldKeyToggle::ParamFieldKeyToggle(QWidget *parent, std::string name) : QWidget(parent), m_status(NOT_ANIMATED), m_highlighted(false) { setFixedSize(15, 15); @@ -1344,7 +1344,7 @@ EnumParamField::EnumParamField(QWidget *parent, QString name, const TIntEnumPara for (int i = 0; i < param->getItemCount(); i++) { int value = 0; - string caption; + std::string caption; param->getItem(i, value, caption); QString str; m_om->addItem(str.fromStdString(caption)); @@ -1413,7 +1413,7 @@ void EnumParamField::update(int frame) TIntEnumParamP param = m_actualParam; for (int i = 0; i < param->getItemCount(); i++) { int value = 0; - string caption; + std::string caption; param->getItem(i, value, caption); if (value != param->getValue()) continue; diff --git a/toonz/sources/toonzqt/pluginhost.cpp b/toonz/sources/toonzqt/pluginhost.cpp index 4cd67ff..d0183d7 100644 --- a/toonz/sources/toonzqt/pluginhost.cpp +++ b/toonz/sources/toonzqt/pluginhost.cpp @@ -10,7 +10,7 @@ #else #include #endif -#include +#include #include #include #include diff --git a/toonz/sources/toonzqt/rasterimagedata.cpp b/toonz/sources/toonzqt/rasterimagedata.cpp index c400cd9..5987971 100644 --- a/toonz/sources/toonzqt/rasterimagedata.cpp +++ b/toonz/sources/toonzqt/rasterimagedata.cpp @@ -94,8 +94,8 @@ ToonzImageData::~ToonzImageData() //------------------------------------------------------------------- void ToonzImageData::setData(const TRasterP &copiedRaster, const TPaletteP &palette, double dpiX, double dpiY, const TDimension &dim, - const vector &rects, const vector &strokes, - const vector &originalStrokes, + const std::vector &rects, const std::vector &strokes, + const std::vector &originalStrokes, const TAffine &transformation) { m_copiedRaster = copiedRaster; @@ -116,7 +116,7 @@ void ToonzImageData::setData(const TRasterP &copiedRaster, const TPaletteP &pale //------------------------------------------------------------------- void ToonzImageData::getData(TRasterP &copiedRaster, double &dpiX, double &dpiY, - vector &rects, vector &strokes, vector &originalStrokes, + std::vector &rects, std::vector &strokes, std::vector &originalStrokes, TAffine &transformation, TPalette *targetPalette) const { if (!m_copiedRaster || (m_rects.empty() && m_strokes.empty())) @@ -235,8 +235,8 @@ FullColorImageData::~FullColorImageData() //------------------------------------------------------------------- void FullColorImageData::setData(const TRasterP &copiedRaster, const TPaletteP &palette, double dpiX, double dpiY, const TDimension &dim, - const vector &rects, const vector &strokes, - const vector &originalStrokes, + const std::vector &rects, const std::vector &strokes, + const std::vector &originalStrokes, const TAffine &transformation) { m_copiedRaster = copiedRaster; @@ -253,7 +253,7 @@ void FullColorImageData::setData(const TRasterP &copiedRaster, const TPaletteP & //------------------------------------------------------------------- void FullColorImageData::getData(TRasterP &copiedRaster, double &dpiX, double &dpiY, - vector &rects, vector &strokes, vector &originalStrokes, + std::vector &rects, std::vector &strokes, std::vector &originalStrokes, TAffine &transformation, TPalette *targetPalette) const { if (!m_copiedRaster || (m_rects.empty() && m_strokes.empty())) diff --git a/toonz/sources/toonzqt/schematicgroupeditor.cpp b/toonz/sources/toonzqt/schematicgroupeditor.cpp index dc7bc79..d1b0b0a 100644 --- a/toonz/sources/toonzqt/schematicgroupeditor.cpp +++ b/toonz/sources/toonzqt/schematicgroupeditor.cpp @@ -231,7 +231,7 @@ void FxSchematicGroupEditor::closeEditor() fxs[j]->getAttributes()->closeEditingGroup(m_groupId); TMacroFx *macro = dynamic_cast(fxs[j].getPointer()); if (macro) { - vector macroFxs = macro->getFxs(); + std::vector macroFxs = macro->getFxs(); int j; for (j = 0; j < (int)macroFxs.size(); j++) macroFxs[j]->getAttributes()->closeEditingGroup(m_groupId); @@ -243,7 +243,7 @@ void FxSchematicGroupEditor::closeEditor() fx->getAttributes()->closeEditingGroup(m_groupId); TMacroFx *macro = dynamic_cast(fx); if (macro) { - vector macroFxs = macro->getFxs(); + std::vector macroFxs = macro->getFxs(); int j; for (j = 0; j < (int)macroFxs.size(); j++) macroFxs[j]->getAttributes()->closeEditingGroup(m_groupId); diff --git a/toonz/sources/toonzqt/stageobjectsdata.cpp b/toonz/sources/toonzqt/stageobjectsdata.cpp index f9786c1..2bdceb1 100644 --- a/toonz/sources/toonzqt/stageobjectsdata.cpp +++ b/toonz/sources/toonzqt/stageobjectsdata.cpp @@ -911,7 +911,7 @@ std::vector StageObjectsData::restoreObjects(std::set &colu bool resetFxDagPositions = (fxFlags & eResetFxDagPositions); QMap idTable; // Trace stored/restored id pairings - map fxTable; // Same for fxs here + std::map fxTable; // Same for fxs here std::vector restoredIds; std::set::iterator idxt = columnIndices.begin(); @@ -964,7 +964,7 @@ std::vector StageObjectsData::restoreObjects(std::set &colu TZeraryColumnFx *zfx = zc->getZeraryColumnFx(); TFx *zeraryFx = zfx->getZeraryFx(); if (zeraryFx && doClone) { - wstring app = zeraryFx->getName(); + std::wstring app = zeraryFx->getName(); fxDag->assignUniqueId(zeraryFx); zeraryFx->setName(app); } @@ -1094,7 +1094,7 @@ std::vector StageObjectsData::restoreObjects(std::set &colu updateFxLinks(fxTable); // Paste any associated spline (not stored im m_splines) - map splines; + std::map splines; for (i = 0; i < (int)restoredIds.size(); ++i) { TStageObjectId id = restoredIds[i]; TStageObject *obj = xsh->getStageObject(id); @@ -1107,7 +1107,7 @@ std::vector StageObjectsData::restoreObjects(std::set &colu if (objTree->containsSpline(spline)) // No need to add it if it's already there continue; - map::iterator it = splines.find(spline); + std::map::iterator it = splines.find(spline); if (it != splines.end()) { // Seems that multiple objects can have the same spline... // BTW, shouldn't this case stop at the continue before ? diff --git a/toonz/sources/toonzqt/stageobjectselection.cpp b/toonz/sources/toonzqt/stageobjectselection.cpp index afffbf2..37cd891 100644 --- a/toonz/sources/toonzqt/stageobjectselection.cpp +++ b/toonz/sources/toonzqt/stageobjectselection.cpp @@ -27,7 +27,7 @@ class TPasteSelectionUndo : public TUndo StageObjectsData *m_objData; int m_index; std::vector m_pastedId; - list m_pastedSplineIds; + std::list m_pastedSplineIds; QMap> m_columnFxConnections; TXsheetHandle *m_xshHandle; TObjectHandle *m_objHandle; @@ -36,7 +36,7 @@ class TPasteSelectionUndo : public TUndo public: TPasteSelectionUndo(StageObjectsData *objData, int index, const std::vector &pastedId, - const list pastedSplineIds, const TPointD &pastedPos, TXsheetHandle *xshHandle, + const std::list pastedSplineIds, const TPointD &pastedPos, TXsheetHandle *xshHandle, TObjectHandle *objHandle, TFxHandle *fxHandle) : TUndo(), m_objData(objData), m_index(index), m_pastedSplineIds(pastedSplineIds), m_pastedId(pastedId), m_xshHandle(xshHandle), m_objHandle(objHandle), m_fxHandle(fxHandle), m_pastedPos(pastedPos) { @@ -71,7 +71,7 @@ public: { std::set indexes; indexes.insert(m_index); - list splineIds; + std::list splineIds; m_objData->restoreObjects(indexes, splineIds, m_xshHandle->getXsheet(), 0, m_pastedPos); QMap>::const_iterator it; TXsheet *xsh = m_xshHandle->getXsheet(); @@ -374,8 +374,8 @@ void StageObjectSelection::pasteSelection() return; std::set indexes; indexes.insert(index); - list restoredSplineIds; - vector ids = objData->restoreObjects(indexes, restoredSplineIds, m_xshHandle->getXsheet(), StageObjectsData::eDoClone, m_pastePosition); + std::list restoredSplineIds; + std::vector ids = objData->restoreObjects(indexes, restoredSplineIds, m_xshHandle->getXsheet(), StageObjectsData::eDoClone, m_pastePosition); StageObjectsData *undoData = new StageObjectsData(); undoData->storeObjects(ids, m_xshHandle->getXsheet(), 0); undoData->storeColumnFxs(indexes, m_xshHandle->getXsheet(), 0); diff --git a/toonz/sources/toonzqt/stageobjectselection.h b/toonz/sources/toonzqt/stageobjectselection.h index ba10481..46c1f9d 100644 --- a/toonz/sources/toonzqt/stageobjectselection.h +++ b/toonz/sources/toonzqt/stageobjectselection.h @@ -95,4 +95,4 @@ signals: void doExplodeChild(QList); }; -#endif; +#endif diff --git a/toonz/sources/toonzqt/stageschematicnode.cpp b/toonz/sources/toonzqt/stageschematicnode.cpp index 43e14cf..05ca573 100644 --- a/toonz/sources/toonzqt/stageschematicnode.cpp +++ b/toonz/sources/toonzqt/stageschematicnode.cpp @@ -1225,7 +1225,7 @@ void StageSchematicNodeDock::onModifyHandle(int increase) int min = (getNode()->getStageObject()->getId().isColumn()) ? -HookSet::maxHooksCount : 0; index = tcrop(index, min, 25); - if (index >= 0) handle = string(1, (char)('A' + index)); + if (index >= 0) handle = std::string(1, (char)('A' + index)); else handle = "H" + toString(-index); if (m_isParentPort) @@ -1233,7 +1233,7 @@ void StageSchematicNodeDock::onModifyHandle(int increase) else { int i, linkCount = getPort()->getLinkCount(); - vector ids; + std::vector ids; for (i = 0; i(getPort()->getLinkedNode(i)); @@ -1662,8 +1662,8 @@ void StageSchematicNode::onHandleReleased() StageSchematicPegbarNode::StageSchematicPegbarNode(StageSchematicScene *scene, TStageObject *pegbar) : StageSchematicNode(scene, pegbar, 90, 18) { - string name = m_stageObject->getFullName(); - string id = m_stageObject->getId().toString(); + std::string name = m_stageObject->getFullName(); + std::string id = m_stageObject->getId().toString(); m_name = QString::fromStdString(name); m_nameItem = new SchematicName(this, 72, 20); m_nameItem->setName(m_name); @@ -1724,8 +1724,8 @@ void StageSchematicPegbarNode::onNameChanged() setFlag(QGraphicsItem::ItemIsSelectable, true); TStageObjectId id = m_stageObject->getId(); - string strId = id.toString(); - string name = m_name.toStdString(); + std::string strId = id.toString(); + std::string name = m_name.toStdString(); QString toolTip = name == strId ? m_name : m_name + " (" + QString::fromStdString(strId) + ")"; setToolTip(toolTip); if (id.isPegbar()) @@ -1784,7 +1784,7 @@ StageSchematicColumnNode::StageSchematicColumnNode(StageSchematicScene *scene, T bool ret = true; assert(pegbar && pegbar->getId().isColumn()); - string name = m_stageObject->getName(); + std::string name = m_stageObject->getName(); m_name = QString::fromStdString(name); m_resizeItem = new SchematicThumbnailToggle(this, m_stageObject->isOpened()); @@ -2073,7 +2073,7 @@ StageSchematicCameraNode::StageSchematicCameraNode(StageSchematicScene *scene, T : StageSchematicNode(scene, pegbar, 90, 18) { - string name = m_stageObject->getFullName(); + std::string name = m_stageObject->getFullName(); m_name = QString::fromStdString(name); m_nameItem = new SchematicName(this, 54, 20); @@ -2166,7 +2166,7 @@ StageSchematicSplineNode::StageSchematicSplineNode(StageSchematicScene *scene, T m_resizeItem->setZValue(2); connect(m_resizeItem, SIGNAL(toggled(bool)), this, SLOT(onChangedSize(bool))); - string name = m_spline->getName(); + std::string name = m_spline->getName(); m_splineName = QString::fromStdString(name); m_nameItem = new SchematicName(this, 72, 20); m_nameItem->setName(m_splineName); @@ -2291,7 +2291,7 @@ StageSchematicGroupNode::StageSchematicGroupNode(StageSchematicScene *scene, TSt for (i = 0; i < m_groupedObj.size(); i++) m_groupedObj[i]->addRef(); bool ret = true; - wstring name = m_stageObject->getGroupName(false); + std::wstring name = m_stageObject->getGroupName(false); m_name = QString::fromStdWString(name); m_nameItem = new SchematicName(this, 72, 20); diff --git a/toonz/sources/toonzqt/stageschematicscene.cpp b/toonz/sources/toonzqt/stageschematicscene.cpp index 7408a84..50a10d8 100644 --- a/toonz/sources/toonzqt/stageschematicscene.cpp +++ b/toonz/sources/toonzqt/stageschematicscene.cpp @@ -119,7 +119,7 @@ void TreeStageNode::sortChildren(int startIndex, int lastIndex) { if (startIndex == lastIndex) return; - vector::iterator begin, end; + std::vector::iterator begin, end; begin = m_cildren.begin() + startIndex; end = m_cildren.begin() + lastIndex; std::sort(begin, end, CompareNodes()); @@ -670,7 +670,7 @@ void StageSchematicScene::reorderScene() void StageSchematicScene::placeNodes() { // search all possible roots - vector roots; + std::vector roots; findRoots(roots); //sorts the roots container. Sortijg rules are specified by CompareNodes class @@ -720,7 +720,7 @@ void StageSchematicScene::placeNodes() //------------------------------------------------------------------ -void StageSchematicScene::findRoots(vector &roots) +void StageSchematicScene::findRoots(std::vector &roots) { TStageObjectTree *pegTree = m_xshHandle->getXsheet()->getStageObjectTree(); int i; diff --git a/toonz/sources/toonzqt/styleeditor.cpp b/toonz/sources/toonzqt/styleeditor.cpp index 955aeed..496b1ea 100644 --- a/toonz/sources/toonzqt/styleeditor.cpp +++ b/toonz/sources/toonzqt/styleeditor.cpp @@ -2039,7 +2039,7 @@ void CustomStyleChooserPage::onSelect(int index) if (m_currentIndex < 0) return; - string name = pattern.m_patternName; + std::string name = pattern.m_patternName; if (pattern.m_isVector) { TVectorImagePatternStrokeStyle cs(name); emit styleSelected(cs); @@ -2147,7 +2147,7 @@ void VectorBrushStyleChooserPage::onSelect(int index) if (m_currentIndex < 0) return; - string name = pattern.m_patternName; + std::string name = pattern.m_patternName; assert(pattern.m_isVector); if (!pattern.m_isVector) return; @@ -2173,7 +2173,7 @@ struct Texture { class TextureStyleChooserPage : public StyleChooserPage { - static vector m_textures; + static std::vector m_textures; static bool m_loaded; public: @@ -2210,7 +2210,7 @@ public: //----------------------------------------------------------------------------- -vector TextureStyleChooserPage::m_textures; +std::vector TextureStyleChooserPage::m_textures; bool TextureStyleChooserPage::m_loaded(false); //----------------------------------------------------------------------------- @@ -2324,7 +2324,7 @@ bool TextureStyleChooserPage::event(QEvent *e) class SpecialStyleChooserPage : public StyleChooserPage { - static vector> m_customStyles; + static std::vector> m_customStyles; static bool m_loaded; public: @@ -2353,14 +2353,14 @@ public: //----------------------------------------------------------------------------- -vector> SpecialStyleChooserPage::m_customStyles; +std::vector> SpecialStyleChooserPage::m_customStyles; bool SpecialStyleChooserPage::m_loaded(false); //----------------------------------------------------------------------------- void SpecialStyleChooserPage::loadItems() { - vector tags; + std::vector tags; TColorStyle::getAllTags(tags); int chipCount = 0; diff --git a/toonz/sources/toonzqt/stylenameeditor.cpp b/toonz/sources/toonzqt/stylenameeditor.cpp index 5705d9e..af609fc 100644 --- a/toonz/sources/toonzqt/stylenameeditor.cpp +++ b/toonz/sources/toonzqt/stylenameeditor.cpp @@ -100,7 +100,7 @@ void StyleNameEditor::onStyleSwitched() if (!m_paletteHandle || !m_paletteHandle->getStyle()) return; - wstring styleName = m_paletteHandle->getStyle()->getName(); + std::wstring styleName = m_paletteHandle->getStyle()->getName(); m_styleName->setText(QString::fromStdWString(styleName)); m_styleName->selectAll(); @@ -120,7 +120,7 @@ void StyleNameEditor::onApplyPressed() if (m_styleName->text() == "") return; - wstring newName = m_styleName->text().toStdWString(); + std::wstring newName = m_styleName->text().toStdWString(); PaletteCmd::renamePaletteStyle(m_paletteHandle, newName); } diff --git a/toonz/sources/toonzqt/styleselection.cpp b/toonz/sources/toonzqt/styleselection.cpp index 2eb7e7a..ed0fe6c 100644 --- a/toonz/sources/toonzqt/styleselection.cpp +++ b/toonz/sources/toonzqt/styleselection.cpp @@ -122,7 +122,7 @@ bool pasteStylesDataWithoutUndo(TPalette *palette, TPaletteHandle *pltHandle, co } // 2. If pasting normal style to studio palette, add a new link and make it linkable else { - wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(styleId); + std::wstring gname = L"-" + palette->getGlobalName() + L"-" + toWideString(styleId); style->setGlobalName(gname); } } @@ -768,7 +768,7 @@ void TStyleSelection::eraseUnsedStyle() std::set::const_iterator it = levels.begin(); for (it; it != levels.end(); it++) { TXshSimpleLevel *level = *it; - vector fids; + std::vector fids; level->getFids(fids); int m, i, j; for (m = 0; m < (int)fids.size(); m++) { @@ -904,7 +904,7 @@ public: void pasteValue(int styleId, const TColorStyle *newStyle) const { // preserva il vecchio nome se m_pasteOnlyColor e' falso - wstring str = newStyle->getName(); + std::wstring str = newStyle->getName(); if (m_pasteColor) { getPalette()->setStyle(styleId, newStyle->clone()); if (!m_pasteName) @@ -952,7 +952,7 @@ public: int i; int indexInPage = 0; for (i = 0; i < (int)m_items.size(); i++) { - wstring oldName = m_items[i]->m_oldStyle->getName(); + std::wstring oldName = m_items[i]->m_oldStyle->getName(); TColorStyle *style = m_items[i]->m_newStyle; indexInPage = m_items[i]->m_index; int styleId = page->getStyleId(indexInPage); @@ -1108,7 +1108,7 @@ void TStyleSelection::pasteStylesValues(bool pasteName, bool pasteColor) int styleId = page->getStyleId(indexInPage); undo->addItem(indexInPage, palette->getStyle(styleId), data->getStyle(i)); TColorStyle *colorStyle = page->getStyle(indexInPage); - wstring styleName = colorStyle->getName(); + std::wstring styleName = colorStyle->getName(); unsigned int flags = colorStyle->getFlags(); if (pasteColor) { @@ -1402,7 +1402,7 @@ class UndoLinkToStudioPalette : public TUndo struct ColorStyleData { int m_indexInPage; TColorStyle *m_oldStyle; - wstring m_newName; + std::wstring m_newName; }; std::vector m_styles; bool m_updateLinkedColors; @@ -1423,7 +1423,7 @@ public: m_updateLinkedColors = updateLinkedColors; } - void setColorStyle(int indexInPage, TColorStyle *oldStyle, wstring newName) + void setColorStyle(int indexInPage, TColorStyle *oldStyle, std::wstring newName) { ColorStyleData data; data.m_indexInPage = indexInPage; @@ -1493,8 +1493,8 @@ void TStyleSelection::toggleLink() if (n <= 0) return; - std::vector> oldColorStylesLinked; - std::vector> newColorStylesLinked; + std::vector> oldColorStylesLinked; + std::vector> newColorStylesLinked; bool somethingHasBeenLinked = false; @@ -1510,7 +1510,7 @@ void TStyleSelection::toggleLink() int index = *it; TColorStyle *cs = page->getStyle(index); assert(cs); - wstring name = cs->getGlobalName(); + std::wstring name = cs->getGlobalName(); TColorStyle *oldCs = cs->clone(); if (name != L"" && (name[0] == L'-' || name[0] == L'+')) { name[0] = name[0] == L'-' ? L'+' : L'-'; @@ -1553,8 +1553,8 @@ void TStyleSelection::eraseToggleLink() TPalette::Page *page = palette->getPage(m_pageIndex); assert(page); - std::vector> oldColorStylesLinked; - std::vector> newColorStylesLinked; + std::vector> oldColorStylesLinked; + std::vector> newColorStylesLinked; UndoLinkToStudioPalette *undo = new UndoLinkToStudioPalette(m_paletteHandle, m_pageIndex); @@ -1563,7 +1563,7 @@ void TStyleSelection::eraseToggleLink() TColorStyle *cs = page->getStyle(index); assert(cs); TColorStyle *oldCs = cs->clone(); - wstring name = cs->getGlobalName(); + std::wstring name = cs->getGlobalName(); if (name != L"" && (name[0] == L'-' || name[0] == L'+')) cs->setGlobalName(L""); undo->setColorStyle(index, oldCs, L""); @@ -1606,8 +1606,8 @@ class UndoRemoveLink : public TUndo int m_pageIndex; struct ColorStyleData { int m_indexInPage; - wstring m_oldGlobalName; - wstring m_oldOriginalName; + std::wstring m_oldGlobalName; + std::wstring m_oldOriginalName; bool m_oldEdittedFlag; }; std::vector m_styles; @@ -1836,7 +1836,7 @@ void TStyleSelection::getBackOriginalStyle() bool somethingChanged = false; - std::map table; + std::map table; TUndo *undo = new getBackOriginalStyleUndo(this); @@ -1845,7 +1845,7 @@ void TStyleSelection::getBackOriginalStyle() it != m_styleIndicesInPage.end(); ++it) { TColorStyle *cs = page->getStyle(*it); assert(cs); - wstring gname = cs->getGlobalName(); + std::wstring gname = cs->getGlobalName(); // if the style has no link if (gname == L"") @@ -1853,12 +1853,12 @@ void TStyleSelection::getBackOriginalStyle() //Find the palette from the table int k = gname.find_first_of(L'-', 1); - if (k == (int)wstring::npos) + if (k == (int)std::wstring::npos) continue; - wstring paletteId = gname.substr(1, k - 1); + std::wstring paletteId = gname.substr(1, k - 1); - std::map::iterator palIt; + std::map::iterator palIt; palIt = table.find(paletteId); TPalette *spPalette = 0; diff --git a/toonz/sources/toonzqt/swatchviewer.cpp b/toonz/sources/toonzqt/swatchviewer.cpp index a317af0..e47eace 100644 --- a/toonz/sources/toonzqt/swatchviewer.cpp +++ b/toonz/sources/toonzqt/swatchviewer.cpp @@ -78,7 +78,7 @@ public: void clearSwatchResults(); void getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData); @@ -121,7 +121,7 @@ void setFxForCaching(TFx *fx) //----------------------------------------------------------------------------- //!Se name finisce con suffix ritorna la parte iniziale, altrimenti "" -string matchSuffix(string name, string suffix) +std::string matchSuffix(std::string name, std::string suffix) { if (name.length() <= suffix.length()) return ""; @@ -322,11 +322,11 @@ void SwatchViewer::setFx(const TFxP &fx, const TFxP &actualFx, int frame) // cerco i segmenti int n = m_points.size(); for (i = 0; i < n; i++) { - string name = m_points[i].m_param->getName(); - string prefix = matchSuffix(name, "_a"); + std::string name = m_points[i].m_param->getName(); + std::string prefix = matchSuffix(name, "_a"); if (prefix == "") continue; - string otherName = prefix + "_b"; + std::string otherName = prefix + "_b"; int j; for (j = 0; j < n; j++) if (i != j && m_points[j].m_param->getName() == otherName) @@ -625,10 +625,10 @@ void SwatchViewer::mousePressEvent(QMouseEvent *event) if (dd2 > 400) m_selectedPoint = -1; else { - string name = m_points[m_selectedPoint].m_param->getName(); - string prefix = matchSuffix(name, "_b"); + std::string name = m_points[m_selectedPoint].m_param->getName(); + std::string prefix = matchSuffix(name, "_b"); if (prefix != "") { - string otherName = prefix + "_a"; + std::string otherName = prefix + "_a"; int n = (int)m_points.size(); int j; for (j = 0; j < n; j++) @@ -910,7 +910,7 @@ void SwatchCacheManager::clearSwatchResults() //----------------------------------------------------------------------------- void SwatchCacheManager::getResource( - TCacheResourceP &resource, const string &alias, + TCacheResourceP &resource, const std::string &alias, const TFxP &fx, double frame, const TRenderSettings &rs, ResourceDeclaration *resData) { diff --git a/toonz/sources/toonzqt/tmessageviewer.cpp b/toonz/sources/toonzqt/tmessageviewer.cpp index 3a4c773..3232361 100644 --- a/toonz/sources/toonzqt/tmessageviewer.cpp +++ b/toonz/sources/toonzqt/tmessageviewer.cpp @@ -131,7 +131,7 @@ void TMessageRepository::messageReceived(int type, const QString &message) //--------------------------------------------------------------------------------- -vector TMessageViewer::m_tmsgViewers; +std::vector TMessageViewer::m_tmsgViewers; bool TMessageViewer::isTMsgVisible() {