svutil: Clean include file

* Remove MIN, MAX macros. They are unused.
* Include windows.h indirectly by including host.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-04-22 20:36:37 +02:00
parent e12b99d49b
commit 3bd61bfae4
2 changed files with 2 additions and 13 deletions

View File

@ -2,7 +2,6 @@
// File: svutil.cpp
// Description: ScrollView Utilities
// Author: Joern Wanke
// Created: Thu Nov 29 2007
//
// (C) Copyright 2007, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
@ -22,7 +21,6 @@
#include <cstdio>
#ifdef _WIN32
#include <windows.h>
#pragma comment(lib, "Ws2_32.lib")
struct addrinfo {
struct sockaddr* ai_addr;
@ -31,6 +29,7 @@ struct addrinfo {
int ai_socktype;
int ai_protocol;
};
#include <winsock2.h> // for fd_set, send, ...
#else
#include <arpa/inet.h>
#include <netdb.h>

View File

@ -2,7 +2,6 @@
// File: svutil.h
// Description: ScrollView Utilities
// Author: Joern Wanke
// Created: Thu Nov 29 2007
//
// (C) Copyright 2007, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
@ -25,8 +24,7 @@
#define TESSERACT_VIEWER_SVUTIL_H_
#ifdef _WIN32
#include <windows.h>
#include "platform.h"
#include "host.h" // also includes windows.h
#else
#include <pthread.h>
#include <semaphore.h>
@ -34,14 +32,6 @@
#include <string>
#ifndef MAX
#define MAX(a, b) ((a > b) ? a : b)
#endif
#ifndef MIN
#define MIN(a, b) ((a < b) ? a : b)
#endif
/// The SVSync class provides functionality for Thread & Process Creation
class SVSync {
public: