diff options
| author | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-02-22 20:40:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-22 20:40:28 -0800 |
| commit | 017349bdbe171c66974a5835f2f74f76138386ea (patch) | |
| tree | 2e81f92e683f4b1d12c129360c788e0e52217d82 /plugins/warp/api/warp.cpp | |
| parent | e2e420c91147f2a83cf59b37c973f57e209ef67a (diff) | |
[WARP] Allow containers to be constructed programmatically (#7952)
Diffstat (limited to 'plugins/warp/api/warp.cpp')
| -rw-r--r-- | plugins/warp/api/warp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/warp/api/warp.cpp b/plugins/warp/api/warp.cpp index f6106605..c051e3c7 100644 --- a/plugins/warp/api/warp.cpp +++ b/plugins/warp/api/warp.cpp @@ -246,6 +246,14 @@ std::vector<Ref<Container> > Container::All() return result; } +Ref<Container> Container::Add(const std::string &name) +{ + BNWARPContainer *result = BNWARPAddContainer(name.c_str()); + if (!result) + return nullptr; + return new Container(result); +} + std::string Container::GetName() const { char *rawName = BNWARPContainerGetName(m_object); |
