Part of C++11 features aren't supported by Android NDK, includes
to_string and stoi. Replace them with snprintf and atoi.
Change-Id: I6edda1856ab34c0e1dcc23daef0b105875a09189
private:
inline std::string make_URI(const unsigned int resource_number)
{
- std::string uri = std::string("/a/light") + "_" + std::to_string(resource_number);
+ char rn[16];
+ snprintf(rn, 16, "%d", resource_number);
+ std::string uri = std::string("/a/light") + "_" + rn;
m_rep.setUri(uri);
return uri;
}
// TODO different int sizes
std::string operator() (const int i) const
{
- return std::to_string(i);
+ char i_str[16];
+ snprintf(i_str, 16, "%d", i);
+ return i_str;
}
std::string operator() (const std::string& str) const
void operator() (int& i) const
{
- i = std::stoi(m_str);
+ i = atoi(m_str.c_str());
}
void operator() (std::string& str) const