Skip to content

FROMLIST: libcamera: base: Remove custom __nodiscard attribute

Mattijs Korpershoek requested to merge mkorpershoek/aosp-15-r7-uprev into ti-android-15

__nodiscard was introduced for compatibility with C++14. In C++17, there is an official attribute: nodiscard. Moreover, some libc implementations (like bionic) already define the __nodiscard macro [1].

Since:

  • libcamera builds with cpp_std=c++17
  • nodiscard is already used in the android HAL (exif)

We should replace all usage __nodiscard of by nodiscard for consistency.

Do the replacement and remove the no longer used compiler.h.

[1] https://android-review.googlesource.com/c/platform/bionic/+/3254860

Series:

/cc @glaroque @mfournier @nkbelin

Edited by Mattijs Korpershoek

Merge request reports

Loading