Skip to content

Commit

Permalink
feat(record): mark get_encoded_size() as const
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuller committed Jan 30, 2024
1 parent 94af5ca commit 690785b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MFRC522v2-NDEF/record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ uint8_t *NdefRecord::encode() const
return result;
}

uint32_t NdefRecord::get_encoded_size()
uint32_t NdefRecord::get_encoded_size() const
{
return 2 // TNF + flags + type length
+ (_payload.length() > 255 ? 4 : 1) // payload length size
Expand Down
2 changes: 1 addition & 1 deletion src/MFRC522v2-NDEF/record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class NdefRecord
*
* @return uint32_t Encoded size
*/
uint32_t get_encoded_size();
uint32_t get_encoded_size() const;

/**
* @brief Encode the NDEF record
Expand Down

0 comments on commit 690785b

Please sign in to comment.