Don't pollute global namespace with min/max defines.

Fixes build on new gcc4 revision.
This commit is contained in:
Rene Gollent 2012-11-03 13:35:43 +01:00
parent 6e50e79e54
commit 114d994682
2 changed files with 6 additions and 9 deletions

View File

@ -30,13 +30,16 @@
// DEALINGS IN THE SOFTWARE.
/*****************************************************************************/
#include "BaseTranslator.h"
#include <string.h>
#include <stdio.h>
#include <algorithm>
#include <Catalog.h>
#include <Locale.h>
#include "BaseTranslator.h"
#undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "BaseTranslator"
@ -546,7 +549,8 @@ BaseTranslator::translate_from_bits_to_bits(BPositionIO *inSource,
if (writ < 0)
break;
remaining -= static_cast<uint32>(writ);
rd = inSource->Read(buf, min(1024, remaining));
rd = inSource->Read(buf, std::min(1024UL,
remaining));
}
if (remaining > 0)

View File

@ -43,13 +43,6 @@
#include <View.h>
#include "TranslatorSettings.h"
#ifndef min
#define min(a,b) ((a < b) ? (a) : (b))
#endif
#ifndef max
#define max(a,b) ((a > b) ? (a) : (b))
#endif
class BaseTranslator : public BTranslator {
public:
BaseTranslator(const char *name, const char *info,