mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibCore: Make DirIterator take String instead of StringView
This commit is contained in:
parent
0e4eb62dd8
commit
510aad6515
Notes:
sideshowbarker
2024-07-18 19:32:34 +09:00
Author: https://github.com/awesomekling
Commit: 510aad6515
2 changed files with 4 additions and 4 deletions
|
@ -31,11 +31,11 @@
|
|||
|
||||
namespace Core {
|
||||
|
||||
DirIterator::DirIterator(const StringView& path, Flags flags)
|
||||
: m_path(path)
|
||||
DirIterator::DirIterator(String path, Flags flags)
|
||||
: m_path(move(path))
|
||||
, m_flags(flags)
|
||||
{
|
||||
m_dir = opendir(path.to_string().characters());
|
||||
m_dir = opendir(m_path.characters());
|
||||
if (!m_dir) {
|
||||
m_error = errno;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
SkipParentAndBaseDir = 0x2,
|
||||
};
|
||||
|
||||
DirIterator(const StringView& path, Flags = Flags::NoFlags);
|
||||
explicit DirIterator(String path, Flags = Flags::NoFlags);
|
||||
~DirIterator();
|
||||
|
||||
bool has_error() const { return m_error != 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue