rive-app / rive-cpp-legacy

C++ runtime for Rive
MIT License
287 stars 43 forks source link

Static declaration in cpp file ambiguous symbol #375

Open kunitoki opened 4 months ago

kunitoki commented 4 months ago

In clipping_shape.cpp file:

static Mat2D identity; // this clashes with other definitions of identity in the global namespace
void ClippingShape::update(ComponentDirt value)
{

consider doing this instead:

void ClippingShape::update(ComponentDirt value)
{
    static Mat2D identity;

Related to https://github.com/rive-app/rive-cpp/issues/374 because of the using namespace rive; at the top. The using namespace is not placing subsequent declarations in that namespace but they will be in the global namespace.