mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
svg_loader: initialize member data in default.
static analizyer bothers us due to this. we'd rather initialize members for free of them. Change-Id: I6dd76427b0fe2f9ff09034fe3ab11080a8d72a2e
This commit is contained in:
parent
0b95e55e2f
commit
9ce44de970
2 changed files with 2 additions and 7 deletions
|
@ -373,7 +373,6 @@ unique_ptr<Scene> SvgSceneBuilder::build(SvgNode* node)
|
||||||
viewBox.w = node->node.doc.vw;
|
viewBox.w = node->node.doc.vw;
|
||||||
viewBox.h = node->node.doc.vh;
|
viewBox.h = node->node.doc.vh;
|
||||||
preserveAspect = node->node.doc.preserveAspect;
|
preserveAspect = node->node.doc.preserveAspect;
|
||||||
staticViewBox = true;
|
|
||||||
return _sceneBuildHelper(node, viewBox.x, viewBox.y, viewBox.w, viewBox.h, 255);
|
return _sceneBuildHelper(node, viewBox.x, viewBox.y, viewBox.w, viewBox.h, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,8 @@ private:
|
||||||
struct {
|
struct {
|
||||||
int x, y;
|
int x, y;
|
||||||
uint32_t w, h;
|
uint32_t w, h;
|
||||||
} viewBox;
|
} viewBox = {0, 0, 0, 0};
|
||||||
int ref;
|
bool preserveAspect = false;
|
||||||
uint32_t w, h; //Default size
|
|
||||||
bool staticViewBox;
|
|
||||||
bool preserveAspect; //Used in SVG
|
|
||||||
bool shareable;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SvgSceneBuilder();
|
SvgSceneBuilder();
|
||||||
|
|
Loading…
Add table
Reference in a new issue