mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1252104 - make NS_ERROR_GET_CODE() and NS_ERROR_GET_MODULE() constexpr r=froydnj
This commit is contained in:
parent
c67e2a4d3c
commit
7b5db8ddba
@ -11,6 +11,7 @@
|
||||
#error nsError.h no longer supports C sources
|
||||
#endif
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
#include <stdint.h>
|
||||
@ -190,12 +191,12 @@ NS_ErrorAccordingToNSPR();
|
||||
* @name Standard Macros for retrieving error bits
|
||||
*/
|
||||
|
||||
inline uint16_t
|
||||
inline MOZ_CONSTEXPR uint16_t
|
||||
NS_ERROR_GET_CODE(nsresult aErr)
|
||||
{
|
||||
return uint32_t(aErr) & 0xffff;
|
||||
}
|
||||
inline uint16_t
|
||||
inline MOZ_CONSTEXPR uint16_t
|
||||
NS_ERROR_GET_MODULE(nsresult aErr)
|
||||
{
|
||||
return ((uint32_t(aErr) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff;
|
||||
|
Loading…
Reference in New Issue
Block a user