From ef5719710ebcf8e831cbf2b1200d098bcf5a8baa Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Thu, 26 Oct 2023 16:16:14 -0400 Subject: [PATCH] CONSTEXPR --- cmake-build-debug/.ninja_deps | Bin 380048 -> 383728 bytes cmake-build-debug/.ninja_log | 5 +++++ .../BLT.dir/src/blt/parse/argparse.cpp.o | Bin 2631144 -> 2631144 bytes .../BLT.dir/src/blt/std/assert.cpp.o | Bin 323480 -> 323480 bytes .../BLT.dir/src/blt/std/loader.cpp.o | Bin 735848 -> 735848 bytes .../BLT.dir/src/blt/std/string.cpp.o | Bin 148744 -> 148744 bytes cmake-build-debug/libraries/BLT/libBLT.a | Bin 11173856 -> 11173856 bytes libraries/BLT | 2 +- src/ip.h | 6 +++--- src/main.cpp | 4 ++-- 10 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cmake-build-debug/.ninja_deps b/cmake-build-debug/.ninja_deps index 622abb7e35c8f35e0762f06a7688dedd8e768ea2..66f66e667a499fab451ad55ee34fbe9e11a88094 100644 GIT binary patch delta 79 zcmbO*Q~bkL@rD-07N!>F7M3ln6VC7jFf%liF*7h|_ptNTAKV@%%;Lw)HgCyvZ6N2@ hYvz5-Y delta 19 bcmeycReZus@rD-07N!>F7M3ln6V3ntQGN%k diff --git a/cmake-build-debug/.ninja_log b/cmake-build-debug/.ninja_log index 316de91..ed34773 100644 --- a/cmake-build-debug/.ninja_log +++ b/cmake-build-debug/.ninja_log @@ -63,3 +63,8 @@ 2997 3087 1698338548789636298 insane_dns ff5ae500893d0be1 5 7590 1698350638277966894 CMakeFiles/insane_dns.dir/src/main.cpp.o 727da43cdbc82421 7590 7806 1698350638505965615 insane_dns ff5ae500893d0be1 +7 1324 1698351285935770667 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/string.cpp.o 2e3de5470fa27489 +6 1821 1698351286431753374 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/assert.cpp.o 2ae218d9777469fd +7 2160 1698351286767741661 libraries/BLT/CMakeFiles/BLT.dir/src/blt/std/loader.cpp.o 3bb9d28d25c10d3b +8 4025 1698351288619677206 libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o 30865d3aadfb703 +4025 4544 1698351289127659550 libraries/BLT/libBLT.a f5b601d9b774b003 diff --git a/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o b/cmake-build-debug/libraries/BLT/CMakeFiles/BLT.dir/src/blt/parse/argparse.cpp.o index 43e2ac357f99db060c57b428d7a7cc06b7b8c7e0..8c8d2022a9987e985e6111f9b9237e9bf8d3a547 100644 GIT binary patch delta 347 zcmXBMJxjx26b0b-CVgYA+NQ>uYHN+DAA>l#6$DYxRXP>4TL%Y0v7KDv5U7J7nUZLS zF2#b2gC##e#DYi!XBVe*aB>n`@WfttmUGX&!Ap|@I5)`@9>lMHT$S@#fn5m8j?Qj99|>@CR&bBJ~^&3A>e1^IqiV2ljna2{5?go z^BnR`syK-*&r!u+>GF+xa-Bn0+M|zJ$CY3R;xG&e7=ck3gCxkHz&K2R3X`D06zGtG dX_$dDWMCGuFb6r92Ltl30E@8XciiRNE2bAPGm0{<-rmN{c$0%saC!m{qmxpKaVsN8I%ppQ zLo5(8X*2){C6E{!NSrHW`w%cd7FGm0{<+}_5_c$0&Xe|iEBqmxpSaVsN8I%ppQ zLo5(8X*2){C6E{!NSrHa`wHbm9m2?P@IC_rBZvVNeLnp{ zKBK7kZLs89G|8pY|Ku}D$p-7>USMEQ2AagU@(z?>cmp&7XoKr^;{ryN62{NdBc3p7 z@IH43naw*>8u7^ed%)u)VFytkn;JAg9xr^h@6%G{s+1t?>- z16OZUD_ql1t?)#(!fSfXTSi$%@9neRGCHv`3QoWKiP4@hWxDKVMtR1R?Y5s8&)YE` r-Og*oHPi9m2?P@IC_rBZvVNeLDR@ zKBK7kO|ax!G|9!&|Ku}D$p-4=USMEQ2AagU@(z?>cmp&7XoK^1;{ryN62_0yBc3p7 z@IG}1nawjTJAg8Gr^h@6%G{m)1t?>wMBjG~Myx2Ha1jAx4t^n|G1 zQ4i4_m;&K%sD~&I<$K8l(j5TdhC#U=5N- z17~kkE1c6%t#C)R!ee^PTSi$%&+W6`GCHv`@=w3}iP4@hX}auZMtR1h?Y5s8&)YE` r-p*^pxw6ul zydXuNfigc~vJAptefpC>5P8QBnVzl3EmM1O9C^$K&-a#?NI18j;V*vxh9w27w Y0@}qS3i1QQT`A3*>$h*NXAC_G08HO1R{#J2 delta 241 zcmeC^;_T?+++dhnFUlPo&%ltx00h>e0#g`43$h*NXAC_G06aG;H2?qr diff --git a/cmake-build-debug/libraries/BLT/libBLT.a b/cmake-build-debug/libraries/BLT/libBLT.a index 1c15023b241c00257a5c48c89521b02ab1c9919c..5a824688fe690e344958433e2225028a850cbee8 100644 GIT binary patch delta 1663 zcmZA1ZA@EL7zglkTBz6-C@WZQ884PH)|Ls3>14oeEi%R!Yy&1QD?_)sbs`K0zTvhq zz1l0{Ms?f4jp=;pfS_@UnoDAgTg?10KWvGKLC2dP$TX-~LbAjU2LI-e&1KMo16AWsE9cFmvC= z%4i)cCL|_uF=R;A62Z@p5~7a`h03}PcN61?r515rq{*SCM;*l#eEew0aF7SI=(y5* z)BJNBO=1m`W*-eOHfheH0cB#+d?iO8rIg)u+Y5~`rr1jT-QzkZW%hfrhq*FbnJjQm zwueniW{8IbNCXQc!78vqGNix*U{g#>sow|lZKi+b2-(5k!(_9RqTQml7dLnsD7iLE z2<46C=$*4cA;orE&HeemT$JSn1$%mZUdJs$vM~`In_B)Me_#eIP@(J(3eFz7$mA(u zZTy`|KD8c&=%)+pn<;_ewtHG|$KPJgOdvDM2BwjjWzHGFT^Ow!tXnR&Q=Ky! z@IW4{gNGm=3ZM|yLlJC%hv5;}2#-QBY=ROfg)-Qz^n1j%f_j^&wT+N{yc{Jq%V~AT zvr6nHgBnS zx4Y*EDamDBeleZ8*h!3IH~gZJT|tW$vLF1SgNn*uelaZxH8pmMUevU@Q$$U}?VTcc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CB%pT^?!-2EEy3WQgg#$W7BEb*c29T;Q-`m z$w&KgmzfMSqBM#7*To}mx z6N2lNiQD9CzvR72FR}I|X+OOkzP2R685n>!U=ZGfvv3ZEAOh#%Ew}&|VHg;Uz$F-k hx8WVQ4DZ5wa0T9n43iFd+Z{ diff --git a/libraries/BLT b/libraries/BLT index fcceff1..bd07600 160000 --- a/libraries/BLT +++ b/libraries/BLT @@ -1 +1 @@ -Subproject commit fcceff189b60a02c66280c503d4cac9f8d73ef6b +Subproject commit bd07600f16d3b9675b4b02fc5581a4f966da2200 diff --git a/src/ip.h b/src/ip.h index a1fd4f6..a3c1323 100644 --- a/src/ip.h +++ b/src/ip.h @@ -14,10 +14,10 @@ using asio::ip::tcp; struct IPAddress { - unsigned char octets[4]; + unsigned char octets[4]{}; std::string asString; - constexpr IPAddress(std::string str) + BLT_CPP20_CONSTEXPR IPAddress(std::string str) { auto data = blt::string::split(str, '.'); BLT_ASSERT(data.size() == 4); @@ -26,7 +26,7 @@ struct IPAddress asString = std::move(str); } - constexpr IPAddress(unsigned char oct[4]) + BLT_CPP20_CONSTEXPR IPAddress(const unsigned char oct[4]) { // ugly sin for (int i = 0; i < 4; i++) diff --git a/src/main.cpp b/src/main.cpp index 77cf945..3b87789 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,13 +28,13 @@ static constexpr bool STRICT_MATCHING = false; /** DNS server to use for forwarding to / resolving DNS requests */ -static inline constexpr std::string DNS_SERVER_IP() +static inline BLT_CPP20_CONSTEXPR std::string DNS_SERVER_IP() { return "8.8.8.8"; } /** replacement IP address. Make sure this is a 4 octet string seperated by `.` */ -static inline constexpr IPAddress REPLACEMENT_IP() +static inline BLT_CPP20_CONSTEXPR IPAddress REPLACEMENT_IP() { return {"139.57.100.6"}; }