Skip to content

Commit

Permalink
Suppress warning from CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Sep 16, 2024
1 parent 89cdcb9 commit 454dc43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Src/ModelLoadCMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,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 @@ -404,7 +404,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 @@ -426,7 +426,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 @@ -441,7 +441,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 @@ -665,7 +665,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

0 comments on commit 454dc43

Please sign in to comment.