Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/file.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#include "file.h"

#ifdef _WIN32

#ifndef NOMINMAX
#define NOMINMAX
#endif

#include <Windows.h>

#else

#include <fstream>
#define FSTR(x) static_cast<std::fstream*>(x)

#endif

namespace si {
Expand Down Expand Up @@ -99,6 +106,7 @@ void File::seek(File::pos_t p, SeekMode s)

DWORD m;
switch (s) {
default:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed. All cases are handled.

SIEdit/lib/file.h

Lines 44 to 49 in 6da93b2

enum SeekMode
{
SeekStart,
SeekCurrent,
SeekEnd
};

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a long time-- it shouldn't but I remember GCC under MSYS2 complaining that it wasn't handled anyway.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

case SeekStart:
m = FILE_BEGIN;
break;
Expand Down