prefer delegate constructor over new(this) (#19623)

This commit is contained in:
minggo 2019-04-19 03:20:15 -07:00 committed by GitHub
parent e8993c9860
commit 34517748c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions

View File

@ -57,16 +57,7 @@ namespace cocos2d { namespace network {
////////////////////////////////////////////////////////////////////////////////
// Implement Downloader
Downloader::Downloader()
{
DownloaderHints hints =
{
6,
45,
".tmp"
};
new(this)Downloader(hints);
}
Downloader::Downloader() : Downloader(DownloaderHints{6, 45, ".tmp"}) { }
Downloader::Downloader(const DownloaderHints& hints)
{