diff options
| author | Mason Reed <mason@vector35.com> | 2025-02-06 22:38:04 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-02-06 22:54:17 -0500 |
| commit | 1137ea1830042e8f57a98773b5b041e942b107ed (patch) | |
| tree | 457324629dd6d1e9cccf6aa22be774ed617e2cd3 | |
| parent | 610622698fe39dbcb406c7efa5154f7b183f5f4a (diff) | |
Fix double ref increment for misc Repository C++ APIs
Noticed these when reviewing the Rust Repository API
| -rw-r--r-- | pluginmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pluginmanager.cpp b/pluginmanager.cpp index 79eb5b58..3e3e2033 100644 --- a/pluginmanager.cpp +++ b/pluginmanager.cpp @@ -288,7 +288,7 @@ vector<Ref<RepoPlugin>> Repository::GetPlugins() const Ref<RepoPlugin> Repository::GetPluginByPath(const string& pluginPath) { - return new RepoPlugin(BNNewPluginReference(BNRepositoryGetPluginByPath(m_object, pluginPath.c_str()))); + return new RepoPlugin(BNRepositoryGetPluginByPath(m_object, pluginPath.c_str())); } string Repository::GetFullPath() const @@ -335,10 +335,10 @@ bool RepositoryManager::AddRepository(const std::string& url, Ref<Repository> RepositoryManager::GetRepositoryByPath(const std::string& repoPath) { - return new Repository(BNNewRepositoryReference(BNRepositoryGetRepositoryByPath(m_object, repoPath.c_str()))); + return new Repository(BNRepositoryGetRepositoryByPath(m_object, repoPath.c_str())); } Ref<Repository> RepositoryManager::GetDefaultRepository() { - return new Repository(BNNewRepositoryReference(BNRepositoryManagerGetDefaultRepository(m_object))); + return new Repository(BNRepositoryManagerGetDefaultRepository(m_object)); } |
