Remove deprecated C++11 throw() specifications.

This commit is contained in:
Jean-Paul Chaput 2021-10-01 00:26:58 +02:00
parent 9852c76c2c
commit a617cea0a5
16 changed files with 51 additions and 91 deletions

View File

@ -157,7 +157,7 @@ namespace Hurricane {
} }
DBo::~DBo () throw(Error) DBo::~DBo ()
{ {
if (_idCount) --_idCount; if (_idCount) --_idCount;
else { else {

View File

@ -38,7 +38,7 @@ namespace Hurricane {
{ } { }
Entity::~Entity() throw(Error) Entity::~Entity()
{ } { }

View File

@ -38,7 +38,7 @@ Go::Go()
{ {
} }
Go::~Go() throw(Error) Go::~Go()
{ } { }
bool Go::autoMaterializationIsDisabled() bool Go::autoMaterializationIsDisabled()

View File

@ -196,8 +196,8 @@ Hook::Hook()
{ {
} }
Hook::~Hook() throw(Error) Hook::~Hook()
// *********************** // **********
{ {
if (_nextHook != this) if (_nextHook != this)
throw Error("Abnormal deletion of hook : always attached"); throw Error("Abnormal deletion of hook : always attached");

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// //
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2021, All Rights Reserved
// //
// This file is part of Hurricane. // This file is part of Hurricane.
// //
@ -29,13 +29,11 @@
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
#ifndef HURRICANE_DBO_H #pragma once
#define HURRICANE_DBO_H #include "hurricane/Error.h"
#include "hurricane/DBos.h"
#include "hurricane/Error.h" #include "hurricane/Name.h"
#include "hurricane/DBos.h" #include "hurricane/Properties.h"
#include "hurricane/Name.h"
#include "hurricane/Properties.h"
namespace Hurricane { namespace Hurricane {
@ -83,7 +81,7 @@ namespace Hurricane {
void toJsonSignature ( JsonWriter* ) const; void toJsonSignature ( JsonWriter* ) const;
protected: protected:
DBo (); DBo ();
virtual ~DBo () throw(Error); virtual ~DBo ();
virtual void _postCreate (); virtual void _postCreate ();
virtual void _preDestroy (); virtual void _preDestroy ();
private: private:
@ -136,5 +134,3 @@ namespace Hurricane {
} // Hurricane namespace. } // Hurricane namespace.
INSPECTOR_P_SUPPORT(Hurricane::DBo); INSPECTOR_P_SUPPORT(Hurricane::DBo);
#endif // HURRICANE_DBO_H

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>. // not, see <http://www.gnu.org/licenses/>.
// **************************************************************************************************** // ****************************************************************************************************
#ifndef HURRICANE_ENTITY #pragma once
#define HURRICANE_ENTITY
#include <functional> #include <functional>
#include "hurricane/DBo.h" #include "hurricane/DBo.h"
#include "hurricane/Entities.h" #include "hurricane/Entities.h"
@ -48,7 +46,7 @@ namespace Hurricane {
Quark* _getQuark ( SharedPath* sharedPath = NULL ) const; Quark* _getQuark ( SharedPath* sharedPath = NULL ) const;
protected: protected:
Entity (); Entity ();
virtual ~Entity () throw(Error); virtual ~Entity ();
virtual void _postCreate (); virtual void _postCreate ();
virtual void _preDestroy (); virtual void _preDestroy ();
}; };
@ -91,9 +89,6 @@ namespace Hurricane {
INSPECTOR_P_SUPPORT(Hurricane::Entity); INSPECTOR_P_SUPPORT(Hurricane::Entity);
#endif // HURRICANE_ENTITY
// **************************************************************************************************** // ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>. // not, see <http://www.gnu.org/licenses/>.
// **************************************************************************************************** // ****************************************************************************************************
#ifndef HURRICANE_GO #pragma once
#define HURRICANE_GO
#include "hurricane/Entity.h" #include "hurricane/Entity.h"
#include "hurricane/Gos.h" #include "hurricane/Gos.h"
#include "hurricane/Transformation.h" #include "hurricane/Transformation.h"
@ -56,7 +54,7 @@ class Go : public Entity {
// ************ // ************
protected: Go(); protected: Go();
protected: virtual ~Go() throw(Error); protected: virtual ~Go();
// Predicates // Predicates
// ********** // **********
@ -101,9 +99,6 @@ class Go : public Entity {
INSPECTOR_P_SUPPORT(Hurricane::Go); INSPECTOR_P_SUPPORT(Hurricane::Go);
#endif // HURRICANE_GO
// **************************************************************************************************** // ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>. // not, see <http://www.gnu.org/licenses/>.
// **************************************************************************************************** // ****************************************************************************************************
#ifndef HURRICANE_HOOK #pragma once
#define HURRICANE_HOOK
#include "hurricane/Error.h" #include "hurricane/Error.h"
#include "hurricane/Hooks.h" #include "hurricane/Hooks.h"
@ -54,7 +52,7 @@ class Hook {
// Destructor // Destructor
// ********** // **********
protected: virtual ~Hook() throw(Error); protected: virtual ~Hook();
// Operators // Operators
// ********* // *********
@ -115,9 +113,6 @@ class Hook {
INSPECTOR_P_SUPPORT(Hurricane::Hook); INSPECTOR_P_SUPPORT(Hurricane::Hook);
#endif // HURRICANE_HOOK
// **************************************************************************************************** // ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -1,7 +1,7 @@
// **************************************************************************************************** // ****************************************************************************************************
// File: ./hurricane/IntrusiveMap.h // File: ./hurricane/IntrusiveMap.h
// Authors: R. Escassut // Authors: R. Escassut
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2021, All Rights Reserved
// //
// This file is part of Hurricane. // This file is part of Hurricane.
// //
@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>. // not, see <http://www.gnu.org/licenses/>.
// **************************************************************************************************** // ****************************************************************************************************
#ifndef HURRICANE_INTRUSIVE_MAP #pragma once
#define HURRICANE_INTRUSIVE_MAP
#include <cstring> #include <cstring>
#include <algorithm> #include <algorithm>
@ -988,7 +986,6 @@ inline void jsonWrite ( JsonWriter* w, const std::string& key, Hurricane::Intru
for ( Element* element : intrusiveMap->getElements() ) jsonWrite( w, element ); for ( Element* element : intrusiveMap->getElements() ) jsonWrite( w, element );
w->endArray(); w->endArray();
} }
#endif // HURRICANE_INTRUSIVE_MAP
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>. // not, see <http://www.gnu.org/licenses/>.
// **************************************************************************************************** // ****************************************************************************************************
#ifndef HURRICANE_INTRUSIVE_SET #pragma once
#define HURRICANE_INTRUSIVE_SET
#include <cstring> #include <cstring>
#include <algorithm> #include <algorithm>
@ -497,9 +495,6 @@ inline Hurricane::Record* getRecord ( Hurricane::IntrusiveSet<Type>& intrusiveSe
{ return intrusiveSet._getRecord(); } { return intrusiveSet._getRecord(); }
#endif // HURRICANE_INTRUSIVE_SET
// **************************************************************************************************** // ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// **************************************************************************************************** // ****************************************************************************************************

View File

@ -14,9 +14,7 @@
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
#ifndef HURRICANE_OBSERVER_H #pragma once
#define HURRICANE_OBSERVER_H
#include <vector> #include <vector>
#include <array> #include <array>
#include "hurricane/Error.h" #include "hurricane/Error.h"
@ -168,5 +166,3 @@ namespace Hurricane {
} // Hurricane namespace. } // Hurricane namespace.
#endif

View File

@ -1,6 +1,6 @@
// -*- C++ -*- // -*- C++ -*-
// //
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved // Copyright (c) BULL S.A. 2000-2021, All Rights Reserved
// //
// This file is part of Hurricane. // This file is part of Hurricane.
// //
@ -29,13 +29,11 @@
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
#ifndef HURRICANE_PROPERTY_H #pragma once
#define HURRICANE_PROPERTY_H #include "hurricane/Name.h"
#include "hurricane/Properties.h"
#include "hurricane/Name.h" #include "hurricane/DBo.h"
#include "hurricane/Properties.h" #include "hurricane/Error.h"
#include "hurricane/DBo.h"
#include "hurricane/Error.h"
namespace Hurricane { namespace Hurricane {
@ -597,6 +595,3 @@ namespace Hurricane {
INSPECTOR_P_SUPPORT(Hurricane::Property); INSPECTOR_P_SUPPORT(Hurricane::Property);
#endif // HURRICANE_PROPERTY_H

View File

@ -34,23 +34,21 @@
//! author="Igor Markov 06/22/97 " //! author="Igor Markov 06/22/97 "
// freely inspired from abktimer from UCLApack .... just no windows. // freely inspired from abktimer from UCLApack .... just no windows.
#ifndef HURRICANE_TIMER_H #pragma once
#define HURRICANE_TIMER_H #include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <time.h>
#include <math.h>
#include <sys/types.h> #include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
#include <time.h>
#include <math.h>
#include <sys/resource.h>
#if defined(sun) #if defined(sun)
extern "C" int getrusage ( int who, struct rusage *rusage ); extern "C" int getrusage ( int who, struct rusage *rusage );
#elif defined(linux) #elif defined(linux)
#endif #endif
#include "hurricane/Error.h" #include "hurricane/Error.h"
#include "hurricane/Slot.h" #include "hurricane/Slot.h"
namespace Hurricane { namespace Hurricane {
@ -182,5 +180,3 @@ namespace Hurricane {
GETSTRING_VALUE_SUPPORT(Hurricane::Timer); GETSTRING_VALUE_SUPPORT(Hurricane::Timer);
IOSTREAM_VALUE_SUPPORT(Hurricane::Timer); IOSTREAM_VALUE_SUPPORT(Hurricane::Timer);
#endif // HURRICANE_TIMER_H

View File

@ -35,12 +35,12 @@ namespace Bookshelf {
class Exception : public std::exception { class Exception : public std::exception {
public: public:
Exception ( const std::string& ) throw(); Exception ( const std::string& );
Exception ( const char* format, ... ) throw(); Exception ( const char* format, ... );
Exception ( const Exception& ) throw(); Exception ( const Exception& );
virtual ~Exception () throw(); virtual ~Exception ();
public: public:
virtual const char* what () const throw (); virtual const char* what () const;
private: private:
static std::string _addHeader ( const char* ); static std::string _addHeader ( const char* );
private: private:

View File

@ -27,17 +27,17 @@ namespace DTR {
class DTRException { class DTRException {
public: public:
inline DTRException (const std::string& what) throw(); inline DTRException (const std::string& what);
inline virtual ~DTRException () throw(); inline virtual ~DTRException ();
inline virtual const char* what () const throw(); inline virtual const char* what () const;
private: private:
std::string _what; std::string _what;
}; };
inline DTRException::DTRException ( const std::string& what ) throw() : _what(what) {} inline DTRException::DTRException ( const std::string& what ) : _what(what) {}
inline DTRException::~DTRException () throw() {} inline DTRException::~DTRException () {}
inline const char* DTRException::what () const throw() { return _what.c_str(); } inline const char* DTRException::what () const { return _what.c_str(); }
} // DTR namespace. } // DTR namespace.

View File

@ -7,9 +7,9 @@
namespace SPICE { namespace SPICE {
class SpiceException { class SpiceException {
public: public:
SpiceException(const std::string& what) throw() : _what(what) {} SpiceException(const std::string& what) : _what(what) {}
virtual const char* what() const throw() { return _what.c_str(); } virtual const char* what() const { return _what.c_str(); }
virtual ~SpiceException() throw() {} virtual ~SpiceException() {}
private: private:
std::string _what; std::string _what;