diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-03 17:02:58 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-03 17:02:58 -0500 |
commit | bea3673ae1b3d19585dec56e96dbcd8a56b96e6d (patch) | |
tree | c8ab07b8c69f90c053d6b60620b679216df011fc /lib/form.cpp | |
parent | e3d5d30956434732fa99d390f927906742bf7d85 (diff) | |
download | verbly-bea3673ae1b3d19585dec56e96dbcd8a56b96e6d.tar.gz verbly-bea3673ae1b3d19585dec56e96dbcd8a56b96e6d.tar.bz2 verbly-bea3673ae1b3d19585dec56e96dbcd8a56b96e6d.zip |
Renamed object join fields to prevent conflicts with class names
This was not a problem with clang but it caused compilation errors with gcc.
Diffstat (limited to 'lib/form.cpp')
-rw-r--r-- | lib/form.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/form.cpp b/lib/form.cpp index 4811f14..fe7d104 100644 --- a/lib/form.cpp +++ b/lib/form.cpp | |||
@@ -16,8 +16,8 @@ namespace verbly { | |||
16 | const field form::complexity = field::integerField(object::form, "complexity"); | 16 | const field form::complexity = field::integerField(object::form, "complexity"); |
17 | const field form::proper = field::booleanField(object::form, "proper"); | 17 | const field form::proper = field::booleanField(object::form, "proper"); |
18 | 18 | ||
19 | const field form::lemma = field::joinField(object::form, "form_id", object::lemma); | 19 | const field form::lemmas = field::joinField(object::form, "form_id", object::lemma); |
20 | const field form::pronunciation = field::joinThrough(object::form, "form_id", object::pronunciation, "forms_pronunciations", "pronunciation_id"); | 20 | const field form::pronunciations = field::joinThrough(object::form, "form_id", object::pronunciation, "forms_pronunciations", "pronunciation_id"); |
21 | 21 | ||
22 | form::form(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true) | 22 | form::form(const database& db, sqlite3_stmt* row) : db_(&db), valid_(true) |
23 | { | 23 | { |
@@ -36,7 +36,7 @@ namespace verbly { | |||
36 | 36 | ||
37 | if (!initializedPronunciations_) | 37 | if (!initializedPronunciations_) |
38 | { | 38 | { |
39 | pronunciations_ = db_->pronunciations(pronunciation::form %= *this, verbly::pronunciation::id, -1).all(); | 39 | pronunciations_ = db_->pronunciations(pronunciation::forms %= *this, pronunciation::id, -1).all(); |
40 | initializedPronunciations_ = true; | 40 | initializedPronunciations_ = true; |
41 | } | 41 | } |
42 | 42 | ||
@@ -50,10 +50,10 @@ namespace verbly { | |||
50 | throw std::domain_error("Bad access to uninitialized form"); | 50 | throw std::domain_error("Bad access to uninitialized form"); |
51 | } | 51 | } |
52 | 52 | ||
53 | const std::vector<verbly::pronunciation>& pronunciations = getPronunciations(); | 53 | const std::vector<pronunciation>& pronunciations = getPronunciations(); |
54 | if (!pronunciations.empty()) | 54 | if (!pronunciations.empty()) |
55 | { | 55 | { |
56 | return std::any_of(std::begin(pronunciations), std::end(pronunciations), [] (const verbly::pronunciation& p) { | 56 | return std::any_of(std::begin(pronunciations), std::end(pronunciations), [] (const pronunciation& p) { |
57 | return p.getPhonemes().front().find_first_of("012") != std::string::npos; | 57 | return p.getPhonemes().front().find_first_of("012") != std::string::npos; |
58 | }); | 58 | }); |
59 | } else { | 59 | } else { |