Skip to content

Commit

Permalink
fix: all unit test in Windows platform pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Nov 19, 2024
1 parent 4f34f8d commit 07169f2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bridge/foundation/string_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
#ifndef WEBF_FOUNDATION_STRING_BUILDER_H_
#define WEBF_FOUNDATION_STRING_BUILDER_H_

#include <cstdarg>
#include <codecvt>
#include <string>
#include <sstream>
#include <cstdarg>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include "foundation/dtoa.h"
#include "foundation/macros.h"
#include "foundation/string_view.h"

#include <logging.h>

namespace webf {

/**
Expand Down Expand Up @@ -99,13 +101,13 @@ class StringBuilder {
// a Text node.
const char* impl = view.data();
if (!length_ && !HasBuffer() && impl != nullptr) {
string_ = impl;
string_ = std::string(impl, view.length());
length_ = view.length();
return;
}

EnsureBuffer8(view.length());
string_.append(view);
string_.append(std::string(view.data(), view.length()));
length_ += view.length();
}

Expand Down

0 comments on commit 07169f2

Please sign in to comment.