Skip to content
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

fix get_const_attribute_container & std=c++11 pb #13

Merged
merged 1 commit into from
May 18, 2016
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
3 changes: 3 additions & 0 deletions schnapps/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ qt5_add_resources(RCC_FILES

add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${RCC_FILES})

if(NOT MSVC)
target_compile_options(${PROJECT_NAME} PUBLIC "-std=c++11")
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_d")

target_include_directories(${PROJECT_NAME} PUBLIC
Expand Down
10 changes: 5 additions & 5 deletions schnapps/core/control_dock_map_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void ControlDock_MapTab::update_selected_map_info()
// }
if (map2->is_embedded<CMap2::CDart::ORBIT>())
{
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::CDart::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::CDart::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();
for (std::size_t i = 0u; i < names.size(); ++i)
Expand All @@ -440,7 +440,7 @@ void ControlDock_MapTab::update_selected_map_info()
// }
if (map2->is_embedded<CMap2::Vertex::ORBIT>())
{
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::Vertex::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::Vertex::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();
unsigned int bb_index = 1;
Expand Down Expand Up @@ -478,7 +478,7 @@ void ControlDock_MapTab::update_selected_map_info()
// }
if (map2->is_embedded<CMap2::Edge::ORBIT>())
{
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::Edge::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::Edge::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();
for (std::size_t i = 0u; i < names.size(); ++i)
Expand All @@ -504,7 +504,7 @@ void ControlDock_MapTab::update_selected_map_info()
// }
if (map2->is_embedded<CMap2::Face::ORBIT>())
{
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::Face::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::Face::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();
for (std::size_t i = 0u; i < names.size(); ++i)
Expand All @@ -530,7 +530,7 @@ void ControlDock_MapTab::update_selected_map_info()
// }
if (map2->is_embedded<CMap2::Volume::ORBIT>())
{
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::Volume::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::Volume::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();
for (std::size_t i = 0u; i < names.size(); ++i)
Expand Down
4 changes: 2 additions & 2 deletions schnapps/core/map_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class MapHandler : public MapHandlerGen
MAP_TYPE* map = get_map();

const MAP_TYPE* cmap = map;
const MapBaseData::ChunkArrayContainer<cgogn::uint32>& vcont = cmap->template get_attribute_container<Vertex::ORBIT>();
const MapBaseData::ChunkArrayContainer<cgogn::uint32>& vcont = cmap->template get_const_attribute_container<Vertex::ORBIT>();
MapBaseData::ChunkArrayGen* cag = vcont.get_attribute(name.toStdString());

MapBaseData::ChunkArray<VEC4>* ca4 = dynamic_cast<MapBaseData::ChunkArray<VEC4>*>(cag);
Expand Down Expand Up @@ -470,7 +470,7 @@ class MapHandler : public MapHandlerGen
MAP_TYPE* map = get_map();

const MAP_TYPE* cmap = map;
const MapBaseData::ChunkArrayContainer<cgogn::uint32>& vcont = cmap->template get_attribute_container<Vertex::ORBIT>();
const MapBaseData::ChunkArrayContainer<cgogn::uint32>& vcont = cmap->template get_const_attribute_container<Vertex::ORBIT>();
MapBaseData::ChunkArrayGen* cag = vcont.get_attribute(name.toStdString());

MapBaseData::ChunkArray<VEC4>* ca4 = dynamic_cast<MapBaseData::ChunkArray<VEC4>*>(cag);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ComputeNormal_Dialog::selected_map_changed()
{
QString vec3_type_name = QString::fromStdString(cgogn::name_of_type(VEC3()));

const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_attribute_container<CMap2::Vertex::ORBIT>();
const CMap2::ChunkArrayContainer<cgogn::numerics::uint32>& container = map2->get_const_attribute_container<CMap2::Vertex::ORBIT>();
const std::vector<std::string>& names = container.get_names();
const std::vector<std::string>& type_names = container.get_type_names();

Expand Down