- Give code a round of indentation. Thank astyle, not me.

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@837 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-09 14:38:45 +00:00
parent aaf8e068d3
commit d3c7b46853
108 changed files with 3196 additions and 3180 deletions

View file

@ -27,11 +27,11 @@
namespace memory
{
template<typename T>
struct deletor : public std::unary_function<void, T*>
{
inline void operator()(T* o) { delete o; }
};
template<typename T>
struct deletor : public std::unary_function<void, T*>
{
inline void operator()(T* o) { delete o; }
};
} //~ namespace memory

View file

@ -44,7 +44,7 @@ namespace sgpem
* \return The instantiated object
*/
static Instantiated_class& get_instance();
protected:
static Glib::RecMutex SG_DLLLOCAL _mutex;

View file

@ -34,8 +34,8 @@ template<typename Instantiated_class>
Instantiated_class&
sgpem::Singleton<Instantiated_class>::get_instance()
{
Glib::RecMutex::Lock lock(_mutex);
if(_instance == NULL)
Glib::RecMutex::Lock lock (_mutex);
if (_instance == NULL)
_instance = new Instantiated_class();
return *_instance;
}

View file

@ -47,9 +47,9 @@ namespace memory
template<typename T, bool isArray>
smart_ptr<T, isArray>::~smart_ptr() throw()
{
if(--(_contents->rc) == 0)
if (--(_contents->rc) == 0)
{
if(_contents->ptr != 0)
if (_contents->ptr != 0)
!isArray ? delete _contents->ptr : delete [] _contents->ptr;
delete _contents;
}
@ -61,11 +61,11 @@ namespace memory
smart_ptr<T, isArray>&
smart_ptr<T, isArray>::operator=(const smart_ptr& sptr) throw()
{
if(this != &sptr && _contents != sptr._contents)
if (this != &sptr && _contents != sptr._contents)
{
if(--(_contents->rc) == 0)
if (--(_contents->rc) == 0)
{
if(_contents->ptr != 0)
if (_contents->ptr != 0)
!isArray ? delete _contents->ptr : delete [] _contents->ptr;
delete _contents;
}
@ -165,11 +165,11 @@ namespace memory
smart_ptr<T, isArray>::smart_ptr(const smart_ptr<U, isArray>& sptr)
throw(std::bad_cast)
{
if(!sptr._contents->ptr || dynamic_cast<T*>(sptr._contents->ptr) == 0)
if (!sptr._contents->ptr || dynamic_cast<T*>(sptr._contents->ptr) == 0)
throw std::bad_cast();
// I know, I know... this is Evil(TM):
_contents = reinterpret_cast<typename smart_ptr<T, isArray>::contents_type*>(sptr._contents);
_contents = reinterpret_cast<typename smart_ptr<T, isArray>::contents_type* > (sptr._contents);
(_contents->rc)++;
}