]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/Include: Update Base.h to improve C++ compatibility
authorMichael D Kinney <michael.d.kinney@intel.com>
Tue, 21 Jun 2022 19:30:07 +0000 (12:30 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 11 Nov 2022 05:46:51 +0000 (05:46 +0000)
commit933b4c333c8f9a78280def62bab55eee5a6b2456
tree6cb49f2c21f15226880886323a5805d73a56051c
parent3182843f3bc92599fa2ed4fd13ffd3f75907fe9e
MdePkg/Include: Update Base.h to improve C++ compatibility

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4134

* Map NULL to nullptr or __null when c++ compiler is used.
* Map STATIC_ASSERT to static_assert when a c++ compiler is used.
* Typecast RETURN_SUCCESS to type RETURN_STATUS to match type used
  by all return error/warning status codes.  C++ has stricter type
  checking and found this inconsistency.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdePkg/Include/Base.h