Skip to content

Commit

Permalink
Merge pull request #3 from SeppahBaws/fix/warning-lvl-4
Browse files Browse the repository at this point in the history
Fix warning lvl 4 errors + fix g++ compile error
  • Loading branch information
SeppahBaws authored Jul 20, 2020
2 parents 88abb27 + 28b0213 commit cf6ce8e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.sln
*.vcxproj
*.vcxproj.*
Makefile

# Output
bin/
Expand Down
1 change: 1 addition & 0 deletions GenerateProject.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./premake5 gmake2
11 changes: 4 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# To build: simply call ./build.sh
# To also run when build completed pass the flag `-r` or `--run`

# Make build folder
mkdir -p ./bin
# To also run when build completed pass the flag `-r`

# Compile
g++ -std=c++17 ./logtools/src/main.cpp -o ./bin/program.o
make

# Run if requested
if echo $* | grep -e "--run" -q
if echo $* | grep -e "-r" -q
then
./bin/program.o
./bin/Debug-x86_64-linux/logtools
fi
4 changes: 2 additions & 2 deletions logtools/src/logtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Logger
{
SetConsoleTextAttribute(Instance().hConsole, RESET);
}
static void LogColor(const std::string& msg, const int color)
static void LogColor(const std::string& msg, const WORD color)
{
SetConsoleTextAttribute(Instance().hConsole, color);
std::cout << msg << std::endl;
Expand All @@ -180,4 +180,4 @@ class Logger
#endif
};

#endif INCLUDE_LOGTOOLS_H
#endif //INCLUDE_LOGTOOLS_H
9 changes: 8 additions & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ project "logtools"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"


warnings "extra"

targetdir ("bin/" .. outputdir)
objdir ("bin-int/" .. outputdir)

Expand All @@ -26,6 +28,11 @@ project "logtools"
"%{prj.name}/src/**.cpp"
}

flags
{
"FatalWarnings"
}

filter "configurations:Debug"
runtime "Debug"
symbols "on"
Expand Down

0 comments on commit cf6ce8e

Please sign in to comment.