BLI: small optimization to retrieving CPPType from static type
This commit is contained in:
parent
e9334c5df8
commit
7b16ddeb5a
|
@ -172,7 +172,9 @@ class CPPType : NonCopyable, NonMovable {
|
|||
*/
|
||||
template<typename T> static const CPPType &get()
|
||||
{
|
||||
return CPPType::get_impl<std::remove_cv_t<T>>();
|
||||
/* Store the #CPPType locally to avoid making the function call in most cases. */
|
||||
static const CPPType &type = CPPType::get_impl<std::remove_cv_t<T>>();
|
||||
return type;
|
||||
}
|
||||
template<typename T> static const CPPType &get_impl();
|
||||
|
||||
|
|
Loading…
Reference in New Issue