未验证 提交 6b8ef2f2 编写于 作者: X xiaoye 提交者: GitHub

feat(hihg-performance): use std::move to instead of copy-ctor (#56093)

上级 689bcad5
......@@ -423,7 +423,7 @@ struct EnforceNotMet : public std::exception {
"%s\n [Hint: " #__VAL " should not be null.]", \
__summary__.error_message()); \
__THROW_ERROR_INTERNAL__( \
phi::ErrorSummary(__summary__.code(), __message__)); \
phi::ErrorSummary(__summary__.code(), std::move(__message__))); \
} \
} while (0)
......@@ -434,7 +434,7 @@ struct EnforceNotMet : public std::exception {
auto __message__ = ::paddle::string::Sprintf( \
"%s\n [Hint: " #__VAL " should not be null.]", \
__summary__.error_message()); \
::phi::enforce::ThrowWarnInternal(__message__); \
::phi::enforce::ThrowWarnInternal(std::move(__message__)); \
} \
} while (0)
......@@ -466,7 +466,7 @@ struct EnforceNotMet : public std::exception {
::phi::details::BinaryCompareMessageConverter< \
__kCanToString__>::Convert(#__VAL2, __val2)); \
__THROW_ERROR_INTERNAL__( \
phi::ErrorSummary(__summary__.code(), __message__)); \
phi::ErrorSummary(__summary__.code(), std::move(__message__))); \
} \
} while (0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册