fixing vavaas mental issues

This commit is contained in:
Kbz-8
2024-02-06 12:38:49 +01:00
parent 160c02fc75
commit 393c73b078
12 changed files with 324 additions and 324 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;