Skip to content

Commit

Permalink
Merge branch '3.3.0' into modern_gl_330
Browse files Browse the repository at this point in the history
  • Loading branch information
sirjuddington committed Apr 20, 2024
2 parents 8808cc2 + c31f8a4 commit ea8bdbb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
17 changes: 17 additions & 0 deletions src/Archive/Archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,23 @@ shared_ptr<ArchiveEntry> Archive::addEntry(shared_ptr<ArchiveEntry> entry, unsig
return format_handler_->addEntry(*this, entry, position, dir);
}

// -----------------------------------------------------------------------------
// Adds [entry] to the end of the namespace matching [add_namespace].
// Returns the added entry or NULL if the entry is invalid
// -----------------------------------------------------------------------------
shared_ptr<ArchiveEntry> Archive::addEntry(shared_ptr<ArchiveEntry> entry, string_view add_namespace)
{
// Abort if read only
if (read_only_)
return nullptr;

// Check valid entry
if (!entry)
return nullptr;

return format_handler_->addEntry(*this, entry, add_namespace);
}

// -----------------------------------------------------------------------------
// Creates a new entry with [name] and adds it to [dir] at [position].
// If [dir] is null it is added to the root dir.
Expand Down
5 changes: 1 addition & 4 deletions src/Archive/Archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ class Archive
shared_ptr<ArchiveEntry> entry,
unsigned position = 0xFFFFFFFF,
ArchiveDir* dir = nullptr);
shared_ptr<ArchiveEntry> addEntry(shared_ptr<ArchiveEntry> entry, string_view add_namespace)
{
return addEntry(entry, 0xFFFFFFFF, nullptr);
} // By default, add to the 'global' namespace (ie root dir)
shared_ptr<ArchiveEntry> addEntry(shared_ptr<ArchiveEntry> entry, string_view add_namespace);
shared_ptr<ArchiveEntry> addNewEntry(
string_view name = "",
unsigned position = 0xFFFFFFFF,
Expand Down
1 change: 0 additions & 1 deletion src/Archive/ArchiveFormatHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ shared_ptr<ArchiveEntry> ArchiveFormatHandler::addEntry(

// -----------------------------------------------------------------------------
// Adds [entry] to the end of the namespace matching [add_namespace].
// If [copy] is true a copy of the entry is added.
// Returns the added entry or NULL if the entry is invalid
// -----------------------------------------------------------------------------
shared_ptr<ArchiveEntry> ArchiveFormatHandler::addEntry(
Expand Down

0 comments on commit ea8bdbb

Please sign in to comment.