Fixes for gcc compilation
This commit is contained in:
parent
7173b5e2cb
commit
f062107e60
|
@ -1242,7 +1242,7 @@ std::fstream* FCEUD_UTF8_fstream(const char *n, const char *m)
|
||||||
FCEUD_MakePathDirs(n);
|
FCEUD_MakePathDirs(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ios_base::open_mode mode = std::ios_base::binary;
|
std::ios_base::openmode mode = std::ios_base::binary;
|
||||||
if(!strcmp(m,"r"))
|
if(!strcmp(m,"r"))
|
||||||
mode |= std::ios_base::in;
|
mode |= std::ios_base::in;
|
||||||
else if(!strcmp(m,"w"))
|
else if(!strcmp(m,"w"))
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class memory_streambuf: public std::streambuf {
|
class memory_streambuf: public std::streambuf {
|
||||||
|
@ -154,7 +155,7 @@ private:
|
||||||
void expand(size_t upto)
|
void expand(size_t upto)
|
||||||
{
|
{
|
||||||
if(!myBuf && !usevec)
|
if(!myBuf && !usevec)
|
||||||
throw new std::exception("memory_streambuf is not expandable");
|
throw new std::runtime_error("memory_streambuf is not expandable");
|
||||||
|
|
||||||
size_t newcapacity;
|
size_t newcapacity;
|
||||||
if(upto == -1)
|
if(upto == -1)
|
||||||
|
|
Loading…
Reference in New Issue