refactor: make TrackableObject::weak_map_id() constexpr (#47116)
* refactor: make TrackableObject::weak_map_id() constexpr refactor: make BaseWindow::GetID() inline and constexpr Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: make NativeWindow::window_id() constexpr too Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
747b2f62e0
commit
ae232703de
4 changed files with 3 additions and 7 deletions
|
@ -261,7 +261,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
|||
void SetTitleBarOverlay(const gin_helper::Dictionary& options,
|
||||
gin_helper::Arguments* args);
|
||||
#endif
|
||||
int32_t GetID() const;
|
||||
[[nodiscard]] constexpr int32_t GetID() const { return weak_map_id(); }
|
||||
|
||||
private:
|
||||
// Helpers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue