mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-03 22:06:32 +02:00
Reduce flash usage up to 214k in one click (#2929)
* std::stringstream -> std::string * Fix small issues * Small fix 2
This commit is contained in:
committed by
Me No Dev
parent
20498cf8b1
commit
a22ec4a978
@ -202,9 +202,12 @@ bool FreeRTOS::Semaphore::take(uint32_t timeoutMs, std::string owner) {
|
||||
* @return A string representation of the semaphore.
|
||||
*/
|
||||
std::string FreeRTOS::Semaphore::toString() {
|
||||
std::stringstream stringStream;
|
||||
stringStream << "name: "<< m_name << " (0x" << std::hex << std::setfill('0') << (uint32_t)m_semaphore << "), owner: " << m_owner;
|
||||
return stringStream.str();
|
||||
char hex[9];
|
||||
std::string res = "name: " + m_name + " (0x";
|
||||
snprintf(hex, sizeof(hex), "%08x", (uint32_t)m_semaphore);
|
||||
res += hex;
|
||||
res += "), owner: " + m_owner;
|
||||
return res;
|
||||
} // toString
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user