mirror of https://github.com/oxen-io/lokinet
clang-format, include <iterator>, fix size_type casts for ILP32 and LLP64 data models
This commit is contained in:
parent
778a45bb37
commit
3232a98b2c
|
@ -25,11 +25,7 @@ namespace llarp
|
|||
HandleMessage(IMessageHandler* h, llarp::Router* r) const override;
|
||||
|
||||
void
|
||||
Clear() override
|
||||
{
|
||||
pathLifetime = 0;
|
||||
pathCreated = 0;
|
||||
};
|
||||
Clear() override{};
|
||||
};
|
||||
} // namespace routing
|
||||
} // namespace llarp
|
||||
|
|
|
@ -20,11 +20,7 @@ namespace llarp
|
|||
DecodeKey(llarp_buffer_t key, llarp_buffer_t* val) override;
|
||||
|
||||
void
|
||||
Clear() override
|
||||
{
|
||||
T = 0;
|
||||
L = 0;
|
||||
};
|
||||
Clear() override{};
|
||||
|
||||
bool
|
||||
HandleMessage(IMessageHandler* h, llarp::Router* r) const override;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <iterator>
|
||||
#if defined(RPI) || defined(ANDROID)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,8 @@ namespace llarp
|
|||
{
|
||||
// evidently, does nothing on LP64 systems (where size_t is *already*
|
||||
// unsigned long but zero-extends this on LLP64 systems
|
||||
std::copy(str.begin(), str.begin() + std::min(16UL, str.size()),
|
||||
// 2Jan19: reeee someone undid the patch
|
||||
std::copy(str.begin(), str.begin() + std::min(std::string::size_type(16), str.size()),
|
||||
begin());
|
||||
}
|
||||
|
||||
|
@ -42,7 +43,7 @@ namespace llarp
|
|||
Tag&
|
||||
operator=(const std::string& str)
|
||||
{
|
||||
std::copy(str.begin(), str.begin() + std::min(16UL, str.size()),
|
||||
std::copy(str.begin(), str.begin() + std::min(std::string::size_type(16), str.size()),
|
||||
begin());
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue