X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Flogicsegment.cpp;h=707f797d294accad64b5ee12f1ecd1551049344d;hp=58cf00e5dddbfcc6e1514cb0534084546fbe3dec;hb=97cb532f668dd78a5100abb07d7500cbd36b6198;hpb=53aa9bb42c921cfc3a658855598f984cdaac17d0 diff --git a/pv/data/logicsegment.cpp b/pv/data/logicsegment.cpp index 58cf00e5..707f797d 100644 --- a/pv/data/logicsegment.cpp +++ b/pv/data/logicsegment.cpp @@ -17,6 +17,8 @@ * along with this program; if not, see . */ +#include "config.h" // For HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS + #include #include @@ -62,7 +64,7 @@ LogicSegment::~LogicSegment() free(l.data); } -uint64_t LogicSegment::unpack_sample(const uint8_t *ptr) const +inline uint64_t LogicSegment::unpack_sample(const uint8_t *ptr) const { #ifdef HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS return *(uint64_t*)ptr; @@ -100,7 +102,7 @@ uint64_t LogicSegment::unpack_sample(const uint8_t *ptr) const #endif } -void LogicSegment::pack_sample(uint8_t *ptr, uint64_t value) +inline void LogicSegment::pack_sample(uint8_t *ptr, uint64_t value) { #ifdef HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS *(uint64_t*)ptr = value;