1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Cleaned up some obscure compiler warnings and added some JSON unit tests.

This commit is contained in:
Julian Storer 2011-06-12 19:52:58 +01:00
parent 796247483a
commit 2009753eac
41 changed files with 298 additions and 178 deletions

View file

@ -210,16 +210,15 @@ void DrawablePath::ValueTreeWrapper::writeTo (RelativePointPath& relativePath) c
for (int j = 0; j < numCps; ++j)
points[j] = e.getControlPoint (j);
const Identifier type (e.getType());
RelativePointPath::ElementBase* newElement = 0;
const Identifier t (e.getType());
if (type == Element::startSubPathElement) newElement = new RelativePointPath::StartSubPath (points[0]);
else if (type == Element::closeSubPathElement) newElement = new RelativePointPath::CloseSubPath();
else if (type == Element::lineToElement) newElement = new RelativePointPath::LineTo (points[0]);
else if (type == Element::quadraticToElement) newElement = new RelativePointPath::QuadraticTo (points[0], points[1]);
else if (type == Element::cubicToElement) newElement = new RelativePointPath::CubicTo (points[0], points[1], points[2]);
else jassertfalse;
if (t == Element::startSubPathElement) newElement = new RelativePointPath::StartSubPath (points[0]);
else if (t == Element::closeSubPathElement) newElement = new RelativePointPath::CloseSubPath();
else if (t == Element::lineToElement) newElement = new RelativePointPath::LineTo (points[0]);
else if (t == Element::quadraticToElement) newElement = new RelativePointPath::QuadraticTo (points[0], points[1]);
else if (t == Element::cubicToElement) newElement = new RelativePointPath::CubicTo (points[0], points[1], points[2]);
else jassertfalse;
relativePath.addElement (newElement);
}