0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

UE5のImGuiプラグインのWarning修正

Posted at

概要

UEを更新した際(多分UE5.6)にImGuiのビルドでWarningが出ている箇所があったのでその修正

Warning内容

ローカルディレクトリが書かれている箇所は~で置換しています

[15/73] Compile [x64] ImGuiContextProxy.cpp
~\Plugins\ImGui\Source\ImGui\Private\ImGuiContextProxy.cpp(268,12): warning C4996: 'TArray<FImGuiDrawList,FDefaultAllocator>::SetNum': SetNum with a boolean bAllowShrinking has been deprecated - please use the EAllowShrinking enum instead - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
                DrawLists.SetNum(DrawData->CmdListsCount, false);
                         ^
[16/73] Compile [x64] ImGuiDrawData.cpp
~\Plugins\ImGui\Source\ImGui\Private\ImGuiDrawData.cpp(13,17): warning C4996: 'TArray<FSlateVertex,FDefaultAllocator>::SetNumUninitialized': SetNumUninitialized with a boolean bAllowShrinking has been deprecated - please use the EAllowShrinking enum instead - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
        OutVertexBuffer.SetNumUninitialized(ImGuiVertexBuffer.Size, false);
                       ^
~\Plugins\ImGui\Source\ImGui\Private\ImGuiDrawData.cpp(47,16): warning C4996: 'TArray<uint32,FDefaultAllocator>::SetNumUninitialized': SetNumUninitialized with a boolean bAllowShrinking has been deprecated - please use the EAllowShrinking enum instead - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
        OutIndexBuffer.SetNumUninitialized(NumElements, false);
                      ^

Warningの内容

引数の2番目のboolの指定がenumを指定するように変わったので出てしまっているようです
シュリンク(縮小)を許可するかどうかをboolでやっていたのがenumで指定させる形に変わるようです

更新内容

ImGuiContextProxy.cpp line 268

// Before(元々シュリンクは許可していない)
DrawLists.SetNum(DrawData->CmdListsCount, false);
// After(enumでのシュリンク許可なしに変える)
DrawLists.SetNum(DrawData->CmdListsCount, EAllowShrinking::No);

ImGuiDrawData.cpp line 13

// Before(元々シュリンクは許可していない)
OutVertexBuffer.SetNumUninitialized(ImGuiVertexBuffer.Size, false);
// After(enumでのシュリンク許可なしに変える)
OutVertexBuffer.SetNumUninitialized(ImGuiVertexBuffer.Size, EAllowShrinking::No);

ImGuiDrawData.cpp line 13

// Before(元々シュリンクは許可していない)
OutIndexBuffer.SetNumUninitialized(NumElements, false);
// After(enumでのシュリンク許可なしに変える)
OutIndexBuffer.SetNumUninitialized(NumElements, EAllowShrinking::No);
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?