Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MaximInterface mbed
Diff: common.cpp
- Revision:
- 6:b6bafd0a7013
- Parent:
- 1:e1c7c1c636af
- Child:
- 20:cdba71cb5506
diff -r 63232ef22abe -r b6bafd0a7013 common.cpp
--- a/common.cpp Wed Apr 20 20:13:33 2016 +0000
+++ b/common.cpp Thu May 12 14:40:14 2016 -0500
@@ -33,9 +33,9 @@
#include "common.hpp"
-const std::size_t charsPerByte = 2;
+const size_t charsPerByte = 2;
-std::string byteArrayToHexString(const std::uint8_t * byteArray, std::size_t byteArraySize)
+std::string byteArrayToHexString(const uint8_t * byteArray, size_t byteArraySize)
{
std::string hexString;
hexString.reserve(byteArraySize * charsPerByte);
@@ -43,10 +43,10 @@
return hexString;
}
-void byteArrayToHexString(const std::uint8_t * byteArray, std::size_t byteArraySize, std::string & hexString)
+void byteArrayToHexString(const uint8_t * byteArray, size_t byteArraySize, std::string & hexString)
{
char hexBuf[charsPerByte + 1];
- for (std::size_t i = 0; i < byteArraySize; i++)
+ for (size_t i = 0; i < byteArraySize; i++)
{
std::snprintf(hexBuf, (sizeof(hexBuf) / sizeof(hexBuf[0])), "%2.2X", byteArray[i]);
hexString.append(hexBuf, charsPerByte);
MAXREFDES143#: DeepCover Embedded Security in IoT Authenticated Sensing & Notification