Merged default into minor

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-02-02 01:13:21 -04:00
35 changed files with 6573 additions and 7744 deletions
+10 -1
View File
@@ -30,10 +30,19 @@ namespace filesystem
{
FileData::FileData(uint64 size, const std::string &filename)
: data(new char[(size_t) size])
: data(nullptr)
, size((size_t) size)
, filename(filename)
{
try
{
data = new char[(size_t) size];
}
catch (std::bad_alloc &)
{
throw love::Exception("Out of memory.");
}
if (filename.rfind('.') != std::string::npos)
extension = filename.substr(filename.rfind('.')+1);
}