mirror of https://github.com/axmolengine/axmol.git
Tidy robin-map
This commit is contained in:
parent
d4e20643ab
commit
f8ff6a8481
|
@ -179,6 +179,7 @@ add_subdirectory(${ADXE_ROOT_PATH}/extensions ${ENGINE_BINARY_PATH}/extensions)
|
||||||
|
|
||||||
if(MSVC_IDE)
|
if(MSVC_IDE)
|
||||||
target_sources(${ADXE_CORE_LIB} PRIVATE ../thirdparty/yasio/yasio.natvis)
|
target_sources(${ADXE_CORE_LIB} PRIVATE ../thirdparty/yasio/yasio.natvis)
|
||||||
|
target_sources(${ADXE_CORE_LIB} PRIVATE ../thirdparty/robin-map/tsl-robin-map.natvis)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# copy all thirdparty libraries to ${CMAKE_BINARY_DIR}/lib/$<CONFIG>
|
# copy all thirdparty libraries to ${CMAKE_BINARY_DIR}/lib/$<CONFIG>
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct equal_to
|
||||||
return static_cast<_Ty1&&>(_Left) == static_cast<_Ty2&&>(_Right);
|
return static_cast<_Ty1&&>(_Left) == static_cast<_Ty2&&>(_Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
using is_transparent = int;
|
using is_transparent = void;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename _Valty>
|
template <typename _Valty>
|
||||||
|
|
|
@ -304,6 +304,7 @@ if(BUILD_DEP_LLHTTP)
|
||||||
target_link_libraries(thirdparty llhttp)
|
target_link_libraries(thirdparty llhttp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# yaml
|
||||||
if(BUILD_DEP_YAML_CPP)
|
if(BUILD_DEP_YAML_CPP)
|
||||||
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
|
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "" FORCE)
|
||||||
|
@ -316,6 +317,7 @@ if(BUILD_DEP_YAML_CPP)
|
||||||
# target_link_libraries(thirdparty yaml-cpp)
|
# target_link_libraries(thirdparty yaml-cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# kcp
|
||||||
if(BUILD_DEP_KCP)
|
if(BUILD_DEP_KCP)
|
||||||
add_subdirectory(kcp)
|
add_subdirectory(kcp)
|
||||||
configure_target_outdir(kcp)
|
configure_target_outdir(kcp)
|
||||||
|
@ -323,6 +325,7 @@ if(BUILD_DEP_KCP)
|
||||||
target_compile_definitions(thirdparty PUBLIC YASIO_HAVE_KCP=1)
|
target_compile_definitions(thirdparty PUBLIC YASIO_HAVE_KCP=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# fmt-lib
|
||||||
add_subdirectory(fmt)
|
add_subdirectory(fmt)
|
||||||
target_link_libraries(thirdparty fmt-header-only)
|
target_link_libraries(thirdparty fmt-header-only)
|
||||||
configure_target_outdir(fmt)
|
configure_target_outdir(fmt)
|
||||||
|
@ -330,6 +333,9 @@ configure_target_outdir(fmt)
|
||||||
# put "thirdparty" into thirdparty folder, too
|
# put "thirdparty" into thirdparty folder, too
|
||||||
configure_target_outdir(thirdparty)
|
configure_target_outdir(thirdparty)
|
||||||
|
|
||||||
|
# robin-map
|
||||||
|
target_include_directories(thirdparty PUBLIC "robin-map/include")
|
||||||
|
|
||||||
if(MACOSX OR IOS)
|
if(MACOSX OR IOS)
|
||||||
add_subdirectory(glsl-optimizer)
|
add_subdirectory(glsl-optimizer)
|
||||||
target_link_libraries(thirdparty
|
target_link_libraries(thirdparty
|
||||||
|
|
|
@ -181,6 +181,13 @@
|
||||||
- Version: git 65b314a (747) with dtCrowd::getEditableAgentAnim
|
- Version: git 65b314a (747) with dtCrowd::getEditableAgentAnim
|
||||||
- License: zlib
|
- License: zlib
|
||||||
|
|
||||||
|
## robin-map
|
||||||
|
- Upstream: https://github.com/Tessil/robin-map
|
||||||
|
- Version: git 0.6.3-84c1bee (101) with modified for more compatible with stl
|
||||||
|
- Modify `robin_map::iterator->second` to mutable same with `stl map/unordered_map`
|
||||||
|
- Modify `robin_map::operator[]` key forward by `std::forward` same with `stl map/unordered_map`
|
||||||
|
- License: MIT
|
||||||
|
|
||||||
## stb (stb_image)
|
## stb (stb_image)
|
||||||
- Upstream: https://github.com/nothings/stb
|
- Upstream: https://github.com/nothings/stb
|
||||||
- Version: 2.27
|
- Version: 2.27
|
||||||
|
@ -191,11 +198,6 @@
|
||||||
- Version: git 1.2.4-ec6bff2 (168)
|
- Version: git 1.2.4-ec6bff2 (168)
|
||||||
- License: BSD-2-Clause
|
- License: BSD-2-Clause
|
||||||
|
|
||||||
## tsl (robin-map)
|
|
||||||
- Upstream: https://github.com/Tessil/robin-map
|
|
||||||
- Version: git 0.6.3-84c1bee (100)
|
|
||||||
- License: MIT
|
|
||||||
|
|
||||||
## unzip (minizip-1.2)
|
## unzip (minizip-1.2)
|
||||||
- Upstream: https://github.com/simdsoft/mz12
|
- Upstream: https://github.com/simdsoft/mz12
|
||||||
- Version: 1.2 with bugfixs & improvements
|
- Version: 1.2 with bugfixs & improvements
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||||
|
<!-- Written in VC 2017 15.7 but is expected to be compatible with VC 2015 -->
|
||||||
|
|
||||||
|
<!-- Visualization that shows the index in the name column and the key-value pair in the value column -->
|
||||||
|
<Type Name="tsl::robin_map<*>" Priority="Medium">
|
||||||
|
<AlternativeType Name="tsl::robin_set<*>"/>
|
||||||
|
<DisplayString>{{ size={m_ht.m_nb_elements} }}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<Item Name="[bucket_count]" IncludeView="detailed">m_ht.m_buckets_data._Mypair._Myval2._Mylast - m_ht.m_buckets_data._Mypair._Myval2._Myfirst</Item>
|
||||||
|
<Item Name="[load_factor]" Condition="m_ht.m_buckets_data._Mypair._Myval2._Myfirst != m_ht.m_buckets_data._Mypair._Myval2._Mylast" IncludeView="detailed">
|
||||||
|
((float)m_ht.m_nb_elements) / ((float)(m_ht.m_buckets_data._Mypair._Myval2._Mylast - m_ht.m_buckets_data._Mypair._Myval2._Myfirst))
|
||||||
|
</Item>
|
||||||
|
<Item Name="[load_factor]" Condition="m_ht.m_buckets_data._Mypair._Myval2._Myfirst == m_ht.m_buckets_data._Mypair._Myval2._Mylast" IncludeView="detailed">
|
||||||
|
0
|
||||||
|
</Item>
|
||||||
|
<Item Name="[max_load_factor]" IncludeView="detailed">m_ht.m_max_load_factor</Item>
|
||||||
|
<CustomListItems>
|
||||||
|
<Variable Name="bucket" InitialValue="m_ht.m_buckets"/>
|
||||||
|
|
||||||
|
<Size>m_ht.m_nb_elements</Size>
|
||||||
|
<Loop>
|
||||||
|
<Item Condition="bucket->m_dist_from_ideal_bucket != -1">*bucket</Item>
|
||||||
|
<Break Condition="bucket->m_last_bucket"/>
|
||||||
|
<Exec>++bucket</Exec>
|
||||||
|
</Loop>
|
||||||
|
</CustomListItems>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
|
|
||||||
|
<!-- Visualization that shows the key in the name column and the key-value pair in the value column -->
|
||||||
|
<Type Name="tsl::robin_map<*>" ExcludeView="ShowElementsByIndex" Priority="MediumHigh">
|
||||||
|
<DisplayString>{{ size={m_ht.m_nb_elements} }}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<Item Name="[bucket_count]" IncludeView="detailed">m_ht.m_buckets_data._Mypair._Myval2._Mylast - m_ht.m_buckets_data._Mypair._Myval2._Myfirst</Item>
|
||||||
|
<Item Name="[load_factor]" Condition="m_ht.m_buckets_data._Mypair._Myval2._Myfirst != m_ht.m_buckets_data._Mypair._Myval2._Mylast" IncludeView="detailed">
|
||||||
|
((float)m_ht.m_nb_elements) / ((float)(m_ht.m_buckets_data._Mypair._Myval2._Mylast - m_ht.m_buckets_data._Mypair._Myval2._Myfirst))
|
||||||
|
</Item>
|
||||||
|
<Item Name="[load_factor]" Condition="m_ht.m_buckets_data._Mypair._Myval2._Myfirst == m_ht.m_buckets_data._Mypair._Myval2._Mylast" IncludeView="detailed">
|
||||||
|
0
|
||||||
|
</Item>
|
||||||
|
<Item Name="[max_load_factor]" IncludeView="detailed">m_ht.m_max_load_factor</Item>
|
||||||
|
<CustomListItems>
|
||||||
|
<Variable Name="bucket" InitialValue="m_ht.m_buckets"/>
|
||||||
|
|
||||||
|
<Size>m_ht.m_nb_elements</Size>
|
||||||
|
<Loop>
|
||||||
|
<Item Condition="bucket->m_dist_from_ideal_bucket != -1" Name="[{reinterpret_cast<std::pair<$T1,$T2>*>(&bucket->m_value)->first}]">*bucket</Item>
|
||||||
|
<Break Condition="bucket->m_last_bucket"/>
|
||||||
|
<Exec>++bucket</Exec>
|
||||||
|
</Loop>
|
||||||
|
</CustomListItems>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
|
|
||||||
|
<Type Name="tsl::detail_robin_hash::robin_hash<*>::robin_iterator<*>">
|
||||||
|
<DisplayString>{*m_bucket}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<ExpandedItem>*m_bucket</ExpandedItem>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
|
|
||||||
|
<Type Name="tsl::detail_robin_hash::bucket_entry<*>">
|
||||||
|
<DisplayString Condition="m_dist_from_ideal_bucket == -1">empty</DisplayString>
|
||||||
|
<DisplayString Condition="m_dist_from_ideal_bucket != -1">{*reinterpret_cast<$T1*>(&m_value)}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<ExpandedItem Condition="m_dist_from_ideal_bucket != -1">*reinterpret_cast<$T1*>(&m_value)</ExpandedItem>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
|
|
||||||
|
<Type Name="tsl::detail_robin_hash::bucket_entry<*>" IncludeView="MapHelper">
|
||||||
|
<DisplayString Condition="m_dist_from_ideal_bucket == -1">empty</DisplayString>
|
||||||
|
<DisplayString Condition="m_dist_from_ideal_bucket != -1">{reinterpret_cast<$T1*>(&m_value)->second}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<ExpandedItem Condition="m_dist_from_ideal_bucket != -1">*reinterpret_cast<$T1*>(&m_value)</ExpandedItem>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
|
</AutoVisualizer>
|
Loading…
Reference in New Issue