summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-28 17:43:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-28 17:43:26 +0300
commitdd941148547c6813f8df17f452f32feee7e09f81 (patch)
tree82655ba9c9a91190a22311d09313cb89500587ac
parent9c289c7cc0e5fdf89eed1e28200166714789c92f (diff)
downloadmanaverse-dd941148547c6813f8df17f452f32feee7e09f81.tar.gz
manaverse-dd941148547c6813f8df17f452f32feee7e09f81.tar.bz2
manaverse-dd941148547c6813f8df17f452f32feee7e09f81.tar.xz
manaverse-dd941148547c6813f8df17f452f32feee7e09f81.zip
Remove VirtFs::getLastError().
-rw-r--r--src/fs/virtfs.h1
-rw-r--r--src/fs/virtfs/virtfs.cpp5
-rw-r--r--src/fs/virtfsrwops.cpp21
-rw-r--r--src/fs/virtfstools.cpp5
4 files changed, 9 insertions, 23 deletions
diff --git a/src/fs/virtfs.h b/src/fs/virtfs.h
index 0b0a4b5d3..e73aa741f 100644
--- a/src/fs/virtfs.h
+++ b/src/fs/virtfs.h
@@ -60,7 +60,6 @@ namespace VirtFs
bool remove(const std::string &restrict filename);
bool deinit();
void permitLinks(const bool val);
- const char *getLastError();
int64_t read(VirtFile *restrict const handle,
void *restrict const buffer,
const uint32_t objSize,
diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp
index fbcb5b2ef..36aab8eab 100644
--- a/src/fs/virtfs/virtfs.cpp
+++ b/src/fs/virtfs/virtfs.cpp
@@ -512,11 +512,6 @@ namespace VirtFs
VirtFsDir::permitLinks(val);
}
- const char *getLastError()
- {
- return "";
- }
-
int close(VirtFile *restrict const file)
{
if (file == nullptr)
diff --git a/src/fs/virtfsrwops.cpp b/src/fs/virtfsrwops.cpp
index adb6fe0ea..8b1ccd4cc 100644
--- a/src/fs/virtfsrwops.cpp
+++ b/src/fs/virtfsrwops.cpp
@@ -154,8 +154,7 @@ static RWOPSINT virtfsrwops_seek(SDL_RWops *const rw,
if (current == -1)
{
logger->assertLog(
- "virtfsrwops_seek: Can't find position in file: %s",
- VirtFs::getLastError());
+ "virtfsrwops_seek: Can't find position in file.");
return -1;
} /* if */
@@ -177,8 +176,7 @@ static RWOPSINT virtfsrwops_seek(SDL_RWops *const rw,
const int64_t len = VirtFs::fileLength(handle);
if (len == -1)
{
- logger->assertLog("virtfsrwops_seek:Can't find end of file: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek:Can't find end of file.");
return -1;
} /* if */
@@ -207,8 +205,7 @@ static RWOPSINT virtfsrwops_seek(SDL_RWops *const rw,
if (!VirtFs::seek(handle, static_cast<uint64_t>(pos)))
{
- logger->assertLog("virtfsrwops_seek: seek error: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek: seek error.");
return -1;
} /* if */
@@ -231,8 +228,7 @@ static RWOPSSIZE virtfsrwops_read(SDL_RWops *const rw,
{
if (!VirtFs::eof(handle)) /* not EOF? Must be an error. */
{
- logger->assertLog("virtfsrwops_seek: read error: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek: read error.");
}
} /* if */
@@ -253,8 +249,7 @@ static RWOPSSIZE virtfsrwops_write(SDL_RWops *const rw,
CAST_U32(num));
if (rc != static_cast<int64_t>(num))
{
- logger->assertLog("virtfsrwops_seek: write error: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek: write error.");
}
return CAST_S32(rc);
@@ -268,8 +263,7 @@ static int virtfsrwops_close(SDL_RWops *const rw)
rw->hidden.unknown.data1);
if (!VirtFs::close(handle))
{
- logger->assertLog("virtfsrwops_seek: close error: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek: close error.");
return -1;
} /* if */
@@ -301,8 +295,7 @@ static SDL_RWops *create_rwops(VirtFile *const file)
if (!file)
{
- logger->assertLog("virtfsrwops_seek: create rwops error: %s",
- VirtFs::getLastError());
+ logger->assertLog("virtfsrwops_seek: create rwops error.");
}
else
{
diff --git a/src/fs/virtfstools.cpp b/src/fs/virtfstools.cpp
index 074044908..2aba0738a 100644
--- a/src/fs/virtfstools.cpp
+++ b/src/fs/virtfstools.cpp
@@ -44,9 +44,8 @@ namespace VirtFs
if (!file)
{
- logger->log("Warning: Failed to load %s: %s",
- fileName.c_str(),
- VirtFs::getLastError());
+ logger->log("Warning: Failed to load %s.",
+ fileName.c_str());
return nullptr;
}