From f95c4c1955b59594186c8eac940b0958f72d1b5f Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 20 Jan 2017 18:14:15 -0800 Subject: [PATCH] Do not wrap APIs in Thread namespace. (#1183) --- src/core/crypto/openthread-crypto.cpp | 6 +----- src/core/openthread.cpp | 6 ++---- src/diag/openthread-diag.cpp | 7 +------ 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/core/crypto/openthread-crypto.cpp b/src/core/crypto/openthread-crypto.cpp index 536c62afb..f359e5afb 100644 --- a/src/core/crypto/openthread-crypto.cpp +++ b/src/core/crypto/openthread-crypto.cpp @@ -38,8 +38,7 @@ #include #include -namespace Thread { -namespace Crypto { +using namespace Thread::Crypto; #ifdef __cplusplus extern "C" { @@ -93,6 +92,3 @@ exit: #ifdef __cplusplus } // extern "C" #endif - -} // namespace Crypto -} // namespace Thread diff --git a/src/core/openthread.cpp b/src/core/openthread.cpp index be2f9fb3a..fbe9266ab 100644 --- a/src/core/openthread.cpp +++ b/src/core/openthread.cpp @@ -67,6 +67,8 @@ #include #include +using namespace Thread; + #ifndef OPENTHREAD_MULTIPLE_INSTANCE static otDEFINE_ALIGNED_VAR(sInstanceRaw, sizeof(otInstance), uint64_t); otInstance *sInstance = NULL; @@ -86,8 +88,6 @@ otInstance::otInstance(void) : { } -namespace Thread { - #ifdef __cplusplus extern "C" { #endif @@ -1890,5 +1890,3 @@ ThreadError otCoapSendResponse(otInstance *aInstance, otMessage aMessage, const #ifdef __cplusplus } // extern "C" #endif - -} // namespace Thread diff --git a/src/diag/openthread-diag.cpp b/src/diag/openthread-diag.cpp index ccd7eab5f..f4cc00b39 100644 --- a/src/diag/openthread-diag.cpp +++ b/src/diag/openthread-diag.cpp @@ -38,9 +38,7 @@ #include #include -namespace Thread { - -namespace Diagnostics { +using namespace Thread::Diagnostics; #ifdef __cplusplus extern "C" { @@ -89,6 +87,3 @@ bool isDiagEnabled() #ifdef __cplusplus } // extern "C" #endif - -} // namespace Diagnostics -} // namespace Thread