-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
45 lines (34 loc) · 743 Bytes
/
Main.cpp
File metadata and controls
45 lines (34 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "App.h"
#include <algorithm>
#ifdef _RELEASE
#include <windows.h>
#include "Misc/Util.h"
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow)
{
std::vector<std::string> args = Util::SplitString(lpCmdLine);
App app;
app.ProcessArguments(args);
app.Init();
app.Run();
return 0;
}
#endif // _RELEASE
#ifndef _RELEASE
int main(int argc, const char* argv[])
{
std::vector<std::string> args;
std::transform(
argv + 1,
argv + argc,
std::back_inserter(args),
[](const char* arg) {
return std::string(arg);
}
);
App app;
app.ProcessArguments(args);
app.Init();
int statusCode = app.Run();
return statusCode;
}
#endif