未验证 提交 cf549d5e 编写于 作者: Y ysh329 提交者: GitHub

fix undef replace stl pad of android armv8 static lib. test=develop (#3977)

上级 00bd7f44
......@@ -23,6 +23,14 @@ namespace paddle {
namespace lite {
namespace replace_stl {
#ifndef LITE_WITH_LOG
#define ADD_DATA_AS_STRING(data_, obj_)
#else
#define ADD_DATA_AS_STRING(data_, obj_) \
std::string text = std::to_string(obj_); \
pad(text); \
data_ = data_ + text;
void ostream::pad(const std::string& text) {
if (display_width_ > 0) {
if (display_width_ < text.size()) {
......@@ -36,15 +44,6 @@ void ostream::pad(const std::string& text) {
}
}
}
#ifndef LITE_WITH_LOG
#define ADD_DATA_AS_STRING(data_, obj_)
#else
#define ADD_DATA_AS_STRING(data_, obj_) \
std::string text = std::to_string(obj_); \
pad(text); \
data_ = data_ + text;
#endif
template <>
......
......@@ -57,7 +57,9 @@ class ostream {
ostream& operator<<(const T* obj);
private:
#ifdef LITE_WITH_LOG
void pad(const std::string& text);
#endif
std::string data_;
int display_width_{-1}; // -1 refers to no setting
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册