[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r5413 - /trunk/getfem/src/getfem_models.cc
From: |
andriy . andreykiv |
Subject: |
[Getfem-commits] r5413 - /trunk/getfem/src/getfem_models.cc |
Date: |
Wed, 12 Oct 2016 16:39:21 -0000 |
Author: andrico
Date: Wed Oct 12 18:39:20 2016
New Revision: 5413
URL: http://svn.gna.org/viewcvs/getfem?rev=5413&view=rev
Log:
another fix with respect to "Old_" variable prefix
Modified:
trunk/getfem/src/getfem_models.cc
Modified: trunk/getfem/src/getfem_models.cc
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_models.cc?rev=5413&r1=5412&r2=5413&view=diff
==============================================================================
--- trunk/getfem/src/getfem_models.cc (original)
+++ trunk/getfem/src/getfem_models.cc Wed Oct 12 18:39:20 2016
@@ -238,8 +238,9 @@
model::VAR_SET::const_iterator
model::find_variable(const std::string &name) const {
- VAR_SET::const_iterator it = variables.find(name);
- GMM_ASSERT1(it != variables.end(), "Undefined variable " << name);
+ auto it = variables.find(name);
+ if (it == end(variables) && !name.compare(0, 4, "Old_")) it =
variables.find(name.substr(4));
+ GMM_ASSERT1(it != end(variables), "Undefined variable " << name);
return it;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r5413 - /trunk/getfem/src/getfem_models.cc,
andriy . andreykiv <=