Checking in debug_view, some extra missing utils, and the y2016 target_sender code.
Change-Id: I241947265da8f332c39862f4d0ddcdc2d29c7b68
diff --git a/aos/common/scoped_fd.h b/aos/common/scoped_fd.h
index 57ecdd8..29ccf6e 100644
--- a/aos/common/scoped_fd.h
+++ b/aos/common/scoped_fd.h
@@ -1,7 +1,10 @@
+#ifndef _AOS_COMMON_SCOPED_FD_
+#define _AOS_COMMON_SCOPED_FD_
+
#include <unistd.h>
-#include "aos/common/macros.h"
#include "aos/common/logging/logging.h"
+#include "aos/common/macros.h"
namespace aos {
@@ -9,9 +12,7 @@
class ScopedFD {
public:
explicit ScopedFD(int fd = -1) : fd_(fd) {}
- ~ScopedFD() {
- Close();
- }
+ ~ScopedFD() { Close(); }
int get() const { return fd_; }
int release() {
const int r = fd_;
@@ -25,6 +26,7 @@
}
}
operator bool() const { return fd_ != -1; }
+
private:
int fd_;
void Close() {
@@ -38,3 +40,5 @@
};
} // namespace aos
+
+#endif // _AOS_COMMON_SCOPED_FD_