Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Fix #293, enable compiler warnings in debug mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinrich Kuttler committed Dec 16, 2021
1 parent 434338d commit 9cecc6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ if(CMAKE_BUILD_TYPE MATCHES Debug)
"${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address"
)
endif()
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall)
endif()
elseif(CMAKE_BUILD_TYPE MATCHES Release)
message("Release build.")
else()
Expand Down
4 changes: 1 addition & 3 deletions win/rl/pynethack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ class Nethack

Nethack(std::string dlpath, std::string hackdir,
std::string nethackoptions, bool spawn_monsters)
: dlpath_(std::move(dlpath)), obs_{}, settings_{},
spawn_monsters_(spawn_monsters)
: dlpath_(std::move(dlpath)), obs_{}, settings_{}
{
if (hackdir.size() > sizeof(settings_.hackdir) - 1) {
throw std::length_error("hackdir too long");
Expand Down Expand Up @@ -325,7 +324,6 @@ class Nethack
std::vector<py::object> py_buffers_;
nle_seeds_init_t seed_init_;
bool use_seed_init = false;
bool spawn_monsters_ = true;
nledl_ctx *nle_ = nullptr;
std::FILE *ttyrec_ = nullptr;
nle_settings settings_;
Expand Down

0 comments on commit 9cecc6d

Please sign in to comment.