removed GET_ flags, replaced -1 with GET_FLAG

This commit is contained in:
2020-06-18 17:10:53 +02:00
parent 7c23f1e42c
commit 489fccb25c
5 changed files with 95 additions and 155 deletions

View File

@ -1088,8 +1088,7 @@ int ClientInterface::set_flipped_data(Interface &socket) {
}
int ClientInterface::set_file_format(Interface &socket) {
fileFormat f = GET_FILE_FORMAT;
socket.Receive(f);
auto f = socket.Receive<fileFormat>();
if (f < 0 || f > NUM_FILE_FORMATS) {
throw RuntimeError("Invalid file format: " + std::to_string(f));
}