diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-10 11:24:21 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-02-10 11:24:21 -0500 |
commit | 4208387c4a6b7ecf43d756a8bba96b9cfc5227b9 (patch) | |
tree | 30dc35cbd305f0743ca03cae0509ff315d90a012 | |
parent | f1f67e62cebb4144f0599196263cd93b41fa972e (diff) | |
download | verbly-4208387c4a6b7ecf43d756a8bba96b9cfc5227b9.tar.gz verbly-4208387c4a6b7ecf43d756a8bba96b9cfc5227b9.tar.bz2 verbly-4208387c4a6b7ecf43d756a8bba96b9cfc5227b9.zip |
Renamed object validity checks
The bool conversion operator was unfortunately Very Confusing so I've just renamed the methods to isValid.
-rw-r--r-- | lib/form.h | 2 | ||||
-rw-r--r-- | lib/frame.h | 2 | ||||
-rw-r--r-- | lib/notion.h | 2 | ||||
-rw-r--r-- | lib/part.h | 2 | ||||
-rw-r--r-- | lib/pronunciation.h | 2 | ||||
-rw-r--r-- | lib/word.cpp | 2 | ||||
-rw-r--r-- | lib/word.h | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/lib/form.h b/lib/form.h index fe0886c..f501ed2 100644 --- a/lib/form.h +++ b/lib/form.h | |||
@@ -28,7 +28,7 @@ namespace verbly { | |||
28 | 28 | ||
29 | // Accessors | 29 | // Accessors |
30 | 30 | ||
31 | operator bool() const | 31 | bool isValid() const |
32 | { | 32 | { |
33 | return valid_; | 33 | return valid_; |
34 | } | 34 | } |
diff --git a/lib/frame.h b/lib/frame.h index e049584..dfe67c0 100644 --- a/lib/frame.h +++ b/lib/frame.h | |||
@@ -26,7 +26,7 @@ namespace verbly { | |||
26 | 26 | ||
27 | // Accessors | 27 | // Accessors |
28 | 28 | ||
29 | operator bool() const | 29 | bool isValid() const |
30 | { | 30 | { |
31 | return valid_; | 31 | return valid_; |
32 | } | 32 | } |
diff --git a/lib/notion.h b/lib/notion.h index 4fd3396..69f5cef 100644 --- a/lib/notion.h +++ b/lib/notion.h | |||
@@ -25,7 +25,7 @@ namespace verbly { | |||
25 | 25 | ||
26 | // Accessors | 26 | // Accessors |
27 | 27 | ||
28 | operator bool() const | 28 | bool isValid() const |
29 | { | 29 | { |
30 | return valid_; | 30 | return valid_; |
31 | } | 31 | } |
diff --git a/lib/part.h b/lib/part.h index 450db3d..456bad0 100644 --- a/lib/part.h +++ b/lib/part.h | |||
@@ -62,7 +62,7 @@ namespace verbly { | |||
62 | 62 | ||
63 | // General accessors | 63 | // General accessors |
64 | 64 | ||
65 | operator bool() const | 65 | bool isValid() const |
66 | { | 66 | { |
67 | return (type_ != part_type::invalid); | 67 | return (type_ != part_type::invalid); |
68 | } | 68 | } |
diff --git a/lib/pronunciation.h b/lib/pronunciation.h index 1162360..4723143 100644 --- a/lib/pronunciation.h +++ b/lib/pronunciation.h | |||
@@ -28,7 +28,7 @@ namespace verbly { | |||
28 | 28 | ||
29 | // Accessors | 29 | // Accessors |
30 | 30 | ||
31 | operator bool() const | 31 | bool isValid() const |
32 | { | 32 | { |
33 | return valid_; | 33 | return valid_; |
34 | } | 34 | } |
diff --git a/lib/word.cpp b/lib/word.cpp index 4dea569..e4de187 100644 --- a/lib/word.cpp +++ b/lib/word.cpp | |||
@@ -74,7 +74,7 @@ namespace verbly { | |||
74 | throw std::domain_error("Bad access to uninitialized word"); | 74 | throw std::domain_error("Bad access to uninitialized word"); |
75 | } | 75 | } |
76 | 76 | ||
77 | if (!notion_) | 77 | if (!notion_.isValid()) |
78 | { | 78 | { |
79 | notion_ = db_->notions(notion::id == notionId_).first(); | 79 | notion_ = db_->notions(notion::id == notionId_).first(); |
80 | } | 80 | } |
diff --git a/lib/word.h b/lib/word.h index a16319d..dd72c39 100644 --- a/lib/word.h +++ b/lib/word.h | |||
@@ -28,7 +28,7 @@ namespace verbly { | |||
28 | 28 | ||
29 | // Accessors | 29 | // Accessors |
30 | 30 | ||
31 | operator bool() const | 31 | bool isValid() const |
32 | { | 32 | { |
33 | return valid_; | 33 | return valid_; |
34 | } | 34 | } |