fix: -Wunsafe-buffer-usage warnings in AddComponentResourceEntries() (#44024)
fix: -Wunsafe-buffer-usage warnings in ElectronComponentExtensionResourceManager::AddComponentResourceEntries() just replace pointer-and-length args with a span
This commit is contained in:
parent
77f7ba96ca
commit
1d4b86cb3e
2 changed files with 10 additions and 12 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "extensions/browser/component_extension_resource_manager.h"
|
||||
#include "ui/base/webui/resource_path.h"
|
||||
|
@ -38,8 +39,8 @@ class ElectronComponentExtensionResourceManager
|
|||
const std::string& extension_id) const override;
|
||||
|
||||
private:
|
||||
void AddComponentResourceEntries(const webui::ResourcePath* entries,
|
||||
size_t size);
|
||||
void AddComponentResourceEntries(
|
||||
base::span<const webui::ResourcePath> entries);
|
||||
|
||||
// A map from a resource path to the resource ID. Used by
|
||||
// IsComponentExtensionResource.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue