Skip to content

Commit

Permalink
updated and resolved conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikLundell committed Apr 22, 2020
2 parents f4f2aa0 + 9a10ea9 commit 07571e9
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if("${CMAKE_GENERATOR}" STREQUAL Ninja)
endif()
endif()

if(NOT("${CMAKE_VERSION}" VERSION_LESS 3.12))
# make ZLIB_ROOT work in CMake >= 3.12
# https://cmake.org/cmake/help/git-stage/policy/CMP0074.html
cmake_policy(SET CMP0074 NEW)
endif()

# Set up build types
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo" CACHE STRING "List of supported configuration types" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DFHack Readme

[![Build Status](https://github.com/DFHack/dfhack/workflows/Build/badge.svg)](https://github.com/DFHack/dfhack/actions?query=workflow%3ABuild)
[![Build Status](https://github.com/DFHack/dfhack/workflows/Build/badge.svg?event=push)](https://github.com/DFHack/dfhack/actions?query=workflow%3ABuild)
[![Documentation Status](https://readthedocs.org/projects/dfhack/badge)](https://dfhack.readthedocs.org)
[![License](https://img.shields.io/badge/license-ZLib-blue.svg)](https://en.wikipedia.org/wiki/Zlib_License)

Expand Down
1 change: 1 addition & 0 deletions dfhack.init-example
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ enable \
dwarfmonitor \
mousequery \
autogems \
autodump \
automelt \
autotrade \
buildingplan \
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- `tweak` embark-profile-name: fixed handling of the native shift+space key

## Misc Improvements
- ``dfhack.init-example``: enabled `autodump`
- `manipulator`: added intrigue to displayed skills
- `search`: added support for the fortress mode justice screen

Expand Down
5 changes: 3 additions & 2 deletions library/DataStatics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

namespace {
template<class T>
inline T &_toref(T &r) { return r; }
inline T *_toptr(T &r) { return &r; }
template<class T>
inline T &_toref(T *&p) { return *p; }
inline T *_toptr(T *&p) { return p; }
}
#define _fieldptr(ptr, fn) (ptr) ? _toptr((ptr)->fn) : NULL

#define INIT_GLOBAL_FUNCTION_PREFIX \
DFHack::VersionInfo *global_table_ = DFHack::Core::getInstance().vinfo.get(); \
Expand Down
5 changes: 5 additions & 0 deletions plugins/devel/check-structures-sanity/dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ bool Checker::queue_item(const QueueItem & item, CheckedStructure cs)
auto offset = uintptr_t(item.ptr) - uintptr_t(prev->first);
if (!prev->second.second.has_type_at_offset(cs, offset))
{
if (offset == 0 && cs.identity == df::identity_traits<void *>::get())
{
FAIL("unknown pointer is " << prev->second.second.identity->getFullName() << ", previously seen at " << prev->second.first);
return false;
}
// TODO
FAIL("TODO: handle merging structures: " << item.path << " overlaps " << prev->second.first << " (backward)");
return false;
Expand Down
1 change: 0 additions & 1 deletion plugins/devel/check-structures-sanity/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ bool CheckedStructure::has_type_at_offset(const CheckedStructure & type, size_t
auto st = dynamic_cast<struct_identity *>(identity);
if (!st)
{
UNEXPECTED;
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/orders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,9 @@ static command_result orders_clear_command(color_ostream & out)
}
if (order->items)
{
for (auto anon_1 : *order->items)
for (auto item : *order->items)
{
delete anon_1;
delete item;
}
delete order->items;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts

0 comments on commit 07571e9

Please sign in to comment.