Skip to content

Commit

Permalink
[LibWebRTC] Build fails with clang on Linux
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=269707

Reviewed by Youenn Fablet.

Remove duplicate fromStdString() implementations.

* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
(WebCore::LibWebRTCCertificateGenerator::fromStdString): Deleted.
* Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::fromStdString): Deleted.

Canonical link: https://commits.webkit.org/274980@main
  • Loading branch information
philn committed Feb 19, 2024
1 parent b24a216 commit 4278c2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include "LibWebRTCMacros.h"
#include "LibWebRTCProvider.h"
#include "LibWebRTCUtils.h"
#include "RTCCertificate.h"

ALLOW_UNUSED_PARAMETERS_BEGIN
Expand All @@ -45,11 +46,6 @@ namespace WebCore {

namespace LibWebRTCCertificateGenerator {

static inline String fromStdString(const std::string& value)
{
return String::fromUTF8(value.data(), value.length());
}

class RTCCertificateGeneratorCallbackWrapper : public ThreadSafeRefCounted<RTCCertificateGeneratorCallbackWrapper, WTF::DestructionThread::Main> {
public:
static Ref<RTCCertificateGeneratorCallbackWrapper> create(Ref<SecurityOrigin>&& origin, Function<void(ExceptionOr<Ref<RTCCertificate>>&&)>&& resultCallback)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "ContentType.h"
#include "LibWebRTCAudioModule.h"
#include "LibWebRTCUtils.h"
#include "Logging.h"
#include "MediaCapabilitiesDecodingInfo.h"
#include "MediaCapabilitiesEncodingInfo.h"
Expand Down Expand Up @@ -426,11 +427,6 @@ static inline std::optional<cricket::MediaType> typeFromKind(const String& kind)
return { };
}

static inline String fromStdString(const std::string& value)
{
return String::fromUTF8(value.data(), value.length());
}

static inline std::optional<uint16_t> toChannels(absl::optional<int> numChannels)
{
if (!numChannels)
Expand Down

0 comments on commit 4278c2f

Please sign in to comment.