diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6590579 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,10 @@ +set(ProjectName "TopoMender") +project(${ProjectName}) +cmake_minimum_required(VERSION 2.9) +set(CMAKE_DEBUG_POSTFIX "d") + +set(NAME_TOPOMENDER "TopoMender") +set(NAME_MENDIT "TopoMender_MendIT") + +add_subdirectory(TopoMender) +add_subdirectory(TopoMender_MendIT) diff --git a/TopoMender/CMakeLists.txt b/TopoMender/CMakeLists.txt new file mode 100644 index 0000000..8d6069e --- /dev/null +++ b/TopoMender/CMakeLists.txt @@ -0,0 +1,22 @@ + +file(GLOB_RECURSE HEADER_FILES "*.h" "*.hpp") +file(GLOB_RECURSE SOURCE_FILES "*.cpp") + +source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${HEADER_FILES} ${SOURCE_FILES}) +add_executable(${NAME_TOPOMENDER} ${HEADER_FILES} ${SOURCE_FILES}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(${NAME_TOPOMENDER} PUBLIC +${CURRENT_SRC} +${CURRENT_INCLUDE} +) + +ADD_DEFINITIONS(-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS) +ADD_DEFINITIONS(-D_AFXDLL) + +set_property(SOURCE AssemblyInfo.cpp APPEND PROPERTY COMPILE_FLAGS "/clr /EHa") +set_property(SOURCE OcTree.cpp APPEND PROPERTY COMPILE_FLAGS "/clr /EHa") + +if(CMAKE_CXX_FLAGS_DEBUG MATCHES "/RTC1") + string(REPLACE "/RTC1" " " CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + message("CMAKE_CXX_FLAGS_DEBUG:${CMAKE_CXX_FLAGS_DEBUG}") +endif() \ No newline at end of file diff --git a/TopoMender/HashMap.cpp b/TopoMender/HashMap.cpp index a885ad9..02943bb 100644 --- a/TopoMender/HashMap.cpp +++ b/TopoMender/HashMap.cpp @@ -4,7 +4,8 @@ CHashMap::CHashMap(CConstant * pConstant, int nSize) { m_pConstant = pConstant; - for (int i = 0; i < 40; i++) { + int i = 0; + for (; i < 40; i++) { if (nSize * 2 < pConstant->m_pHashSize[i]) break; } diff --git a/TopoMender/MemoryManager.cpp b/TopoMender/MemoryManager.cpp index 3952f20..6b9432c 100644 --- a/TopoMender/MemoryManager.cpp +++ b/TopoMender/MemoryManager.cpp @@ -1,6 +1,5 @@ #include "StdAfx.h" #include ".\memorymanager.h" -#using CMemoryManager::CMemoryManager(void) { diff --git a/TopoMender/OcTree.cpp b/TopoMender/OcTree.cpp index 361187b..0fa70a9 100644 --- a/TopoMender/OcTree.cpp +++ b/TopoMender/OcTree.cpp @@ -835,7 +835,8 @@ void COcTree::RecTraversalPoint(UCHAR * pNode[2][2][2], UINT64 n64Position[2][2] m_nVertexNum ++; } else { int iIndex = i * 4 + j * 2 + k; - for (int l = 0; l < iIndex; l++) + int l = 0; + for (; l < iIndex; l++) if (n64Position[i][j][k] == n64Position[(l >> 2) & 1][(l >> 1) & 1][l & 1]) break; if (l == iIndex) { @@ -866,7 +867,8 @@ void COcTree::RecTraversalPoint(UCHAR * pNode[2][2][2], UINT64 n64Position[2][2] bWrite = true; } else { int iIndex = i * 4 + j * 2 + k; - for (int l = 0; l < iIndex; l++) + int l = 0; + for (; l < iIndex; l++) if (n64Position[i][j][k] == n64Position[(l >> 2) & 1][(l >> 1) & 1][l & 1]) break; if (l == iIndex) { @@ -2780,7 +2782,8 @@ bool COcTree::RecDualThinFace(UCHAR * pNode[2], UINT64 n64Position[2], int nLeve } } } else { - for (int i = 0; i < 2; i++) + int i = 0; + for (; i < 2; i++) if (GET_CELL_SIMPLE(((LEAF_NODE *)pNode[i])->m_n64SimpleTag, 0) == 2) break; if (i < 2) { @@ -3103,7 +3106,8 @@ bool COcTree::RecDualThinPoint(UCHAR * pNode[2][2][2], UINT64 n64Position[2][2][ } } } else { - for (int i = 0; i < 2; i++) + int i = 0; + for (; i < 2; i++) { for (int j = 0; j < 2; j++) for (int k = 0; k < 2; k++) diff --git a/TopoMender/SingleHashMap.cpp b/TopoMender/SingleHashMap.cpp index bb11169..5ccff1a 100644 --- a/TopoMender/SingleHashMap.cpp +++ b/TopoMender/SingleHashMap.cpp @@ -1,11 +1,12 @@ #include "StdAfx.h" #include ".\singlehashmap.h" -#using +//#using CSingleHashMap::CSingleHashMap(CConstant * pConstant, int nSize) { m_pConstant = pConstant; - for (int i = 0; i < 40; i++) { + int i = 0; + for (; i < 40; i++) { if (nSize * 2 < pConstant->m_pHashSize[i]) break; } diff --git a/TopoMender/TopoMender.sln b/TopoMender/TopoMender.sln deleted file mode 100644 index fdc891b..0000000 --- a/TopoMender/TopoMender.sln +++ /dev/null @@ -1,21 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TopoMender", "TopoMender.vcproj", "{82AA905A-8A94-4CE2-BE6D-1F425B00E518}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {82AA905A-8A94-4CE2-BE6D-1F425B00E518}.Debug.ActiveCfg = Debug|Win32 - {82AA905A-8A94-4CE2-BE6D-1F425B00E518}.Debug.Build.0 = Debug|Win32 - {82AA905A-8A94-4CE2-BE6D-1F425B00E518}.Release.ActiveCfg = Release|Win32 - {82AA905A-8A94-4CE2-BE6D-1F425B00E518}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/TopoMender/TopoMender.suo b/TopoMender/TopoMender.suo deleted file mode 100644 index c1d7061..0000000 Binary files a/TopoMender/TopoMender.suo and /dev/null differ diff --git a/TopoMender/TopoMender.vcproj b/TopoMender/TopoMender.vcproj deleted file mode 100644 index ef65514..0000000 --- a/TopoMender/TopoMender.vcproj +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/TopoMender/Vector3D.cpp b/TopoMender/Vector3D.cpp index e45c773..f9047f7 100644 --- a/TopoMender/Vector3D.cpp +++ b/TopoMender/Vector3D.cpp @@ -1,6 +1,6 @@ #include "StdAfx.h" #include ".\Vector3D.h" -#using +//#using CVector3D& CVector3D::operator=(const CVector3D& v) { diff --git a/TopoMender_MendIT/CMakeLists.txt b/TopoMender_MendIT/CMakeLists.txt new file mode 100644 index 0000000..7f6ca01 --- /dev/null +++ b/TopoMender_MendIT/CMakeLists.txt @@ -0,0 +1,13 @@ + + +file(GLOB_RECURSE HEADER_FILES "*.h" "*.hpp") +file(GLOB_RECURSE SOURCE_FILES "*.cpp") + +source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${HEADER_FILES} ${SOURCE_FILES}) +add_executable(${NAME_MENDIT} ${HEADER_FILES} ${SOURCE_FILES}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(${NAME_MENDIT} PUBLIC +${CURRENT_SRC} +${CURRENT_INCLUDE} +) +ADD_DEFINITIONS(-D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS) diff --git a/TopoMender_MendIT/Topomender.sln b/TopoMender_MendIT/Topomender.sln deleted file mode 100755 index 16079d7..0000000 --- a/TopoMender_MendIT/Topomender.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Topomender", "Topomender.vcproj", "{2654DC75-1C0E-4E36-97C5-B155106EB06A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2654DC75-1C0E-4E36-97C5-B155106EB06A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2654DC75-1C0E-4E36-97C5-B155106EB06A}.Debug|Win32.Build.0 = Debug|Win32 - {2654DC75-1C0E-4E36-97C5-B155106EB06A}.Release|Win32.ActiveCfg = Release|Win32 - {2654DC75-1C0E-4E36-97C5-B155106EB06A}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/TopoMender_MendIT/Topomender.suo b/TopoMender_MendIT/Topomender.suo deleted file mode 100755 index 3bfcc59..0000000 Binary files a/TopoMender_MendIT/Topomender.suo and /dev/null differ diff --git a/TopoMender_MendIT/Topomender.vcproj b/TopoMender_MendIT/Topomender.vcproj deleted file mode 100755 index 4e824f5..0000000 --- a/TopoMender_MendIT/Topomender.vcproj +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -