-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert GVFS.Hooks to C++ #1426
Conversation
@@ -0,0 +1,18 @@ | |||
#pragma once | |||
|
|||
inline std::vector<std::string> String_Split(char deliminator, const std::string toSplit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const std::string toSplit
-> const std::string& toSplit
|
||
bool FileSystem_FileExists(const PATH_STRING& path) | ||
{ | ||
DWORD attributes = GetFileAttributesW(path.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment referencing https://devblogs.microsoft.com/oldnewthing/20071023-00/?p=24713
} | ||
} | ||
|
||
int main(int argc, char *argv[]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all function implementations above main to a better spot
} | ||
|
||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> utf16conv; | ||
std::wstring command = utf16conv.from_bytes(processName) + L" " + utf16conv.from_bytes(args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the std::
here
#include "common.h" | ||
#include "FileSystem.h" | ||
|
||
PATH_STRING Upgrader_GetHighestAvailableVersionFilePath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename file to Upgrader.h
@@ -31,9 +31,13 @@ enum ReturnCode | |||
PipeReadFailed = 8, | |||
FailureToDownload = 9, | |||
PathNameError = 10, | |||
InvalidCommand = 11, | |||
InvalidResponse = 12, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spacing (here and below)
Closing this PR for now, will re-open when this work has higher priority |
NOTE: Still a work in progress - this was something I hacked out that still needs cleanup
Resolves #716
Convert GVFS.Hooks from C# to C++
TODO:
Follow up work (separate PRs):
*.Shared.cs
files that existed only to be shared with GVFS.Hooks