Commit ead14be6 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

removed deprecated "throw()" declarations

parent 09675db6
......@@ -222,8 +222,7 @@ const std::string GemDylibHandle::defaultExtension =
GemDylib::GemDylib(const CPPExtern*obj, const std::string filename, const std::string extension)
throw (GemException) :
m_handle(0) {
: m_handle(0) {
m_handle=GemDylibHandle::open(obj, filename, extension);
if(NULL==m_handle) {
std::string err="unable to open '";
......@@ -238,7 +237,8 @@ GemDylib::GemDylib(const CPPExtern*obj, const std::string filename, const std::s
s_dylibs.push_back(this);
}
GemDylib::GemDylib(const std::string filename, const std::string extension) throw (GemException) : m_handle(0) {
GemDylib::GemDylib(const std::string filename, const std::string extension)
: m_handle(0) {
m_handle=GemDylibHandle::open(filename+extension);
if(NULL==m_handle)
m_handle=GemDylibHandle::open(filename+GemDylibHandle::defaultExtension);
......
......@@ -28,10 +28,10 @@ class GEM_EXTERN GemDylib {
GemDylib(const CPPExtern*obj,
const std::string libname,
const std::string extension=std::string("")
) throw(GemException);
); // throws GemException
GemDylib(const std::string libname,
const std::string extension=std::string("")
) throw(GemException);
); // throws GemException
GemDylib(const GemDylib&);
......
......@@ -20,24 +20,24 @@
#include "m_pd.h"
GemException::GemException(const char *error) throw()
GemException::GemException(const char *error)
: ErrorString(error)
{}
GemException::GemException(const std::string error) throw()
GemException::GemException(const std::string error)
: ErrorString(error)
{}
GemException::GemException() throw()
GemException::GemException()
: ErrorString(std::string(""))
{}
GemException::~GemException() throw()
GemException::~GemException()
{}
const char *GemException::what() const throw() {
const char *GemException::what() const {
return ErrorString.c_str();
}
void GemException::report(const char*origin) const throw() {
void GemException::report(const char*origin) const {
if(!(ErrorString.empty())) {
if (NULL==origin)
error("GemException: %s", ErrorString.c_str());
......
......@@ -39,13 +39,13 @@ typedef struct _text t_object;
class GEM_EXTERN GemException
{
public:
GemException(void) throw();
GemException(const char*error) throw();
GemException(const std::string error) throw();
virtual ~GemException(void) throw();
GemException(void);
GemException(const char*error);
GemException(const std::string error);
virtual ~GemException(void);
virtual const char *what(void) const throw();
virtual void report(const char*origin=0) const throw();
virtual const char *what(void) const;
virtual void report(const char*origin=0) const;
private:
const std::string ErrorString;
};
......
......@@ -81,7 +81,7 @@ GLuintMap::GLuintMap(const std::string&name)
GLuintMap::~GLuintMap()
{}
GLuint GLuintMap::get(float f) throw(GemException&){
GLuint GLuintMap::get(float f) {
if(m_pimpl->idmap.count(f)>0) {
GLuint i = m_pimpl->idmap[f];
return i;
......
......@@ -45,7 +45,7 @@ GEM_EXTERN extern int getGLbitfield(int argc, struct _atom *argv);
public:
GLuintMap(const std::string&name);
virtual ~GLuintMap();
GLuint get(float) throw(GemException&);
GLuint get(float); // throws GemException
/* map a GLuint to float; if float is 0, the new mapping is created,
* else we just update an existing one
* updating is especially useful with multiple contexts */
......
......@@ -105,7 +105,7 @@ static const uint8_t utf8d[] = {
namespace gem {
namespace string {
std::wstring toWstring(const char*str) throw(int){
std::wstring toWstring(const char*str) {
std::wstring result;
wchar_t unic = 0;
......
......@@ -28,7 +28,8 @@ namespace gem {
GEM_EXTERN std::wstring getVisualLine(const std::wstring&);
/* convert a UTF-8 string to wchar */
GEM_EXTERN std::wstring toWstring(const char*str) throw(int);
// throws 'int', holding the position of the char that couldn't be converted
GEM_EXTERN std::wstring toWstring(const char*str);
};
};
......
......@@ -34,9 +34,9 @@ namespace gem
bad_any_cast(const std::type_info& src, const std::type_info& dest)
: result(std::string("bad cast (")+src.name() + "->" + dest.name()+")")
{ }
virtual ~bad_any_cast(void) throw()
virtual ~bad_any_cast(void)
{ }
virtual const char* what(void) const throw() {
virtual const char* what(void) const {
return result.c_str();
}
const std::string result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment