utility.hpp (74849bef22033fc8ff0011e1c48721ff973bd2a2) | utility.hpp (b00dcc27587267e18d3abdee82f1ed7b39744d02) |
---|---|
1#pragma once 2 3#include "nlohmann/json.hpp" 4 5#include <openssl/crypto.h> 6 7#include <chrono> 8#include <cstdint> --- 110 unchanged lines hidden (view full) --- 119 static constexpr int value = 120 getParameterTag<typename std::decay<Arg>::type>() 121 ? subValue * 6 + getParameterTag<typename std::decay<Arg>::type>() 122 : subValue; 123}; 124 125inline bool isParameterTagCompatible(uint64_t a, uint64_t b) 126{ | 1#pragma once 2 3#include "nlohmann/json.hpp" 4 5#include <openssl/crypto.h> 6 7#include <chrono> 8#include <cstdint> --- 110 unchanged lines hidden (view full) --- 119 static constexpr int value = 120 getParameterTag<typename std::decay<Arg>::type>() 121 ? subValue * 6 + getParameterTag<typename std::decay<Arg>::type>() 122 : subValue; 123}; 124 125inline bool isParameterTagCompatible(uint64_t a, uint64_t b) 126{ |
127 |
|
127 if (a == 0) 128 { 129 return b == 0; 130 } 131 if (b == 0) 132 { 133 return a == 0; 134 } --- 11 unchanged lines hidden (view full) --- 146 { 147 return false; 148 } 149 return isParameterTagCompatible(a / 6, b / 6); 150} 151 152constexpr uint64_t getParameterTag(std::string_view s, unsigned p = 0) 153{ | 128 if (a == 0) 129 { 130 return b == 0; 131 } 132 if (b == 0) 133 { 134 return a == 0; 135 } --- 11 unchanged lines hidden (view full) --- 147 { 148 return false; 149 } 150 return isParameterTagCompatible(a / 6, b / 6); 151} 152 153constexpr uint64_t getParameterTag(std::string_view s, unsigned p = 0) 154{ |
155 |
|
154 if (p == s.size()) 155 { 156 return 0; 157 } 158 159 if (s[p] != '<') 160 { 161 return getParameterTag(s, p + 1); --- 471 unchanged lines hidden --- | 156 if (p == s.size()) 157 { 158 return 0; 159 } 160 161 if (s[p] != '<') 162 { 163 return getParameterTag(s, p + 1); --- 471 unchanged lines hidden --- |