From 2e2521a4cf392421c913cb7026603e3387f31c01 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 31 Dec 2011 11:00:30 -0500 Subject: [PATCH] Bug #892 - Possible fix for bug #892, which I cannot replicate anyway. This fix involves testing my suspicion that std::map autovivifies via std::map::operator[], which is not nice. Will ask Dmitriy to confirm. --- src/A3.cpp | 6 +++--- src/columns/Column.cpp | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/A3.cpp b/src/A3.cpp index d72338b43..eaca05f29 100644 --- a/src/A3.cpp +++ b/src/A3.cpp @@ -1292,9 +1292,9 @@ bool A3::is_attr (Nibbler& n, Arg& arg) // therefore not stored. // I suspect this is auto-vivifying context.columns["limit"]. Bugger. - Column* col = context.columns[name]; - if (col) - arg._type = Arg::type_id (col->type ()); + std::map::iterator i = context.columns.find (name); + if (i != context.columns.end ()) + arg._type = Arg::type_id (i->second->type ()); else arg._type = Arg::type_pseudo; diff --git a/src/columns/Column.cpp b/src/columns/Column.cpp index 4bb9358d3..822c5589f 100644 --- a/src/columns/Column.cpp +++ b/src/columns/Column.cpp @@ -25,7 +25,6 @@ // //////////////////////////////////////////////////////////////////////////////// - #define L10N // Localization complete. #include