From: Kent Gibson Date: Fri, 15 Nov 2019 14:43:42 +0000 (+0800) Subject: bindings: cxx: initialize bitset with integer instead of string X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8eaa3dc7c3395bc73e71f353607c1237b75e5165;p=qemu-gpiodev%2Flibgpiod.git bindings: cxx: initialize bitset with integer instead of string Initializing bitsets with string is inefficient and confusing. Initialize them with the corresponding int instead. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/cxx/line_bulk.cpp b/bindings/cxx/line_bulk.cpp index 8369930..c708c8b 100644 --- a/bindings/cxx/line_bulk.cpp +++ b/bindings/cxx/line_bulk.cpp @@ -11,9 +11,9 @@ namespace gpiod { -const ::std::bitset<32> line_request::FLAG_ACTIVE_LOW("001"); -const ::std::bitset<32> line_request::FLAG_OPEN_SOURCE("010"); -const ::std::bitset<32> line_request::FLAG_OPEN_DRAIN("100"); +const ::std::bitset<32> line_request::FLAG_ACTIVE_LOW(GPIOD_BIT(0)); +const ::std::bitset<32> line_request::FLAG_OPEN_SOURCE(GPIOD_BIT(1)); +const ::std::bitset<32> line_request::FLAG_OPEN_DRAIN(GPIOD_BIT(2)); namespace {