diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-08-17 11:19:04 -0400 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-08-17 11:19:04 -0400 |
commit | 239183cfe675684aeca1a2b24362ca5e0a82809d (patch) | |
tree | 86884976c8a87a67050584a4610557a5a70d872e /sim/param.cc | |
parent | ac8b01db7101e8990ae93c87c6a09ee978732175 (diff) | |
download | gem5-239183cfe675684aeca1a2b24362ca5e0a82809d.tar.xz |
Fix a small bug in parameter processing that would always result
in at least on entry in a VectorParam even if the string was
empty.
sim/param.cc:
if there are no parameters, leave the vector empty.
--HG--
extra : convert_revision : d0d41baa8c77651a27ac6a4d02cc388711f47dbe
Diffstat (limited to 'sim/param.cc')
-rw-r--r-- | sim/param.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/param.cc b/sim/param.cc index 4f9d0a577..84ecbf8f9 100644 --- a/sim/param.cc +++ b/sim/param.cc @@ -211,6 +211,11 @@ template <class T> void VectorParam<T>::parse(const string &s) { + if (s.empty()) { + wasSet = true; + return; + } + vector<string> tokens; tokenize(tokens, s, ' '); |