Skip to content
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

Add missing noexcept for some move ctors/assigns #148

Closed
wants to merge 2 commits into from

Conversation

Skylion007
Copy link
Contributor

I applied some fixes with the latest clang-tidy tools to Corrade. Mainly some missing noexcept specifies for move assignments, which will allow it to use move operations in STL containers.

LinkedLIst could also have some methods marked as noexcept, although they would not actually be noexcept with CORRADE_ASSERTS (in debug mode). They are noexcept in Release Mode though.

@Skylion007 Skylion007 force-pushed the add-no-except branch 2 times, most recently from 80e7fb9 to ce89338 Compare September 8, 2022 15:05
@Skylion007
Copy link
Contributor Author

@mosra This PR should be good to go.

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #148 (2bd6fc5) into master (e6b4d95) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #148   +/-   ##
=======================================
  Coverage   97.94%   97.94%           
=======================================
  Files         133      133           
  Lines       10855    10855           
=======================================
  Hits        10632    10632           
  Misses        223      223           
Impacted Files Coverage Δ
src/Corrade/Utility/Configuration.h 100.00% <ø> (ø)
src/Corrade/Utility/ConfigurationGroup.h 100.00% <ø> (ø)
src/Corrade/Utility/Configuration.cpp 98.76% <100.00%> (ø)
src/Corrade/Utility/ConfigurationGroup.cpp 85.92% <100.00%> (ø)

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

@mosra mosra added this to the 2022.0a milestone Sep 14, 2022
@mosra
Copy link
Owner

mosra commented Sep 14, 2022

Yeah I was neglecting these because the whole Configuration API is due for a serious redesign :) Thanks in any case.

they would not actually be noexcept with CORRADE_ASSERTS (in debug mode)

Just to correct here a bit -- the asserts are not exceptions (they're aborting), and thus can appear in noexcept functions. And CORRADE_ASSERT() stays there even in Release, the CORRADE_DEBUG_ASSERT() macros are debug-build-only.

@Skylion007 Skylion007 closed this Sep 14, 2022
@mosra mosra reopened this Sep 14, 2022
@mosra
Copy link
Owner

mosra commented Sep 14, 2022

Argh GitHub UI what are you doing. Merged as 1d214f6 :)

@mosra mosra closed this Sep 14, 2022
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.

2 participants