Merge pull request #16148 from mogemimi/fix-misspelled-enum

Fix misspelled enum: POLYGEN -> POLYGON
This commit is contained in:
minggo 2016-07-20 09:54:42 +08:00 committed by GitHub
commit 129a06b9b3
2 changed files with 10 additions and 4 deletions

View File

@ -551,7 +551,7 @@ bool PhysicsShapePolygon::init(const Vec2* points, int count, const PhysicsMater
{
do
{
_type = Type::POLYGEN;
_type = Type::POLYGON;
auto vecs = new (std::nothrow) cpVect[count];
PhysicsHelper::points2cpvs(points, vecs, count); //count = cpConvexHull((int)count, vecs, nullptr, nullptr, 0);
@ -763,7 +763,7 @@ bool PhysicsShapeEdgePolygon::init(const Vec2* points, int count, const PhysicsM
cpVect* vec = nullptr;
do
{
_type = Type::EDGEPOLYGEN;
_type = Type::EDGEPOLYGON;
vec = new (std::nothrow) cpVect[count];
PhysicsHelper::points2cpvs(points, vec, count);

View File

@ -77,11 +77,17 @@ public:
UNKNOWN,
CIRCLE,
BOX,
POLYGEN,
POLYGON,
EDGESEGMENT,
EDGEBOX,
EDGEPOLYGEN,
EDGEPOLYGON,
EDGECHAIN,
/** @deprecated Use Type::POLYGON instead. */
POLYGEN = POLYGON,
/** @deprecated Use Type::EDGEPOLYGON instead. */
EDGEPOLYGEN = EDGEPOLYGON,
};
public: