Skip to content

Non standard forward declaration assuming namespace breaks unity builds #374

@kunitoki

Description

@kunitoki

In some files (nested_bool.cpp nested_trigger.cpp and nested_number.cpp), there are wrong forward declarations:

using namespace rive;
class StateMachineInstance; // < this is not in the global namespace, and results in a different symbol because it's not enclosed in the correct namespace (using namespace here is not placing all symbols in that namespace)

// more code here that should be inside the rive namespace

should be instead

namespace rive {
class StateMachineInstance;

// more code here that should be inside the rive namespace
} // namespace rive

Also consider not doing using namespace rive; in cpp in the global namespace, this is breaking unity builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions