From 0ce2ca4e006a70d787481040fa844c85aac43222 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 12 Apr 2011 16:53:15 +0200 Subject: COMMON: Replace MKID_BE by MKTAG MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro. --- graphics/jpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/jpeg.cpp') diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp index 5ddd675273..169c3b5f1b 100644 --- a/graphics/jpeg.cpp +++ b/graphics/jpeg.cpp @@ -226,7 +226,7 @@ bool JPEG::read(Common::SeekableReadStream *stream) { bool JPEG::readJFIF() { uint16 length = _stream->readUint16BE(); uint32 tag = _stream->readUint32BE(); - if (tag != MKID_BE('JFIF')) { + if (tag != MKTAG('J','F','I','F')) { warning("JPEG::readJFIF() tag mismatch"); return false; } -- cgit v1.2.3