about summary refs log tree commit diff stats
path: root/src/ap_state.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-12-20 14:33:43 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-12-20 14:33:43 -0500
commit3c49081df34fb1801063c0b538d12d4422fcf3f0 (patch)
treef4d267d953c97b0ee3e78730d8e36484abf7f096 /src/ap_state.h
parent5a7559e39d2cd8306a99adbc6d39e90716b14687 (diff)
downloadlingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.tar.gz
lingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.tar.bz2
lingo-ap-tracker-3c49081df34fb1801063c0b538d12d4422fcf3f0.zip
Fixed remaining thread unsafe APState/IPCState reads
Still would like to add some kind of wrapper object that TrackerState could use to read APState without locking, since it'll only ever be called from the thread that would do the mutating, but this is fine for now.
Diffstat (limited to 'src/ap_state.h')
-rw-r--r--src/ap_state.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ap_state.h b/src/ap_state.h index a23b13d..2da0b8e 100644 --- a/src/ap_state.h +++ b/src/ap_state.h
@@ -68,13 +68,11 @@ bool AP_IsColorShuffle();
68 68
69bool AP_IsPaintingShuffle(); 69bool AP_IsPaintingShuffle();
70 70
71// WARNING: Not thread-safe! 71std::map<std::string, std::string> AP_GetPaintingMapping();
72const std::map<std::string, std::string>& AP_GetPaintingMapping();
73 72
74bool AP_IsPaintingMappedTo(const std::string& painting_id); 73bool AP_IsPaintingMappedTo(const std::string& painting_id);
75 74
76// WARNING: Not thread-safe! 75std::set<std::string> AP_GetCheckedPaintings();
77const std::set<std::string>& AP_GetCheckedPaintings();
78 76
79bool AP_IsPaintingChecked(const std::string& painting_id); 77bool AP_IsPaintingChecked(const std::string& painting_id);
80 78
@@ -100,8 +98,7 @@ SunwarpAccess AP_GetSunwarpAccess();
100 98
101bool AP_IsSunwarpShuffle(); 99bool AP_IsSunwarpShuffle();
102 100
103// WARNING: Not thread-safe! 101std::map<int, SunwarpMapping> AP_GetSunwarpMapping();
104const std::map<int, SunwarpMapping>& AP_GetSunwarpMapping();
105 102
106bool AP_HasReachedGoal(); 103bool AP_HasReachedGoal();
107 104