Updated refcount.cpp to a newer coding convention.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-07-22 21:25:36 +02:00
parent 3907e14cb8
commit 8c5ab54c9b
2 changed files with 41 additions and 40 deletions

View File

@ -1,6 +1,6 @@
/*******************************************************************************
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012.
Copyright(C) Jonas 'Sortie' Termansen 2012.
This file is part of Sortix.
@ -25,8 +25,8 @@
#ifndef SORTIX_REFCOUNT_H
#define SORTIX_REFCOUNT_H
namespace Sortix
{
namespace Sortix {
class Refcounted
{
public:
@ -42,7 +42,7 @@ namespace Sortix
size_t refcount;
};
}
} // namespace Sortix
#endif

View File

@ -1,6 +1,6 @@
/*******************************************************************************
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012.
Copyright(C) Jonas 'Sortie' Termansen 2012.
This file is part of Sortix.
@ -23,10 +23,10 @@
*******************************************************************************/
#include <sortix/kernel/platform.h>
#include "refcount.h"
#include <sortix/kernel/refcount.h>
namespace Sortix {
namespace Sortix
{
Refcounted::Refcounted()
{
refcount = 1;
@ -46,7 +46,8 @@ namespace Sortix
void Refcounted::Unref()
{
if ( !--refcount ) { delete this; }
}
if ( !--refcount )
delete this;
}
} // namespace Sortix