fixes for warnings from code analysis

This commit is contained in:
Gulliver
2023-04-20 22:55:17 +02:00
parent 84cbb34391
commit e3fd9cb576
8 changed files with 152 additions and 153 deletions

View File

@ -1,5 +1,5 @@
#ifndef BIG_INT_HPP
#define BIG_INT_HPP
#ifndef OC_ISSUER_BIG_INT_HPP
#define OC_ISSUER_BIG_INT_HPP
#include <string>
#include <array>
@ -9,19 +9,19 @@
struct BigInt {
BigInt() : data() {}
virtual ~BigInt() {}
virtual ~BigInt() = default;
enum class eError : uint8_t { PARSE_ERROR };
static tl::expected<BigInt, eError> from_string(const std::string &str);
static BigInt from_int(uint64_t value);
std::string to_string() const;
[[nodiscard]] std::string to_string() const;
friend bool operator == (const BigInt& rhs, const BigInt& lhs);
private:
std::array<uint8_t,256> data;
std::array<uint8_t,256U> data;
};
bool operator==(const BigInt &rhs, const BigInt &lhs);
#endif // #ifndef #ifndef BIG_INT_HPP
#endif // #ifndef #ifndef OC_ISSUER_BIG_INT_HPP