fixing vavaas mental issues
This commit is contained in:
@@ -29,7 +29,7 @@ namespace irc
|
||||
|
||||
inline void closeMainSocket()
|
||||
{
|
||||
if (_main_socket > NULL_SOCKET)
|
||||
if(_main_socket > NULL_SOCKET)
|
||||
close(_main_socket);
|
||||
_main_socket = NULL_SOCKET;
|
||||
_active = false;
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace unstd
|
||||
TArray() {}
|
||||
TArray(const TArray<T, N>& rhs)
|
||||
{
|
||||
for (std::size_t i = 0; i < N; i++)
|
||||
for(std::size_t i = 0; i < N; i++)
|
||||
_data[i] = rhs._data[i];
|
||||
}
|
||||
|
||||
inline TArray& operator=(const TArray<T, N>& rhs)
|
||||
{
|
||||
for (std::size_t i = 0; i < N; i++)
|
||||
for(std::size_t i = 0; i < N; i++)
|
||||
_data[i] = rhs._data[i];
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace unstd
|
||||
template <typename T>
|
||||
SharedPtr<T>::SharedPtr(const SharedPtr<T>& rhs) : _ptr(rhs._ptr), _ref(rhs._ref)
|
||||
{
|
||||
if (_ptr && _ref)
|
||||
if(_ptr && _ref)
|
||||
++_ref->shared;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
SharedPtr<T>& SharedPtr<T>::operator=(const SharedPtr<T>& rhs)
|
||||
{
|
||||
if (_ptr == rhs._ptr)
|
||||
if(_ptr == rhs._ptr)
|
||||
return *this;
|
||||
|
||||
safeRelease();
|
||||
@@ -96,10 +96,10 @@ namespace unstd
|
||||
template <typename T>
|
||||
void SharedPtr<T>::safeRelease()
|
||||
{
|
||||
if (_ref == NULL)
|
||||
return ;
|
||||
if(_ref == NULL)
|
||||
return;
|
||||
_ref->shared--;
|
||||
if (_ref->shared <= 0)
|
||||
if(_ref->shared <= 0)
|
||||
{
|
||||
delete _ptr;
|
||||
_ptr = NULL;
|
||||
|
||||
Reference in New Issue
Block a user