diff --git a/layer2/CifFile.cpp b/layer2/CifFile.cpp index 7397e0680..f9050597a 100644 --- a/layer2/CifFile.cpp +++ b/layer2/CifFile.cpp @@ -746,8 +746,7 @@ bool cif_file::parse_bcif(const char* bytes, std::size_t size) auto blockMap = block.as>(); auto header = blockMap["header"].as(); auto categoriesRaw = blockMap["categories"].as>(); - m_datablocks[header].m_data = pymol::cif_detail::bcif_data{}; - auto& categoriesData = std::get(m_datablocks[header].m_data); + auto& categoriesData = m_datablocks[header].m_data.emplace(); for (const auto& category : categoriesRaw) { auto categoryMap = category.as>(); auto categoryName = categoryMap["name"].as(); @@ -763,8 +762,7 @@ bool cif_file::parse_bcif(const char* bytes, std::size_t size) auto dataRaw = columnMap["data"].as>(); auto dataData = dataRaw["data"].as>(); auto dataEncoding = dataRaw["encoding"].as>>(); - auto vec = parse_bcif_decode(dataData, dataEncoding); - columns[columnName] = std::move(vec); + columns[columnName] = parse_bcif_decode(dataData, dataEncoding); } } }