Skip to content

Commit

Permalink
Add nullTerminate cbor flag to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
glenne committed Aug 26, 2023
1 parent df51121 commit 7769e15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ target_link_libraries(KArgMapExample

Cmake - Download and install from [cmake.org](https://cmake.org/download/). Cmake 3.14.0 or above.


#### Building and running unit tests

This example shows commands for Linux. Add the appropriate changes for Visual Studio.
Expand Down Expand Up @@ -483,7 +482,7 @@ The KArgMap and KArgList containers can be cast to const versions with zero over
the programmer to use 'const KArgMap&' as a parameter to functions.

To facilitate use in threaded environments, a deepClone() method is provided which duplicates the contents by creating new containers for all children and children's children
in a KArgMap structure. `std::vector<T>` elements are not duplicated. A future 'cloneAll' or 'duplicate' method will be provided that will also duplicate std::vector<T>
in a KArgMap structure. `std::vector<T>` elements are not duplicated. A future 'cloneAll' or 'duplicate' method will be provided that will also duplicate'std::vector<T>
elements.

## Questions/Feedback
Expand Down
4 changes: 3 additions & 1 deletion include/kargmap/CborSerializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class CborSerializer {
* @param buf A pointer to memory to place a cbor encoded representation.
* @param maxBufLen The size in bytes of the buf memory.
*/
CborSerializer(void *buf, const uint32_t maxBufLen) : cbor(buf, maxBufLen) {}
CborSerializer(void *buf, const uint32_t maxBufLen,
const bool nullTerminate = false)
: cbor(buf, maxBufLen, nullTerminate) {}

/**
* @brief Encode a KArgMap instance into a CBOR binary array of bytes.
Expand Down

0 comments on commit 7769e15

Please sign in to comment.