MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetNameFromTrackPath

Function GetNameFromTrackPath

src/openrct2/ride/TrackDesignRepository.cpp:47–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45};
46
47std::string GetNameFromTrackPath(const std::string& path)
48{
49 std::string name = Path::GetFileNameWithoutExtension(path);
50 // The track name should be the file name until the first instance of a dot
51 name = name.substr(0, name.find_first_of('.'));
52 return name;
53}
54
55class TrackDesignFileIndex final : public FileIndex<TrackRepositoryItem>
56{

Callers 5

CreateMethod · 0.85
LoadMethod · 0.85
LoadMethod · 0.85
setupTrackMethod · 0.85

Calls 1

Tested by

no test coverage detected