Skip to content

There are duplicated code in the file "glTF2.cpp" #3

@timi-liuliang

Description

@timi-liuliang

In the file "glTF2.cpp", between line 384-398

    // bufferView
    if (accessors[i].find("bufferView") != accessors[i].end()) {
        if (!accessors[i]["bufferView"].is_number()) {
            throw MisformattedExceptionNotNumber("accessors[i][bufferView]");
        }

        asset.accessors[i].bufferView = accessors[i]["bufferView"].get<int32_t>();
    }

    // bufferView
    if (accessors[i].find("bufferView") != accessors[i].end()) {
        if (!accessors[i]["bufferView"].is_number()) {
            throw MisformattedExceptionNotNumber("accessors[i][bufferView]");
        }

        asset.accessors[i].bufferView = accessors[i]["bufferView"].get<int32_t>();
    }

The second time of "bufferView" parse isn't necessary.

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