Skip to content

Commit

Permalink
Normalize vector index numbers. Fix for #53
Browse files Browse the repository at this point in the history
  • Loading branch information
xvxx committed Apr 21, 2019
1 parent 775a50d commit 92790cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ldpl_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ofstream file_writing_stream;
string file_loading_line;
string joinvar;
//Forward declarations
string to_ldpl_string(double x);
template<typename T>
struct ldpl_vector {
unordered_map<string, T> inner_map;
Expand All @@ -32,7 +35,7 @@ struct ldpl_vector {
}
T& operator [] (ldpl_number i) {
return inner_map[to_string(i)];
return inner_map[to_ldpl_string(i)];
}
};
Expand Down

0 comments on commit 92790cf

Please sign in to comment.