General: Use std::make_unique where applicable

Makes for a little less reading in certain cases.
This commit is contained in:
Lioncash
2019-08-30 05:02:35 -04:00
parent df1e450728
commit a8753e273f
9 changed files with 144 additions and 93 deletions

View File

@@ -563,11 +563,11 @@ std::unique_ptr<IAES> NewAES() {
#endif
}
if (HAS_AES_NI)
return std::unique_ptr<IAES>(new NiAES);
return std::make_unique<NiAES>();
else
return std::unique_ptr<IAES>(new SoftwareAES);
return std::make_unique<SoftwareAES>();
#else
return std::unique_ptr<IAES>(new SoftwareAES);
return std::make_unique<SoftwareAES>();
#endif
}