mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 00:30:07 +00:00
[encoding] avoid the use of using for Big/LittleEndian functions (#9621)
This commit refactors the code to eliminate the use of `using` for `BigEndian` or `LittleEndian` functions like `HostSwap` and `ReadUint`. As these functions are frequently used in header files, using the direct namespace enhances code safety by mitigating potential conflicts arising from the order of included headers in the absence of explicit `using` declarations. Generally, avoiding the `using` keyword in headers is considered a recommended practice. Additionally, this commit removes the `Encoding` namespace to shorten the full function names.
This commit is contained in:
@@ -826,7 +826,6 @@ void TestIp4Ip6Translation(void)
|
||||
|
||||
void TestIp4Cidr(void)
|
||||
{
|
||||
using Encoding::BigEndian::HostSwap32;
|
||||
struct TestCase
|
||||
{
|
||||
const char *mNetwork;
|
||||
|
||||
Reference in New Issue
Block a user