LoadFile: added warning output if file not found
This commit is contained in:
1 parent
70e737e78f
commit
e236182f9b
1 file changed
+7
@@ -1,4 +1,6 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "LoadFile.h"
|
||||
|
||||
using namespace std;
|
||||
@@ -24,7 +26,12 @@ FileLoader::Buffer LoadFile::load(const FileLoader::Path & path)
|
||||
map<string, fileref_t *>::iterator it = m_filemap.find(path.shortPath);
|
||||
|
||||
if (it == m_filemap.end())
|
||||
{
|
||||
cerr << "Warning: LoadFile::load("
|
||||
<< path.shortPath << ") did not find file"
|
||||
<< endl;
|
||||
return Buffer(0);
|
||||
}
|
||||
|
||||
return Buffer((char *) it->second->data, it->second->length);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user