Replace use of deprecated C Standard library headers in C++ code.
Change-Id: I9fa6630c7e4bdb2897df34d417635d8c7d8253bc
Signed-off-by: Tyler Chatow <tchatow@gmail.com>
diff --git a/aos/mutex/mutex.cc b/aos/mutex/mutex.cc
index ef4fbbe..18d233d 100644
--- a/aos/mutex/mutex.cc
+++ b/aos/mutex/mutex.cc
@@ -1,8 +1,8 @@
#include "aos/mutex/mutex.h"
-#include <inttypes.h>
-#include <stdio.h>
-#include <string.h>
+#include <cinttypes>
+#include <cstdio>
+#include <cstring>
#include "aos/type_traits/type_traits.h"
#include "glog/logging.h"
@@ -24,9 +24,7 @@
}
}
-void Mutex::Unlock() {
- mutex_unlock(&impl_);
-}
+void Mutex::Unlock() { mutex_unlock(&impl_); }
Mutex::State Mutex::TryLock() {
const int ret = mutex_trylock(&impl_);
@@ -43,8 +41,6 @@
}
}
-bool Mutex::OwnedBySelf() const {
- return mutex_islocked(&impl_);
-}
+bool Mutex::OwnedBySelf() const { return mutex_islocked(&impl_); }
} // namespace aos