Skip to content

Commit

Permalink
bits: Allow both | and , separatos when parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
shramov committed Dec 21, 2024
1 parent f38bd7f commit 5052198
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tll/conv/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct parse<T, typename std::enable_if<std::is_base_of_v<tll::util::Bits<typena
{
T t;
const auto desc = T::bits_descriptor();
for (auto v : tll::split<'|'>(s)) {
for (auto v : tll::split<'|', ','>(s)) {
v = tll::util::strip(v);
auto r = tll::conv::select(v, desc);
if (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/tll/scheme/encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ int ConfigEncoder::_fill_numeric(T * ptr, const tll::scheme::Field * field, std:
if constexpr (!std::is_same_v<T, double>) {
if (field->sub_type == field->Bits) {
*ptr = 0;
for (auto v : tll::split<'|'>(s)) {
for (auto v : tll::split<'|', ','>(s)) {
v = tll::util::strip(v);

auto b = field->type_bits->values;
Expand Down

0 comments on commit 5052198

Please sign in to comment.