Skip to content

Commit 17faf3a

Browse files
committed
typo - registerListener needs to return the same type as unregister takes, also the design for the subscriber could be better however lets leave it currently
1 parent 70c5d58 commit 17faf3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/nbl/ext/ImGui/ImGui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class UI final : public core::IReferenceCounted
5757
bool render(nbl::video::SIntendedSubmitInfo& info, const nbl::video::IGPUDescriptorSet* const descriptorSet);
5858

5959
//! registers lambda listener in which ImGUI calls should be recorded
60-
std::optional<size_t> registerListener(std::function<void()> const& listener);
60+
size_t registerListener(std::function<void()> const& listener);
6161
std::optional<size_t> unregisterListener(size_t id);
6262

6363
//! sets ImGUI context, you are supposed to pass valid ImGuiContext* context

src/nbl/ext/ImGui/ImGui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ namespace nbl::ext::imgui
10161016
return true;
10171017
}
10181018

1019-
std::optional<size_t> UI::registerListener(const std::function<void()>& listener)
1019+
size_t UI::registerListener(const std::function<void()>& listener)
10201020
{
10211021
assert(listener != nullptr);
10221022
m_subscribers.emplace_back(listener);

0 commit comments

Comments
 (0)