Skip to content

Commit c4487ab

Browse files
committed
Asset: Use references in the constructor
1 parent 978a945 commit c4487ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/scratchcpp/asset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AssetPrivate;
1616
class LIBSCRATCHCPP_EXPORT Asset
1717
{
1818
public:
19-
Asset(std::string name, std::string id, std::string format);
19+
Asset(const std::string &name, const std::string &id, const std::string &format);
2020

2121
const std::string &assetId() const;
2222

src/scratch/asset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using namespace libscratchcpp;
88

99
/*! Constructs Asset. */
10-
Asset::Asset(std::string name, std::string id, std::string format) :
10+
Asset::Asset(const std::string &name, const std::string &id, const std::string &format) :
1111
impl(spimpl::make_impl<AssetPrivate>(name, id, format))
1212
{
1313
}

0 commit comments

Comments
 (0)