Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warning from CodeQL #480

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Src/ModelLoadCMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ std::unique_ptr<Model> DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto meshName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize));
auto meshName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand Down Expand Up @@ -328,7 +328,7 @@ std::unique_ptr<Model> DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto matName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize));
auto matName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand All @@ -350,7 +350,7 @@ std::unique_ptr<Model> DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto psName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize));
auto psName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand All @@ -365,7 +365,7 @@ std::unique_ptr<Model> DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto txtName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize));
auto txtName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.

usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
Expand Down Expand Up @@ -598,7 +598,7 @@ std::unique_ptr<Model> DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");

auto boneName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize));
auto boneName = reinterpret_cast<const wchar_t*>(static_cast<const void*>(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.

usedSize += sizeof(wchar_t) * (*nName);
if (dataSize < usedSize)
Expand Down
Loading