From 8511ee5cd11a5143a4476c0152f0ede0f2b6b87e Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sun, 4 Jun 2017 13:43:12 +0200 Subject: no need to construct unique_ptr here and std::move is not needed when returning unique_ptr Change-Id: I9b4d2d6b8a41b570a9bd99e44a743ff161b78c59 Reviewed-on: https://gerrit.libreoffice.org/38385 Tested-by: Jenkins Reviewed-by: Noel Grandin --- onlineupdate/source/update/updater/updater.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'onlineupdate') diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index cd63539edfb4..f1800448087f 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -1134,7 +1134,7 @@ RemoveFile::Parse(NS_tchar *line) if (!validPath) return PARSE_ERROR; - mRelPath = std::unique_ptr(new NS_tchar[MAXPATHLEN]); + mRelPath.reset(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(mRelPath.get(), validPath); mFile.reset(get_full_path(validPath)); @@ -1261,7 +1261,7 @@ RemoveDir::Parse(NS_tchar *line) NS_tchar* validPath = get_valid_path(&line, true); if (!validPath) return PARSE_ERROR; - mRelPath = std::unique_ptr(new NS_tchar[MAXPATHLEN]); + mRelPath.reset(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(mRelPath.get(), validPath); mDir.reset(get_full_path(validPath)); @@ -1386,7 +1386,7 @@ AddFile::Parse(NS_tchar *line) if (!validPath) return PARSE_ERROR; - mRelPath = std::unique_ptr(new NS_tchar[MAXPATHLEN]); + mRelPath.reset(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(mRelPath.get(), validPath); @@ -1582,7 +1582,7 @@ PatchFile::Parse(NS_tchar *line) NS_tchar* validPath = get_valid_path(&line); if (!validPath) return PARSE_ERROR; - mFileRelPath = std::unique_ptr(new NS_tchar[MAXPATHLEN]); + mFileRelPath.reset(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(mFileRelPath.get(), validPath); mFile.reset(get_full_path(validPath)); -- cgit