diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-17 14:30:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-17 14:30:21 +0100 |
| commit | 34f2b95c1638a2cfedf21de5a203d6c0b77abf11 (patch) | |
| tree | bd78b7dbca7d975a89ef9628f6d4b2fd783a39f1 /src/asset.h | |
| parent | 81ed0ebb725a7b5fec00ae209ba8b0d70ebc4ee1 (diff) | |
Use an optional<> where there should be one.
Diffstat (limited to 'src/asset.h')
| -rw-r--r-- | src/asset.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/asset.h b/src/asset.h index 214cc227..143c6296 100644 --- a/src/asset.h +++ b/src/asset.h @@ -83,8 +83,8 @@ public: */ void write_to_pkl (xmlpp::Node* node, boost::filesystem::path root, Standard standard) const; - /** @return the most recent disk file used to read or write this asset; may be empty */ - boost::filesystem::path file () const { + /** @return the most recent disk file used to read or write this asset, if there is one */ + boost::optional<boost::filesystem::path> file () const { return _file; } @@ -97,8 +97,8 @@ public: protected: - /** The most recent disk file used to read or write this asset; may be empty */ - mutable boost::filesystem::path _file; + /** The most recent disk file used to read or write this asset */ + mutable boost::optional<boost::filesystem::path> _file; private: friend struct ::asset_test; |
