model: add 'const'
[model-checker.git] / model.cc
index 780633e3e6a0d4ec0f0778c09cf3403c130175e8..7ce959e90b9c5aeaf649df1f422868a63aa34421 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1104,7 +1104,7 @@ bool ModelChecker::process_write(ModelAction *curr)
        if (promises->empty()) {
                for (unsigned int i = 0; i < futurevalues->size(); i++) {
                        struct PendingFutureValue pfv = (*futurevalues)[i];
-                       add_future_value(pfv.writer, pfv.act);
+                       add_future_value(pfv.writer, pfv.reader);
                }
                futurevalues->clear();
        }
@@ -2049,7 +2049,7 @@ bool ModelChecker::w_modification_order(ModelAction *curr, ModelVector<ModelActi
 /** Arbitrary reads from the future are not allowed.  Section 29.3
  * part 9 places some constraints.  This method checks one result of constraint
  * constraint.  Others require compiler support. */
-bool ModelChecker::thin_air_constraint_may_allow(const ModelAction *writer, const ModelAction *reader)
+bool ModelChecker::thin_air_constraint_may_allow(const ModelAction *writer, const ModelAction *reader) const
 {
        if (!writer->is_rmw())
                return true;