Skip to content

Commit 3e7c83e

Browse files
authored
Fix JSONFileParseError to return a const reference of the path (sourcemeta#1742)
Fixes: sourcemeta#1741 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 4a92a3d commit 3e7c83e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/json/include/sourcemeta/core/json_error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class SOURCEMETA_CORE_JSON_EXPORT JSONFileParseError : public JSONParseError {
8282
path_{path} {}
8383

8484
/// Get the file path of the error
85-
[[nodiscard]] auto path() const noexcept -> const std::filesystem::path {
85+
[[nodiscard]] auto path() const noexcept -> const std::filesystem::path & {
8686
return path_;
8787
}
8888

0 commit comments

Comments
 (0)