diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-16 20:02:36 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-16 20:02:36 -0500 |
commit | 824b4b580adeea161be89a8aa114fabb794fb4ce (patch) | |
tree | 13fcd339f41c0316581fbe211d6ba8c0ac9c1f3d | |
parent | a354b1f864523e9def80aa1b3a561bce6bdb05ab (diff) | |
download | verbly-824b4b580adeea161be89a8aa114fabb794fb4ce.tar.gz verbly-824b4b580adeea161be89a8aa114fabb794fb4ce.tar.bz2 verbly-824b4b580adeea161be89a8aa114fabb794fb4ce.zip |
Fixed weird filter normalization crash
-rw-r--r-- | lib/filter.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/filter.cpp b/lib/filter.cpp index c201618..1472eeb 100644 --- a/lib/filter.cpp +++ b/lib/filter.cpp | |||
@@ -653,7 +653,7 @@ namespace verbly { | |||
653 | { | 653 | { |
654 | new(&singleton_.filterField) field(std::move(joinOn)); | 654 | new(&singleton_.filterField) field(std::move(joinOn)); |
655 | singleton_.filterType = filterType; | 655 | singleton_.filterType = filterType; |
656 | new(&singleton_.join) std::unique_ptr<filter>(new filter(joinCondition.normalize(singleton_.filterField.getJoinObject()))); | 656 | new(&singleton_.join) std::unique_ptr<filter>(new filter(std::move(joinCondition))); |
657 | 657 | ||
658 | break; | 658 | break; |
659 | } | 659 | } |
@@ -692,7 +692,7 @@ namespace verbly { | |||
692 | { | 692 | { |
693 | new(&singleton_.filterField) field(std::move(joinOn)); | 693 | new(&singleton_.filterField) field(std::move(joinOn)); |
694 | singleton_.filterType = filterType; | 694 | singleton_.filterType = filterType; |
695 | new(&singleton_.join) std::unique_ptr<filter>(new filter(joinCondition.normalize(singleton_.filterField.getObject()))); | 695 | new(&singleton_.join) std::unique_ptr<filter>(new filter(std::move(joinCondition))); |
696 | 696 | ||
697 | break; | 697 | break; |
698 | } | 698 | } |
@@ -1275,7 +1275,7 @@ namespace verbly { | |||
1275 | case object::form: | 1275 | case object::form: |
1276 | case object::pronunciation: | 1276 | case object::pronunciation: |
1277 | { | 1277 | { |
1278 | return (verbly::notion::words %= *this); | 1278 | return (verbly::notion::words %= normalize(object::word)); |
1279 | } | 1279 | } |
1280 | } | 1280 | } |
1281 | } | 1281 | } |
@@ -1286,7 +1286,7 @@ namespace verbly { | |||
1286 | { | 1286 | { |
1287 | case object::notion: | 1287 | case object::notion: |
1288 | { | 1288 | { |
1289 | return (verbly::word::notions %= *this); | 1289 | return (verbly::word::notions %= normalize(object::notion)); |
1290 | } | 1290 | } |
1291 | 1291 | ||
1292 | case object::undefined: | 1292 | case object::undefined: |
@@ -1298,13 +1298,13 @@ namespace verbly { | |||
1298 | case object::frame: | 1298 | case object::frame: |
1299 | case object::part: | 1299 | case object::part: |
1300 | { | 1300 | { |
1301 | return (verbly::word::frames %= *this); | 1301 | return (verbly::word::frames %= normalize(object::frame)); |
1302 | } | 1302 | } |
1303 | 1303 | ||
1304 | case object::form: | 1304 | case object::form: |
1305 | case object::pronunciation: | 1305 | case object::pronunciation: |
1306 | { | 1306 | { |
1307 | return (verbly::word::forms(inflection::base) %= *this); | 1307 | return (verbly::word::forms(inflection::base) %= normalize(object::form)); |
1308 | } | 1308 | } |
1309 | } | 1309 | } |
1310 | 1310 | ||
@@ -1323,12 +1323,12 @@ namespace verbly { | |||
1323 | case object::form: | 1323 | case object::form: |
1324 | case object::pronunciation: | 1324 | case object::pronunciation: |
1325 | { | 1325 | { |
1326 | return (verbly::frame::words %= *this); | 1326 | return (verbly::frame::words %= normalize(object::word)); |
1327 | } | 1327 | } |
1328 | 1328 | ||
1329 | case object::part: | 1329 | case object::part: |
1330 | { | 1330 | { |
1331 | return (verbly::frame::parts() %= *this); | 1331 | return (verbly::frame::parts() %= normalize(object::part)); |
1332 | } | 1332 | } |
1333 | } | 1333 | } |
1334 | } | 1334 | } |
@@ -1349,7 +1349,7 @@ namespace verbly { | |||
1349 | case object::form: | 1349 | case object::form: |
1350 | case object::pronunciation: | 1350 | case object::pronunciation: |
1351 | { | 1351 | { |
1352 | return (verbly::part::frames %= *this); | 1352 | return (verbly::part::frames %= normalize(object::frame)); |
1353 | } | 1353 | } |
1354 | } | 1354 | } |
1355 | } | 1355 | } |
@@ -1363,7 +1363,7 @@ namespace verbly { | |||
1363 | case object::frame: | 1363 | case object::frame: |
1364 | case object::part: | 1364 | case object::part: |
1365 | { | 1365 | { |
1366 | return verbly::form::words(inflection::base) %= *this; | 1366 | return (verbly::form::words(inflection::base) %= normalize(object::word)); |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | case object::undefined: | 1369 | case object::undefined: |
@@ -1374,7 +1374,7 @@ namespace verbly { | |||
1374 | 1374 | ||
1375 | case object::pronunciation: | 1375 | case object::pronunciation: |
1376 | { | 1376 | { |
1377 | return (verbly::form::pronunciations %= *this); | 1377 | return (verbly::form::pronunciations %= normalize(object::pronunciation)); |
1378 | } | 1378 | } |
1379 | } | 1379 | } |
1380 | } | 1380 | } |
@@ -1389,7 +1389,7 @@ namespace verbly { | |||
1389 | case object::part: | 1389 | case object::part: |
1390 | case object::form: | 1390 | case object::form: |
1391 | { | 1391 | { |
1392 | return verbly::pronunciation::forms %= *this; | 1392 | return verbly::pronunciation::forms %= normalize(object::form); |
1393 | } | 1393 | } |
1394 | 1394 | ||
1395 | case object::undefined: | 1395 | case object::undefined: |
@@ -1549,7 +1549,7 @@ namespace verbly { | |||
1549 | } | 1549 | } |
1550 | } | 1550 | } |
1551 | 1551 | ||
1552 | if (group_.children.empty()) | 1552 | if (result.group_.children.empty()) |
1553 | { | 1553 | { |
1554 | result = {}; | 1554 | result = {}; |
1555 | } | 1555 | } |