summaryrefslogtreecommitdiff
path: root/third-party
diff options
context:
space:
mode:
authorcngzhnp <cengizhanpasaoglu@gmail.com>2018-09-05 18:07:53 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-09-05 18:13:31 -0700
commit64324e329eb0a9b4e77241a425a1615ff524c7f1 (patch)
treedd818a00b9c61f5a98390aba2964cdfb6db67d18 /third-party
parent90f504820799f90c16b6dbb6b3e7a303e499bdc3 (diff)
Support pragma once in all header files and cleanup some warnings (#4339)
Summary: As you know, almost all compilers support "pragma once" keyword instead of using include guards. To be keep consistency between header files, all header files are edited. Besides this, try to fix some warnings about loss of data. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4339 Differential Revision: D9654990 Pulled By: ajkr fbshipit-source-id: c2cf3d2d03a599847684bed81378c401920ca848
Diffstat (limited to 'third-party')
-rw-r--r--third-party/fbson/FbsonDocument.h5
-rw-r--r--third-party/fbson/FbsonJsonParser.h5
-rw-r--r--third-party/fbson/FbsonStream.h5
-rw-r--r--third-party/fbson/FbsonUtil.h5
-rw-r--r--third-party/fbson/FbsonWriter.h5
5 files changed, 5 insertions, 20 deletions
diff --git a/third-party/fbson/FbsonDocument.h b/third-party/fbson/FbsonDocument.h
index 11b6fe28e..c69fcb45f 100644
--- a/third-party/fbson/FbsonDocument.h
+++ b/third-party/fbson/FbsonDocument.h
@@ -55,8 +55,7 @@
* @author Tian Xia <tianx@fb.com>
*/
-#ifndef FBSON_FBSONDOCUMENT_H
-#define FBSON_FBSONDOCUMENT_H
+#pragma once
#include <stdlib.h>
#include <string.h>
@@ -889,5 +888,3 @@ inline FbsonValue* FbsonValue::findPath(const char* key_path,
#pragma pack(pop)
} // namespace fbson
-
-#endif // FBSON_FBSONDOCUMENT_H
diff --git a/third-party/fbson/FbsonJsonParser.h b/third-party/fbson/FbsonJsonParser.h
index 47bff77fe..f4b8ed251 100644
--- a/third-party/fbson/FbsonJsonParser.h
+++ b/third-party/fbson/FbsonJsonParser.h
@@ -47,8 +47,7 @@
* @author Tian Xia <tianx@fb.com>
*/
-#ifndef FBSON_FBSONPARSER_H
-#define FBSON_FBSONPARSER_H
+#pragma once
#include <cmath>
#include <limits>
@@ -741,5 +740,3 @@ class FbsonJsonParserT {
typedef FbsonJsonParserT<FbsonOutStream> FbsonJsonParser;
} // namespace fbson
-
-#endif // FBSON_FBSONPARSER_H
diff --git a/third-party/fbson/FbsonStream.h b/third-party/fbson/FbsonStream.h
index 12723ea30..b20cb1c3b 100644
--- a/third-party/fbson/FbsonStream.h
+++ b/third-party/fbson/FbsonStream.h
@@ -18,8 +18,7 @@
* @author Tian Xia <tianx@fb.com>
*/
-#ifndef FBSON_FBSONSTREAM_H
-#define FBSON_FBSONSTREAM_H
+#pragma once
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
@@ -178,5 +177,3 @@ class FbsonOutStream : public std::ostream {
};
} // namespace fbson
-
-#endif // FBSON_FBSONSTREAM_H
diff --git a/third-party/fbson/FbsonUtil.h b/third-party/fbson/FbsonUtil.h
index 2b6d6f5c9..70ac6cb2b 100644
--- a/third-party/fbson/FbsonUtil.h
+++ b/third-party/fbson/FbsonUtil.h
@@ -9,8 +9,7 @@
* @author Tian Xia <tianx@fb.com>
*/
-#ifndef FBSON_FBSONUTIL_H
-#define FBSON_FBSONUTIL_H
+#pragma once
#include <sstream>
#include "FbsonDocument.h"
@@ -159,5 +158,3 @@ class FbsonToJson {
};
} // namespace fbson
-
-#endif // FBSON_FBSONUTIL_H
diff --git a/third-party/fbson/FbsonWriter.h b/third-party/fbson/FbsonWriter.h
index 2b94ef0a0..e5010fade 100644
--- a/third-party/fbson/FbsonWriter.h
+++ b/third-party/fbson/FbsonWriter.h
@@ -25,8 +25,7 @@
* @author Tian Xia <tianx@fb.com>
*/
-#ifndef FBSON_FBSONWRITER_H
-#define FBSON_FBSONWRITER_H
+#pragma once
#include <stack>
#include "FbsonDocument.h"
@@ -433,5 +432,3 @@ class FbsonWriterT {
typedef FbsonWriterT<FbsonOutStream> FbsonWriter;
} // namespace fbson
-
-#endif // FBSON_FBSONWRITER_H