File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1504,8 +1504,18 @@ static const luaL_Reg dfhack_gui_funcs[] = {
15041504
15051505/* **** Job module *****/
15061506
1507- static bool jobEqual (df::job *job1, df::job *job2) { return *job1 == *job2; }
1508- static bool jobItemEqual (df::job_item *job1, df::job_item *job2) { return *job1 == *job2; }
1507+ static bool jobEqual (const df::job *job1, const df::job *job2)
1508+ {
1509+ CHECK_NULL_POINTER (job1);
1510+ CHECK_NULL_POINTER (job2);
1511+ return *job1 == *job2;
1512+ }
1513+ static bool jobItemEqual (const df::job_item *job1, const df::job_item *job2)
1514+ {
1515+ CHECK_NULL_POINTER (job1);
1516+ CHECK_NULL_POINTER (job2);
1517+ return *job1 == *job2;
1518+ }
15091519
15101520static const LuaWrapper::FunctionReg dfhack_job_module[] = {
15111521 WRAPM (Job,cloneJobStruct),
Original file line number Diff line number Diff line change @@ -129,9 +129,6 @@ void DFHack::Job::deleteJobStruct(df::job *job, bool keptEverything)
129129
130130bool DFHack::operator == (const df::job_item &a, const df::job_item &b)
131131{
132- CHECK_NULL_POINTER (&a);
133- CHECK_NULL_POINTER (&b);
134-
135132 if (!(CMP (item_type) && CMP (item_subtype) &&
136133 CMP (mat_type) && CMP (mat_index) &&
137134 CMP (flags1.whole ) && CMP (quantity) && CMP (vector_id) &&
@@ -152,9 +149,6 @@ bool DFHack::operator== (const df::job_item &a, const df::job_item &b)
152149
153150bool DFHack::operator == (const df::job &a, const df::job &b)
154151{
155- CHECK_NULL_POINTER (&a);
156- CHECK_NULL_POINTER (&b);
157-
158152 if (!(CMP (job_type) && CMP (job_subtype) &&
159153 CMP (mat_type) && CMP (mat_index) &&
160154 CMP (item_subtype) && CMP (item_category.whole ) &&
You can’t perform that action at this time.
0 commit comments