fix: -Wunsafe-buffer-usage warnings in AddComponentResourceEntries() (#44031)
fix: -Wunsafe-buffer-usage warnings in ElectronComponentExtensionResourceManager::AddComponentResourceEntries() just replace pointer-and-length args with a span Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
c8788f8217
commit
e019b37231
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