CONSTEXPR

main
Brett 2023-10-26 16:16:14 -04:00
parent 5392059465
commit ef5719710e
10 changed files with 11 additions and 6 deletions

Binary file not shown.

View File

@ -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

@ -1 +1 @@
Subproject commit fcceff189b60a02c66280c503d4cac9f8d73ef6b
Subproject commit bd07600f16d3b9675b4b02fc5581a4f966da2200

View File

@ -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++)

View File

@ -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"};
}