mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
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.
This commit is contained in:
parent
0c0999e9a8
commit
2e2521a4cf
2 changed files with 3 additions and 4 deletions
|
@ -1292,9 +1292,9 @@ bool A3::is_attr (Nibbler& n, Arg& arg)
|
||||||
// therefore not stored.
|
// therefore not stored.
|
||||||
|
|
||||||
// I suspect this is auto-vivifying context.columns["limit"]. Bugger.
|
// I suspect this is auto-vivifying context.columns["limit"]. Bugger.
|
||||||
Column* col = context.columns[name];
|
std::map<std::string, Column*>::iterator i = context.columns.find (name);
|
||||||
if (col)
|
if (i != context.columns.end ())
|
||||||
arg._type = Arg::type_id (col->type ());
|
arg._type = Arg::type_id (i->second->type ());
|
||||||
else
|
else
|
||||||
arg._type = Arg::type_pseudo;
|
arg._type = Arg::type_pseudo;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#define L10N // Localization complete.
|
#define L10N // Localization complete.
|
||||||
|
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue