summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChristian Blichmann <cblichmann@google.com>2022-10-20 11:35:28 +0200
committerPeter LaFosse <peter@vector35.com>2022-11-10 16:20:26 -0500
commit7763b7ab173151aa01b017e1902e1de716f2a1ee (patch)
tree85d0a872c3dfacceb9b655d90d1888d30f246603 /examples
parenta46fea09fd927e165781d8936aa53e8bea69a78a (diff)
Include C++ standard headers
When compiling in C++ mode, the C++ standard library headers should be included instead of their C counterparts. Drive-by: - Removed include of `json/json.h` from `settings.cpp`, where it was not used
Diffstat (limited to 'examples')
-rw-r--r--examples/breakpoint/src/breakpoint.cpp4
-rw-r--r--examples/cmdline_disasm/src/disasm.cpp8
-rw-r--r--examples/llil_parser/src/llil_parser.cpp4
-rw-r--r--examples/mlil_parser/src/mlil_parser.cpp4
-rw-r--r--examples/triage/headers.cpp2
-rw-r--r--examples/triage/imports.cpp2
-rw-r--r--examples/workflows/inliner/inliner.cpp1
-rw-r--r--examples/workflows/tailcall/tailcall.cpp1
-rw-r--r--examples/x86_extension/src/x86_extension.cpp6
9 files changed, 15 insertions, 17 deletions
diff --git a/examples/breakpoint/src/breakpoint.cpp b/examples/breakpoint/src/breakpoint.cpp
index 75156e1d..5cddb2a7 100644
--- a/examples/breakpoint/src/breakpoint.cpp
+++ b/examples/breakpoint/src/breakpoint.cpp
@@ -1,4 +1,4 @@
-#include <inttypes.h>
+#include <cinttypes>
#include "binaryninjaapi.h"
using namespace BinaryNinja;
@@ -37,4 +37,4 @@ extern "C"
"Convert to breakpoint", "Fill region with breakpoint instructions.", &write_breakpoint);
return true;
}
-} \ No newline at end of file
+}
diff --git a/examples/cmdline_disasm/src/disasm.cpp b/examples/cmdline_disasm/src/disasm.cpp
index 49d4d650..cd119dee 100644
--- a/examples/cmdline_disasm/src/disasm.cpp
+++ b/examples/cmdline_disasm/src/disasm.cpp
@@ -1,7 +1,7 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdbool.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstdint>
+#include <cstdbool>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/examples/llil_parser/src/llil_parser.cpp b/examples/llil_parser/src/llil_parser.cpp
index fcff0612..7566d4f1 100644
--- a/examples/llil_parser/src/llil_parser.cpp
+++ b/examples/llil_parser/src/llil_parser.cpp
@@ -1,5 +1,5 @@
-#include <stdio.h>
-#include <inttypes.h>
+#include <cstdio>
+#include <cinttypes>
#include "binaryninjacore.h"
#include "binaryninjaapi.h"
#include "lowlevelilinstruction.h"
diff --git a/examples/mlil_parser/src/mlil_parser.cpp b/examples/mlil_parser/src/mlil_parser.cpp
index 6122dbc7..941b0021 100644
--- a/examples/mlil_parser/src/mlil_parser.cpp
+++ b/examples/mlil_parser/src/mlil_parser.cpp
@@ -1,5 +1,5 @@
-#include <stdio.h>
-#include <inttypes.h>
+#include <cstdio>
+#include <cinttypes>
#include "binaryninjacore.h"
#include "binaryninjaapi.h"
#include "mediumlevelilinstruction.h"
diff --git a/examples/triage/headers.cpp b/examples/triage/headers.cpp
index 1bd9d732..40775b61 100644
--- a/examples/triage/headers.cpp
+++ b/examples/triage/headers.cpp
@@ -1,4 +1,4 @@
-#include <string.h>
+#include <cstring>
#include <time.h>
#include "headers.h"
#include "fontsettings.h"
diff --git a/examples/triage/imports.cpp b/examples/triage/imports.cpp
index 9102ba27..aa3b18b7 100644
--- a/examples/triage/imports.cpp
+++ b/examples/triage/imports.cpp
@@ -1,4 +1,4 @@
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include "imports.h"
#include "view.h"
diff --git a/examples/workflows/inliner/inliner.cpp b/examples/workflows/inliner/inliner.cpp
index da54fbc2..26928931 100644
--- a/examples/workflows/inliner/inliner.cpp
+++ b/examples/workflows/inliner/inliner.cpp
@@ -1,5 +1,4 @@
#define _CRT_SECURE_NO_WARNINGS
-#define NOMINMAX
#include <cinttypes>
#include <cstdint>
diff --git a/examples/workflows/tailcall/tailcall.cpp b/examples/workflows/tailcall/tailcall.cpp
index 01190987..85414479 100644
--- a/examples/workflows/tailcall/tailcall.cpp
+++ b/examples/workflows/tailcall/tailcall.cpp
@@ -1,5 +1,4 @@
#define _CRT_SECURE_NO_WARNINGS
-#define NOMINMAX
#include <cinttypes>
#include <cstdint>
diff --git a/examples/x86_extension/src/x86_extension.cpp b/examples/x86_extension/src/x86_extension.cpp
index 80043287..50552cb0 100644
--- a/examples/x86_extension/src/x86_extension.cpp
+++ b/examples/x86_extension/src/x86_extension.cpp
@@ -1,7 +1,7 @@
#define _CRT_SECURE_NO_WARNINGS
-#include <inttypes.h>
-#include <stdio.h>
-#include <string.h>
+#include <cinttypes>
+#include <cstdio>
+#include <cstring>
#include "binaryninjaapi.h"
#include "asmx86/asmx86.h"