Attempt to fix Linux hang

This commit is contained in:
Substitute 2021-02-20 01:03:11 -05:00
parent 3562653d7e
commit 1570e9f069
1 changed files with 14 additions and 22 deletions

View File

@ -116,27 +116,19 @@ auto execute_as_client(std::string ipaddress, std::uint16_t port)
sscout << "Metrics Saved to metrics.json\n";
}
auto operator<<(std::basic_ostream<wchar_t>& os, const std::string& str) -> std::basic_ostream<wchar_t>&
{
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
std::wstring wide = converter.from_bytes(str);
os << wide;
return os;
}
int main() {
term::use_unicode();
sswcout
<< L"┌───────────╖\n"
<< L"│ Project 1 ║\n"
<< L"╘═══════════╝\n";
sscout
<< "┌───────────╖\n"
<< "│ Project 1 ║\n"
<< "╘═══════════╝\n";
sswcout
<< L"┌────────────────────╖\n"
<< L"│ Riley Strickland ║\n"
<< L"│ Jacob Jerris ║\n"
<< L"│ Jacqueline Shrader ║\n"
<< L"╘════════════════════╝\n";
sscout
<< "┌────────────────────╖\n"
<< "│ Riley Strickland ║\n"
<< "│ Jacob Jerris ║\n"
<< "│ Jacqueline Shrader ║\n"
<< "╘════════════════════╝\n";
net::prologue();
const auto mode = get_input<int>("Select Mode\n\t1. Server\n\t2. Client\n>:", "Invalid Choice!",
@ -153,10 +145,10 @@ int main() {
}
net::epilogue();
sswcout
<< L"┌────────────────────╖\n"
<< L"│ Thanks for using ║\n"
<< L"╘════════════════════╝\n";
sscout
<< "┌────────────────────╖\n"
<< "│ Thanks for using ║\n"
<< "╘════════════════════╝\n";
return 0;
}