Skip to content

Refactoring: Renaming namespace #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/Memory/MemUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----------------------------------------------------------------------------------------------*/
#include <cppcore/Memory/MemUtils.h>

namespace CPPCore {
namespace cppcore {

void MemUtils::clearMemory( void *buffer, size_t size ) {
::memset( buffer, 0, size );
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions code/Random/RandomGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <time.h>
#include <cassert>

namespace CPPCore {
namespace cppcore {

static const unsigned int N = 624;
static const unsigned int M = 397;
Expand Down Expand Up @@ -98,4 +98,4 @@ int RandomGenerator::get( int lower, int upper ) {
return ret;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/CPPCoreCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <stdarg.h>

namespace CPPCore {
namespace cppcore {

#if defined( _WIN32 ) || defined( _WIN64 )
# define CPPCORE_WINDOWS
Expand Down Expand Up @@ -103,4 +103,4 @@ public: \
//-------------------------------------------------------------------------------------------------
#define CPPCORE_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Common/Hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <cppcore/CPPCoreCommon.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class Hash
Expand Down Expand Up @@ -122,4 +122,4 @@ inline unsigned int Hash::hashValue() const {
return m_hash;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Common/TBitField.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/CPPCoreCommon.h>
#include <cassert>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TBitField
Expand Down Expand Up @@ -135,4 +135,4 @@ inline size_t TBitField<T>::maxBits() const {
return numBits;
}

} // namespace CPPCore
} // namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Common/TOptional.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <cppcore/CPPCoreCommon.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TOptional
Expand Down Expand Up @@ -101,4 +101,4 @@ inline T &TOptional<T>::operator = (const T &value) {
return *this;
}

}
} // namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Common/TSharedPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <cppcore/CPPCoreCommon.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TSharedPtr
Expand Down Expand Up @@ -160,4 +160,4 @@ inline bool TSharedPtr<T>::operator!=(const TSharedPtr<T> &rhs) const {
return !(*this == rhs);
}

} // Namespace CPPCore
} // Namespace cppcore
3 changes: 1 addition & 2 deletions include/cppcore/Common/TStringBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/CPPCoreCommon.h>
#include <malloc.h>

namespace CPPCore {
namespace cppcore {

template <class T>
struct Allocator {
Expand Down Expand Up @@ -189,4 +189,3 @@ template <class TCharType>
inline TCharType *TStringView<TCharType>::data() const {
}

} // Namespace CPPCore
4 changes: 2 additions & 2 deletions include/cppcore/Common/Variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cassert>
#include <string>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class Variant
Expand Down Expand Up @@ -530,4 +530,4 @@ inline void Variant::reserve(Type type, size_t size) {
m_Type = type;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Container/TArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/CPPCoreCommon.h>
#include <cppcore/Memory/TDefaultAllocator.h>

namespace CPPCore {
namespace cppcore {
namespace Details {

inline static size_t getGrowing(size_t size) {
Expand Down Expand Up @@ -532,4 +532,4 @@ inline bool TArray<T, TAlloc>::operator == (const TArray<T, TAlloc> &rhs) const
return true;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Container/THashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/Common/Hash.h>
#include <cppcore/Memory/TDefaultAllocator.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class THashMap
Expand Down Expand Up @@ -360,4 +360,4 @@ inline void THashMap<T, U, TAlloc>::Node::releaseList() {
}
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Container/TList.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/CPPCoreCommon.h>
#include <cppcore/Memory/TDefaultAllocator.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TList
Expand Down Expand Up @@ -474,4 +474,4 @@ inline T &TList<T, TAlloc>::Iterator::operator*() const {
return m_pNode->m_Item;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Container/TQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/Container/TList.h>
#include <cppcore/Memory/TDefaultAllocator.h>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TQueue
Expand Down Expand Up @@ -150,4 +150,4 @@ inline bool TQueue<T, TAlloc>::operator == ( const TQueue<T, TAlloc> &rhs ) cons
return m_QueueData == rhs.m_QueueData;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Container/TStaticArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string.h>
#include <cassert>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TArray
Expand Down Expand Up @@ -153,4 +153,4 @@ inline TStaticArray<T, len> &TStaticArray<T, len>::operator=(const TStaticArray<
return *this;
}

} // namespace CPPCore
} // namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/IO/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sys/statvfs.h>
#endif

namespace CPPCore {
namespace cppcore {

/// @brief The file-system space info.
struct FSSpace {
Expand Down Expand Up @@ -99,4 +99,4 @@ inline FSSpace *FileSystem::getFreeDiskSpace() {
return &m_fsSpace;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Memory/MemUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <string.h>
#include <cinttypes>

namespace CPPCore {
namespace cppcore {

#define ALIGN_MASK(value, mask) (((value) + (mask)) & ((~0) & (~(mask))))

Expand Down Expand Up @@ -78,4 +78,4 @@ inline const void *MemUtils::alignPtr(void *ptr, size_t extra, size_t align) {
return unaligned.mPtr;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Memory/TDefaultAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <string>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TDefaultAllocator
Expand Down Expand Up @@ -129,4 +129,4 @@ inline void TDefaultAllocator<T>::dumpAllocations(std::string &allocs) {
// empty
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Memory/TPoolAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <string>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TPoolAllocator
Expand Down Expand Up @@ -283,4 +283,4 @@ void TPoolAllocator<T>::reset() {
m_current = m_first;
}

} // Namespace CPPCore
} // Namespace cppcore
4 changes: 2 additions & 2 deletions include/cppcore/Memory/TStackAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <string>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class TStackAllocator
Expand Down Expand Up @@ -214,4 +214,4 @@ inline void TStackAllocator<T>::dumpAllocations(std::string &allocs) {
allocs += "\n";
}

} // Namespace CPPCore
} // Namespace cppcorecppcore
4 changes: 2 additions & 2 deletions include/cppcore/Random/RandomGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <memory>

namespace CPPCore {
namespace cppcore {

//-------------------------------------------------------------------------------------------------
/// @class RandomGenerator
Expand Down Expand Up @@ -63,4 +63,4 @@ class DLL_CPPCORE_EXPORT RandomGenerator {
GeneratorType m_type;
};

} // Namespace CPPCore
} // Namespace cppcore
2 changes: 1 addition & 1 deletion test/CPPCoreCommonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "gtest/gtest.h"

using namespace CPPCore;
using namespace cppcore;

//---------------------------------------------------------------------------------------------
class CPPCoreCommonTest : public testing::Test {
Expand Down
2 changes: 1 addition & 1 deletion test/Random/RandomGeneratorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <cppcore/Random/RandomGenerator.h>
#include <gtest/gtest.h>

using namespace CPPCore;
using namespace cppcore;

class RandomGeneratorTest : public testing::Test {
// empty
Expand Down
2 changes: 1 addition & 1 deletion test/common/HashTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "gtest/gtest.h"

using namespace CPPCore;
using namespace cppcore;

class HashTest : public testing::Test {
protected:
Expand Down
2 changes: 1 addition & 1 deletion test/common/TBitFieldTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "gtest/gtest.h"

using namespace CPPCore;
using namespace cppcore;

class TBitFieldTest : public testing::Test {
// empty
Expand Down
2 changes: 1 addition & 1 deletion test/common/TOptionalTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <gtest/gtest.h>
#include <cppcore/Common/TOptional.h>

using namespace ::CPPCore;
using namespace ::cppcore;

class TOptionalTest : public ::testing::Test {
// empty
Expand Down
2 changes: 1 addition & 1 deletion test/common/TSharedPtrTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <cppcore/Common/TSharedPtr.h>

using namespace ::CPPCore;
using namespace ::cppcore;

class TSharedPtrTest : public ::testing::Test {
// empty
Expand Down
2 changes: 1 addition & 1 deletion test/common/VariantTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include <cppcore/Common/Variant.h>

using namespace CPPCore;
using namespace cppcore;

//-------------------------------------------------------------------------------------------------
/// @class ::VariantTest
Expand Down
2 changes: 1 addition & 1 deletion test/container/TArrayTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sstream>
#include <iostream>

using namespace CPPCore;
using namespace cppcore;

// Some test-data
static const size_t ArraySize = 4;
Expand Down
2 changes: 1 addition & 1 deletion test/container/THashMapTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "gtest/gtest.h"

using namespace ::CPPCore;
using namespace ::cppcore;

class THashMapTest : public ::testing::Test {
// empty
Expand Down
2 changes: 1 addition & 1 deletion test/container/TListTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <iostream>
#include <vector>

using namespace CPPCore;
using namespace cppcore;

//-------------------------------------------------------------------------------------------------
/// @class TListTest
Expand Down
2 changes: 1 addition & 1 deletion test/container/TQueueTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "gtest/gtest.h"

using namespace CPPCore;
using namespace cppcore;

class TQueueTest : public testing::Test {
// empty
Expand Down
Loading