Skip to content

Commit

Permalink
Fix ChipError scope resolution
Browse files Browse the repository at this point in the history
Make sure to unambiguously specify the chip namespace in macros
as they can be evaluated in places where 'chip::' is ambiguous.
  • Loading branch information
mspang committed Sep 13, 2021
1 parent e945d16 commit 66c5a35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/core/CHIPError.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ class ChipError
* (In C++20 this could be replaced by a consteval constructor.)
*/
#if CHIP_CONFIG_ERROR_SOURCE
#define CHIP_SDK_ERROR(part, code) (::chip::ChipError(chip::ChipError::SdkErrorConstant<(part), (code)>::value, __FILE__, __LINE__))
#define CHIP_SDK_ERROR(part, code) (::chip::ChipError(::chip::ChipError::SdkErrorConstant<(part), (code)>::value, __FILE__, __LINE__))
#else // CHIP_CONFIG_ERROR_SOURCE
#define CHIP_SDK_ERROR(part, code) (::chip::ChipError(chip::ChipError::SdkErrorConstant<(part), (code)>::value))
#define CHIP_SDK_ERROR(part, code) (::chip::ChipError(::chip::ChipError::SdkErrorConstant<(part), (code)>::value))
#endif // CHIP_CONFIG_ERROR_SOURCE

/**
Expand Down

0 comments on commit 66c5a35

Please sign in to comment.