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

Remove unused/unneeded header macros #973

Merged
merged 1 commit into from
Jun 18, 2018
Merged

Remove unused/unneeded header macros #973

merged 1 commit into from
Jun 18, 2018

Conversation

Adlai-Holler
Copy link
Member

@Adlai-Holler Adlai-Holler commented Jun 16, 2018

  • AS_ARRAY_COUNT is replaced by C++ array iteration.
  • hidden/pure/const aren't used.
  • ASDISPLAYNODE_WARN_UNUSED is unused in favor of AS_WARN_UNUSED_RESULT
  • ASDISPLAYNODE_NOT_DESIGNATED_INITIALIZER is unnecessary since we can mark the initializer unavailable.
  • ASDISPLAYNODE_NOTHROW is superseded by the noexcept decorator from C++11 ( https://en.cppreference.com/w/cpp/language/noexcept_spec )

Copy link
Contributor

@maicki maicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks for cleaning up a bit!

@@ -160,7 +160,7 @@ namespace ASDN {
public:
#if !TIME_LOCKER

Locker (T &l) ASDISPLAYNODE_NOTHROW : _l (l) {
Locker (T &l) noexcept : _l (l) {
Copy link
Contributor

@maicki maicki Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not pretty sure if we compile Texture with C++14 at the moment as you mention in the description, that said I think it was introduced in C++11 though. Can you double check when it was introduced and if 14 what we are building with please. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this is from c++11 but glad I double-checked.

for (int i=0; i< ARRAY_COUNT(UIContentModeDescriptionLUT); i++) {
if (UIContentModeDescriptionLUT[i].contentMode == contentMode) {
return UIContentModeDescriptionLUT[i].string;
for (auto &e : UIContentModeDescriptionLUT) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better variable name as e in this cases ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think e is short for entry and maybe there's a better name out there but I don't really want to wait for CI to rebuild.

@Adlai-Holler Adlai-Holler merged commit 69e0c09 into master Jun 18, 2018
@Adlai-Holler Adlai-Holler deleted the AHRemoveUnused branch June 18, 2018 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants