summaryrefslogtreecommitdiff
path: root/src/types
diff options
context:
space:
mode:
authorOleg Morozenkov <omorozenkov@gmail.com>2018-05-26 16:16:13 +0300
committerGitHub <noreply@github.com>2018-05-26 16:16:13 +0300
commitb538f1fb43c790c9043630e6bfad42f037dbe03a (patch)
treee932ad8f364ddfa108e633a3624371a569936fdb /src/types
parent987adf188619011acff2052301245e4df22a38d2 (diff)
parentad40032ec5608af2fd94b28cbfe498a7313c3af0 (diff)
Merge pull request #60 from JellyBrick/master
Improve performance
Diffstat (limited to 'src/types')
-rw-r--r--src/types/InputFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/types/InputFile.cpp b/src/types/InputFile.cpp
index 0f6cb86..4884488 100644
--- a/src/types/InputFile.cpp
+++ b/src/types/InputFile.cpp
@@ -14,7 +14,7 @@ using namespace std;
namespace TgBot {
InputFile::Ptr InputFile::fromFile(const string& filePath, const string& mimeType) {
- InputFile::Ptr result(new InputFile);
+ auto result(make_shared<InputFile>());
result->data = FileTools::read(filePath);
result->mimeType = mimeType;
result->fileName = StringTools::split(filePath, '/').back();