The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
170:e95d10626187
Parent:
158:1c57384330a6
Child:
171:3a7713b1edbc
--- a/platform/SingletonPtr.h	Fri Jun 22 15:38:59 2018 +0100
+++ b/platform/SingletonPtr.h	Thu Sep 06 13:39:34 2018 +0100
@@ -56,7 +56,7 @@
 inline static void singleton_unlock(void)
 {
 #ifdef MBED_CONF_RTOS_PRESENT
-    osMutexRelease (singleton_mutex_id);
+    osMutexRelease(singleton_mutex_id);
 #endif
 }
 
@@ -80,7 +80,8 @@
      * @returns
      *   A pointer to the singleton
      */
-    T* get() {
+    T *get()
+    {
         if (NULL == _ptr) {
             singleton_lock();
             if (NULL == _ptr) {
@@ -99,7 +100,8 @@
      * @returns
      *   A pointer to the singleton
      */
-    T* operator->() {
+    T *operator->()
+    {
         return get();
     }