Skip to content
Open
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
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
22 changes: 22 additions & 0 deletions TopoMender/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 2 additions & 1 deletion TopoMender/HashMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion TopoMender/MemoryManager.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "StdAfx.h"
#include ".\memorymanager.h"
#using <mscorlib.dll>

CMemoryManager::CMemoryManager(void)
{
Expand Down
12 changes: 8 additions & 4 deletions TopoMender/OcTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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++)
Expand Down
5 changes: 3 additions & 2 deletions TopoMender/SingleHashMap.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "StdAfx.h"
#include ".\singlehashmap.h"
#using <mscorlib.dll>
//#using <mscorlib.dll>

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;
}
Expand Down
21 changes: 0 additions & 21 deletions TopoMender/TopoMender.sln

This file was deleted.

Binary file removed TopoMender/TopoMender.suo
Binary file not shown.
247 changes: 0 additions & 247 deletions TopoMender/TopoMender.vcproj

This file was deleted.

2 changes: 1 addition & 1 deletion TopoMender/Vector3D.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "StdAfx.h"
#include ".\Vector3D.h"
#using <mscorlib.dll>
//#using <mscorlib.dll>

CVector3D& CVector3D::operator=(const CVector3D& v)
{
Expand Down
13 changes: 13 additions & 0 deletions TopoMender_MendIT/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Loading