diff --git a/src/lib/tvgCanvasImpl.h b/src/lib/tvgCanvasImpl.h index 755dabdd..5df625c0 100644 --- a/src/lib/tvgCanvasImpl.h +++ b/src/lib/tvgCanvasImpl.h @@ -84,7 +84,7 @@ struct Canvas::Impl paint->pImpl->update(*renderer, nullptr, 255, compList, RenderUpdateFlag::None); //Update all retained paint nodes } else { - for (auto paint: paints) { + for (auto paint : paints) { paint->pImpl->update(*renderer, nullptr, 255, compList, RenderUpdateFlag::None); } } @@ -97,8 +97,8 @@ struct Canvas::Impl if (!renderer->preRender()) return Result::InsufficientCondition; - for(auto paint: paints) { - if(!paint->pImpl->render(*renderer)) return Result::InsufficientCondition; + for (auto paint : paints) { + if (!paint->pImpl->render(*renderer)) return Result::InsufficientCondition; } if (!renderer->postRender()) return Result::InsufficientCondition; diff --git a/src/lib/tvgFill.h b/src/lib/tvgFill.h index a0db5847..9971ba15 100644 --- a/src/lib/tvgFill.h +++ b/src/lib/tvgFill.h @@ -28,7 +28,7 @@ template struct DuplicateMethod { - virtual ~DuplicateMethod(){} + virtual ~DuplicateMethod() {} virtual T* duplicate() = 0; }; @@ -38,7 +38,7 @@ struct FillDup : DuplicateMethod T* inst = nullptr; FillDup(T* _inst) : inst(_inst) {} - ~FillDup(){} + ~FillDup() {} Fill* duplicate() override { @@ -78,4 +78,4 @@ struct Fill::Impl } }; -#endif //_TVG_FILL_H_ \ No newline at end of file +#endif //_TVG_FILL_H_ diff --git a/src/lib/tvgPaint.h b/src/lib/tvgPaint.h index 11bfad71..d3907132 100644 --- a/src/lib/tvgPaint.h +++ b/src/lib/tvgPaint.h @@ -30,7 +30,7 @@ namespace tvg { struct StrategyMethod { - virtual ~StrategyMethod(){} + virtual ~StrategyMethod() {} virtual bool dispose(RenderMethod& renderer) = 0; virtual void* update(RenderMethod& renderer, const RenderTransform* transform, uint32_t opacity, vector compList, RenderUpdateFlag pFlag) = 0; //Return engine data if it has. @@ -203,7 +203,7 @@ namespace tvg T* inst = nullptr; PaintMethod(T* _inst) : inst(_inst) {} - ~PaintMethod(){} + ~PaintMethod() {} bool bounds(float* x, float* y, float* w, float* h) const override { diff --git a/src/lib/tvgSceneImpl.h b/src/lib/tvgSceneImpl.h index 68fcff85..45baac26 100644 --- a/src/lib/tvgSceneImpl.h +++ b/src/lib/tvgSceneImpl.h @@ -50,7 +50,7 @@ struct Scene::Impl This is necessary for scene composition */ void* edata = nullptr; - for (auto paint: paints) { + for (auto paint : paints) { edata = paint->pImpl->update(renderer, transform, opacity, compList, static_cast(flag)); } return edata; @@ -58,8 +58,8 @@ struct Scene::Impl bool render(RenderMethod &renderer) { - for(auto paint: paints) { - if(!paint->pImpl->render(renderer)) return false; + for (auto paint : paints) { + if (!paint->pImpl->render(renderer)) return false; } return true; } @@ -71,7 +71,7 @@ struct Scene::Impl auto w = 0.0f; auto h = 0.0f; - for(auto paint: paints) { + for (auto paint : paints) { auto x2 = FLT_MAX; auto y2 = FLT_MAX; auto w2 = 0.0f; @@ -102,7 +102,7 @@ struct Scene::Impl dup->paints.reserve(paints.size()); - for (auto paint: paints) { + for (auto paint : paints) { dup->paints.push_back(paint->duplicate()); } diff --git a/src/lib/tvgShapeImpl.h b/src/lib/tvgShapeImpl.h index c69b8447..c6b76525 100644 --- a/src/lib/tvgShapeImpl.h +++ b/src/lib/tvgShapeImpl.h @@ -173,7 +173,7 @@ struct ShapePath Point min = { pts[0].x, pts[0].y }; Point max = { pts[0].x, pts[0].y }; - for(uint32_t i = 1; i < ptsCnt; ++i) { + for (uint32_t i = 1; i < ptsCnt; ++i) { if (pts[i].x < min.x) min.x = pts[i].x; if (pts[i].y < min.y) min.y = pts[i].y; if (pts[i].x > max.x) max.x = pts[i].x; diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index 39577f77..15d39972 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -2191,7 +2191,7 @@ static void _styleInherit(SvgStyleProperty* child, SvgStyleProperty* parent) if (!((int)child->stroke.flags & (int)SvgStrokeFlags::Dash)) { if (parent->stroke.dash.array.cnt > 0) { child->stroke.dash.array.clear(); - for(uint32_t i = 0; i < parent->stroke.dash.array.cnt; ++i) { + for (uint32_t i = 0; i < parent->stroke.dash.array.cnt; ++i) { child->stroke.dash.array.push(parent->stroke.dash.array.list[i]); } } diff --git a/src/loaders/svg/tvgSvgPath.cpp b/src/loaders/svg/tvgSvgPath.cpp index be658804..59b5da6d 100644 --- a/src/loaders/svg/tvgSvgPath.cpp +++ b/src/loaders/svg/tvgSvgPath.cpp @@ -323,8 +323,8 @@ static void _processCommand(vector* cmds, vector* pts, char Point p = {arr[0], arr[1]}; cmds->push_back(PathCommand::MoveTo); pts->push_back(p); - *cur = {arr[0] ,arr[1]}; - *startPoint = {arr[0] ,arr[1]}; + *cur = {arr[0], arr[1]}; + *startPoint = {arr[0], arr[1]}; break; } case 'l': @@ -332,7 +332,7 @@ static void _processCommand(vector* cmds, vector* pts, char Point p = {arr[0], arr[1]}; cmds->push_back(PathCommand::LineTo); pts->push_back(p); - *cur = {arr[0] ,arr[1]}; + *cur = {arr[0], arr[1]}; break; } case 'c': @@ -442,7 +442,7 @@ static void _processCommand(vector* cmds, vector* pts, char case 'a': case 'A': { _pathAppendArcTo(cmds, pts, cur, curCtl, arr[5], arr[6], arr[0], arr[1], arr[2], arr[3], arr[4]); - *cur = *curCtl = {arr[5] ,arr[6]}; + *cur = *curCtl = {arr[5], arr[6]}; *isQuadratic = false; break; }