From 250ec5d1a49a09c459084417ad6f0aad066fec25 Mon Sep 17 00:00:00 2001 From: Nils Sauer Date: Wed, 5 Apr 2023 16:03:15 +0200 Subject: [PATCH] Fixed Windows compatibility --- Receiver.cpp | 2 +- Runtime.hpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Receiver.cpp b/Receiver.cpp index 2ceb695..85ac957 100644 --- a/Receiver.cpp +++ b/Receiver.cpp @@ -23,7 +23,7 @@ std::string Receiver::Simple::read(size_t amount) { return fres; } void Receiver::Simple::read(std::byte *buffer, size_t size) { - recv(fd, buffer, size, MSG_WAITALL); + recv(fd, reinterpret_cast(buffer), size, MSG_WAITALL); } std::string Receiver::Simple::readSome(size_t max) { diff --git a/Runtime.hpp b/Runtime.hpp index e53075f..b4f4a17 100644 --- a/Runtime.hpp +++ b/Runtime.hpp @@ -216,6 +216,10 @@ public: std::getline(std::cin, content); return content.c_str(); } + + static void clearScreen() { + system("cls"); + } }; #endif #endif