mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 13:04:18 -04:00
Values of FILE_* macros are guaranteed in Win32.
This commit is contained in:
@ -346,18 +346,7 @@ void FileStream::seek(long offset, Position p)
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
DWORD whence;
|
||||
switch(p) {
|
||||
case Beginning:
|
||||
whence = FILE_BEGIN;
|
||||
break;
|
||||
case Current:
|
||||
whence = FILE_CURRENT;
|
||||
break;
|
||||
case End:
|
||||
whence = FILE_END;
|
||||
break;
|
||||
default:
|
||||
if(p != Beginning && p != Current && p != End) {
|
||||
debug("FileStream::seek() -- Invalid Position value.");
|
||||
return;
|
||||
}
|
||||
@ -365,7 +354,7 @@ void FileStream::seek(long offset, Position p)
|
||||
LARGE_INTEGER liOffset;
|
||||
liOffset.QuadPart = offset;
|
||||
|
||||
if(!SetFilePointerEx(d->file, liOffset, NULL, whence)) {
|
||||
if(!SetFilePointerEx(d->file, liOffset, NULL, static_cast<DWORD>(p))) {
|
||||
debug("FileStream::seek() -- Failed to set the file pointer.");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user