diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-30 00:23:51 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-30 00:23:51 +0200 |
commit | 8e7ce9d430b439995ceddca2c4fb9e24ed323d3a (patch) | |
tree | 15c6b856e304db5c097cf67f52f85160adce82e9 /c/pl.cpp | |
parent | babbd4c9c26d997683280ac663e03b04910b2826 (diff) | |
download | EpisodeBrowser-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.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; |