lib/expat/ExpatParser: pass std::string_view to Parse()

This commit is contained in:
Max Kellermann
2024-01-04 12:58:20 +01:00
parent 4c9942534c
commit ee4b49d12f
9 changed files with 18 additions and 24 deletions

View File

@@ -216,8 +216,8 @@ protected:
};
void
UPnPDirContent::Parse(const char *input)
UPnPDirContent::Parse(std::string_view input)
{
UPnPDirParser parser(*this);
parser.Parse(input, strlen(input), true);
parser.Parse(input, true);
}

View File

@@ -1,12 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_UPNP_DIRECTORY_HXX
#define MPD_UPNP_DIRECTORY_HXX
#pragma once
#include "Object.hxx"
#include <string>
#include <string_view>
#include <vector>
/**
@@ -44,7 +43,5 @@ public:
* actually global, nothing really bad will happen if you mix
* up...
*/
void Parse(const char *didltext);
void Parse(std::string_view didltext);
};
#endif /* _UPNPDIRCONTENT_H_X_INCLUDED_ */