use modern c++

This commit is contained in:
sehraf 2020-06-13 10:58:44 +02:00
parent ba23b9ad51
commit 8323b94a6a
No known key found for this signature in database
GPG Key ID: DF09F6EAE356B2C6

View File

@ -39,10 +39,7 @@ std::string keyToBase32Addr(const std::string &key)
}
const std::string makeOption(const std::string &lhs, const int8_t &rhs) {
// convert number to int
std::ostringstream oss;
oss << (int)rhs;
return lhs + "=" + oss.str();
return lhs + "=" + std::to_string(rhs);
}
uint16_t readTwoBytesBE(std::vector<uint8_t>::const_iterator &p)