Skip to content

Changed std::string to std::filesystem::path in the Filewatcher#603

Open
nepp95 wants to merge 1 commit into
TheCherno:masterfrom
nepp95:filewatcher
Open

Changed std::string to std::filesystem::path in the Filewatcher#603
nepp95 wants to merge 1 commit into
TheCherno:masterfrom
nepp95:filewatcher

Conversation

@nepp95
Copy link
Copy Markdown
Contributor

@nepp95 nepp95 commented Jan 5, 2023

Describe the issue (if no issue has been made)

std::filesystem::path is used when loading assemblies, so it makes more sense to use this for the filewatcher too, instead of converting a std::filesystem::path to std::string. This is natively supported by the library.

static bool LoadAssembly(const std::filesystem::path& filepath);
static bool LoadAppAssembly(const std::filesystem::path& filepath);

Also see: https://github.com/ThomasMonkman/filewatch#4

PR impact (Make sure to add closing keywords)

List of related issues/PRs this will solve:

Impact Issue/PR
Issues this solves None
Other PRs this solves None

Proposed fix _(Make sure you've read [on how to contribute]

Changed the occurences of std::string to std::filesystem::path where the filewatcher is concerned. Although std::string is used in other places, this didn't involve the filewatcher and have been left as is.

Additional context

Tested if it still works, which it should since this is not really a breaking change and is supported by the library.
Worked fine when changing a file in the sandbox project and recompiling while running.

std::filesystem::path is used when loading assemblies, so it makes more sense to use this for the filewatcher too, instead of converting a filesystem::path to std::string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant