diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2024-12-02 16:41:58 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2024-12-03 11:18:44 +0900 |
commit | db31db002483779671fe06a740bbbacf30ec09e7 (patch) | |
tree | 29fc48f499dc3b96cd903648805d597044f7ad11 | |
parent | 0af8bb7b3f924ac3f3bd015f2e5277f46598bef4 (diff) | |
download | afl++-db31db002483779671fe06a740bbbacf30ec09e7.tar.gz |
Use C++20's shared_ptr
-rw-r--r-- | GNUmakefile | 2 | ||||
-rw-r--r-- | src/aflrun.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index d4fda060..9a2a7ad3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -152,7 +152,7 @@ override CFLAGS += -g -Wno-pointer-sign -Wno-variadic-macros -Wall -Wextra -Wno- # -fstack-protector CXXFLAGS ?= -O2 $(CFLAGS_OPT) -override CXXFLAGS += -Iinclude +override CXXFLAGS += -std=c++20 -Iinclude ifdef AFLRUN_CTX override CFLAGS += -DAFLRUN_CTX diff --git a/src/aflrun.cpp b/src/aflrun.cpp index b23c9e02..54a1f203 100644 --- a/src/aflrun.cpp +++ b/src/aflrun.cpp @@ -2,7 +2,6 @@ #include <boost/dynamic_bitset.hpp> #include <boost/functional/hash.hpp> -#include <boost/make_shared.hpp> namespace bo = boost; #include <algorithm> @@ -497,13 +496,13 @@ class TargetGrouper; struct SeedFringes { - bo::shared_ptr<u8[]> bitmap; + std::shared_ptr<u8[]> bitmap; size_t bitmap_size; size_t num_ones; explicit SeedFringes(size_t num_fringes) : bitmap_size((num_fringes + 7) / 8), num_ones(0) { - bitmap = bo::make_shared<u8[]>(bitmap_size); + bitmap = std::make_shared<u8[]>(bitmap_size); fill(bitmap.get(), bitmap.get() + bitmap_size, 0); } bool operator==(const SeedFringes& rhs) const |