Skip to content

ImGuiIntegration: don't use obsolete enum aliases #100

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

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

sthalik
Copy link
Contributor

@sthalik sthalik commented Oct 21, 2022

This is useful to me because clangd chokes on the oversized ImGui header and reducing its size through IMGUI_DISABLE_OBSOLETE_FUNCTIONS helps a bit.

@pezcode
Copy link
Contributor

pezcode commented Oct 21, 2022

This would break for anyone using 1.87 and 1.88, since those enums only got renamed in 1.89 WIP: ocornut/imgui@fd408c9

Best solution I can think of is to use the new enums optionally behind #if IMGUI_VERSION_NUM >= 18823. Might be a bit messy, but supporting IMGUI_DISABLE_OBSOLETE_FUNCTIONS is indeed valuable.

@sthalik sthalik force-pushed the pr/imgui-obsolete-enum branch from 54871da to 557ebf7 Compare October 21, 2022 15:52
This building newer ImGui with `IMGUI_DISABLE_OBSOLETE_FUNCTIONS`.

Use `IMGUI_VERSION_NUM` to avoid breaking old versions (by @pezcode).
@sthalik sthalik force-pushed the pr/imgui-obsolete-enum branch from 557ebf7 to 6ad015e Compare October 21, 2022 15:52
@codecov
Copy link

codecov bot commented Oct 22, 2022

Codecov Report

Base: 76.67% // Head: 76.67% // No change to project coverage 👍

Coverage data is based on head (6ad015e) compared to base (a4f3278).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #100   +/-   ##
=======================================
  Coverage   76.67%   76.67%           
=======================================
  Files          21       21           
  Lines         973      973           
=======================================
  Hits          746      746           
  Misses        227      227           
Impacted Files Coverage Δ
src/Magnum/ImGuiIntegration/Context.hpp 85.52% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mosra mosra added this to the 2022.0a milestone Oct 24, 2022
@mosra mosra merged commit 6ad015e into mosra:master Oct 25, 2022
@mosra
Copy link
Owner

mosra commented Oct 25, 2022

Thanks!

@sthalik sthalik deleted the pr/imgui-obsolete-enum branch October 25, 2022 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants