From e236182f9bdc5a9c45709be3fd9fc45b46a95a97 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 25 Nov 2010 23:20:11 -0500 Subject: [PATCH] LoadFile: added warning output if file not found --- LoadFile.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/LoadFile.cc b/LoadFile.cc index 373acf3..7bfb944 100644 --- a/LoadFile.cc +++ b/LoadFile.cc @@ -1,4 +1,6 @@ +#include + #include "LoadFile.h" using namespace std; @@ -24,7 +26,12 @@ FileLoader::Buffer LoadFile::load(const FileLoader::Path & path) map::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); }