summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_andsw.cpp
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-12-06 16:34:47 -0500
committerGitHub <noreply@github.com>2025-12-06 13:34:47 -0800
commita30e617e5a9b8264053788429a587ee1763eae73 (patch)
treed4f3dbf04e754e5741ba35b1ba1083851be87597 /src/d/actor/d_a_andsw.cpp
parent9f1a6488512209cc1acc612aa390e9a4686037ca (diff)
Various debug conditional compilation cleanup (#2915)
* Global: Define DEBUG as 0 if not already defined * Clean up DEBUG-guarded code
Diffstat (limited to 'src/d/actor/d_a_andsw.cpp')
-rw-r--r--src/d/actor/d_a_andsw.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/d/actor/d_a_andsw.cpp b/src/d/actor/d_a_andsw.cpp
index 50bdb3455a..12d93d0b62 100644
--- a/src/d/actor/d_a_andsw.cpp
+++ b/src/d/actor/d_a_andsw.cpp
@@ -8,7 +8,7 @@
#include "d/actor/d_a_andsw.h"
#include "d/d_procname.h"
-#ifdef DEBUG
+#if DEBUG
daAndsw_HIO_c l_HIO;
daAndsw_HIO_c::daAndsw_HIO_c() {
@@ -42,7 +42,7 @@ int daAndsw_c::create() {
return cPhs_ERROR_e;
}
-#ifdef DEBUG
+#if DEBUG
l_HIO.entryHIO("SW監視");
#endif
@@ -58,7 +58,7 @@ int daAndsw_c::execute() {
if (mTimer == 0) {
fopAcM_offSwitch(this,mSwNo);
-#ifdef DEBUG
+#if DEBUG
if (l_HIO.field_0x6 != 0) {
OS_REPORT("-- SW監視状態出力 --\n");
OS_REPORT("sw<%d>OFFしました\n", mSwNo);
@@ -70,19 +70,20 @@ int daAndsw_c::execute() {
OS_REPORT("SW監視:SWOFFしたので処理終わりますSW<%d>\n", mSwNo);
}
}
- }
-#ifdef DEBUG
- else if (l_HIO.field_0x6 != 0) {
- OS_REPORT("sw2<%d>を待っています\n", mSwNo2);
- l_HIO.field_0x6 = 0;
- }
+ } else {
+#if DEBUG
+ if (l_HIO.field_0x6 != 0) {
+ OS_REPORT("sw2<%d>を待っています\n", mSwNo2);
+ l_HIO.field_0x6 = 0;
+ }
#endif
+ }
return 1;
}
int daAndsw_c::_delete() {
-#ifdef DEBUG
+#if DEBUG
l_HIO.removeHIO();
#endif
return 1;