aboutsummaryrefslogtreecommitdiff
path: root/c/pl.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-30 00:23:51 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-30 00:23:51 +0200
commit8e7ce9d430b439995ceddca2c4fb9e24ed323d3a (patch)
tree15c6b856e304db5c097cf67f52f85160adce82e9 /c/pl.cpp
parentbabbd4c9c26d997683280ac663e03b04910b2826 (diff)
downloadEpisodeBrowser-8e7ce9d430b439995ceddca2c4fb9e24ed323d3a.tar.gz
Add non-throwing variants of Query methods.
Pl has also been refactored, so that the unnecessary throw and catch have been removed.
Diffstat (limited to 'c/pl.cpp')
-rw-r--r--c/pl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/c/pl.cpp b/c/pl.cpp
index 6e71383..665fe3a 100644
--- a/c/pl.cpp
+++ b/c/pl.cpp
@@ -55,6 +55,10 @@ Query::~Query()
PL_cut_query(m_q);
}
+int Query::Cut(std::nothrow_t)
+{
+ return PL_cut_query(m_q);
+}
int Query::Cut()
{
if (PL_cut_query(m_q)) return 1;
@@ -63,6 +67,10 @@ int Query::Cut()
}
/* Cut query and invalidate associated data. */
+int Query::Close(std::nothrow_t)
+{
+ return PL_close_query(m_q);
+}
int Query::Close()
{
if (PL_close_query(m_q)) return 1;
@@ -70,6 +78,10 @@ int Query::Close()
return 0;
}
+int Query::NextSolution(std::nothrow_t)
+{
+ return PL_next_solution(m_q);
+}
int Query::NextSolution()
{
if (PL_next_solution(m_q)) return 1;