-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathbc-ur.patch
More file actions
74 lines (63 loc) · 2.24 KB
/
bc-ur.patch
File metadata and controls
74 lines (63 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
diff --git -ru a/src/cbor-lite.hpp b/src/cbor-lite.hpp
--- a/src/cbor-lite.hpp 2021-01-20 00:19:17.000000000 +0100
+++ b/src/cbor-lite.hpp 2023-12-12 15:49:34.523285843 +0100
@@ -8,6 +8,7 @@
// COPYRIGHT.md file in the top-level folder of the CBOR-lite software
// distribution.
+#include <cstdint>
#include <exception>
#include <iterator>
#include <string>
diff --git -ru a/src/Makefile.in b/src/Makefile.in
--- a/src/Makefile.in 2021-01-20 00:19:17.000000000 +0100
+++ b/src/Makefile.in 2023-12-12 15:48:42.308731733 +0100
@@ -28,8 +28,8 @@
RESET=`tput sgr0`
COMPILER = g++
-CFLAGS += --debug -O0
-CXXFLAGS += -std=c++17 -stdlib=libc++ --debug -O0
+CFLAGS +=
+CXXFLAGS += -std=c++17
ARFLAGS = rcs
diff --git -ru a/src/memzero.c b/src/memzero.c
--- a/src/memzero.c 2021-01-20 00:19:17.000000000 +0100
+++ b/src/memzero.c 2023-12-12 15:47:38.457606865 +0100
@@ -6,7 +6,7 @@
#include <string.h>
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#endif
#ifdef __unix__
diff --git -ru a/src/xoshiro256.cpp b/src/xoshiro256.cpp
--- a/src/xoshiro256.cpp 2021-01-20 00:19:17.000000000 +0100
+++ b/src/xoshiro256.cpp 2023-12-12 15:47:18.376623718 +0100
@@ -7,6 +7,7 @@
#include "xoshiro256.hpp"
#include <limits>
+#include <cstring>
/* Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
diff --git a/src/utils.hpp b/src/utils.hpp
--- a/src/utils.hpp
+++ b/src/utils.hpp
@@ -60,11 +60,8 @@ std::vector<T> join(const std::vector<std::vector<T>>& parts) {
template<typename T>
std::pair<std::vector<T>, std::vector<T>> split(const std::vector<T>& buf, size_t count) {
auto first = buf.begin();
- auto c = std::min(buf.size(), count);
- auto last = first + c;
- auto a = std::vector(first, last);
- auto b = std::vector(last, buf.end());
- return std::make_pair(a, b);
+ auto last = first + std::min(buf.size(), count);
+ return { {first, last}, {last, buf.end()} };
}
template<typename T>
@@ -72,7 +69,7 @@ std::vector<T> take_first(const std::vector<T> &buf, size_t count) {
auto first = buf.begin();
auto c = std::min(buf.size(), count);
auto last = first + c;
- return std::vector(first, last);
+ return {first, last};
}
void xor_into(ByteVector& target, const ByteVector& source);