use MB constant

This commit is contained in:
Lion Kortlepel 2022-03-24 15:16:24 +01:00
parent cd4332b790
commit b780a08f73
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 2 additions and 4 deletions

View File

@ -171,9 +171,7 @@ Version::Version(const std::array<uint8_t, 3>& v)
} }
std::string Version::AsString() { std::string Version::AsString() {
std::stringstream ss {}; return fmt::format("{:d}.{:d}.{:d}", major, minor, patch);
ss << int(major) << "." << int(minor) << "." << int(patch);
return ss.str();
} }
void LogChatMessage(const std::string& name, int id, const std::string& msg) { void LogChatMessage(const std::string& name, int id, const std::string& msg) {

View File

@ -749,7 +749,7 @@ void TNetwork::SendFile(TClient& c, const std::string& UnsafeName) {
void TNetwork::SplitLoad(TClient& c, size_t Sent, size_t Size, bool D, const std::string& Name) { void TNetwork::SplitLoad(TClient& c, size_t Sent, size_t Size, bool D, const std::string& Name) {
std::ifstream f(Name.c_str(), std::ios::binary); std::ifstream f(Name.c_str(), std::ios::binary);
uint32_t Split = 0x7735940; // 125MB uint32_t Split = 125 * MB;
char* Data; char* Data;
if (Size > Split) if (Size > Split)
Data = new char[Split]; Data = new char[Split];