From 230495248f4fe2d9388747a30ca7525a79b6bc0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Mon, 26 Feb 2024 23:10:09 -0500 Subject: [PATCH] [max] minor fixes to mapping --- include/avnd/binding/max/to_atoms.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/avnd/binding/max/to_atoms.hpp b/include/avnd/binding/max/to_atoms.hpp index aa545e61..9ca6d38c 100644 --- a/include/avnd/binding/max/to_atoms.hpp +++ b/include/avnd/binding/max/to_atoms.hpp @@ -33,6 +33,10 @@ struct to_list { atom_setsym(&atoms.emplace_back(), gensym(v.data())); } + void operator()(const std::string& v) noexcept + { + atom_setsym(&atoms.emplace_back(), gensym(v.data())); + } void operator()(const avnd::variant_ish auto& f) noexcept { visit(*this, f); @@ -57,14 +61,6 @@ struct to_list }); } - void operator()(const avnd::vector_ish auto& f) noexcept - { - atoms.reserve(atoms.size() + f.size()); - for(auto& v : f) { - (*this)(v); - } - } - template void operator()(const std::array& f) noexcept {