Skip to content

Commit 788dea5

Browse files
authored
Eliminate std::string using directive (flutter#7433)
Eliminates a using std::string directive that conflicts with a Google-internal using directive in base libs. This applies a small subset of an upstream Minikin patch.
1 parent cd98f6b commit 788dea5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

third_party/txt/src/minikin/Layout.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
#include "LayoutUtils.h"
4242
#include "MinikinInternal.h"
4343

44-
using std::string;
45-
using std::vector;
46-
4744
namespace minikin {
4845

4946
const int kDirection_Mask = 0x1;
@@ -745,7 +742,8 @@ float Layout::doLayoutWord(const uint16_t* buf,
745742
return advance;
746743
}
747744

748-
static void addFeatures(const string& str, vector<hb_feature_t>* features) {
745+
static void addFeatures(const std::string& str,
746+
std::vector<hb_feature_t>* features) {
749747
if (!str.size())
750748
return;
751749

@@ -925,10 +923,10 @@ void Layout::doLayoutRun(const uint16_t* buf,
925923
LayoutContext* ctx,
926924
const std::shared_ptr<FontCollection>& collection) {
927925
hb_buffer_t* buffer = LayoutEngine::getInstance().hbBuffer;
928-
vector<FontCollection::Run> items;
926+
std::vector<FontCollection::Run> items;
929927
collection->itemize(buf + start, count, ctx->style, &items);
930928

931-
vector<hb_feature_t> features;
929+
std::vector<hb_feature_t> features;
932930
// Disable default-on non-required ligature features if letter-spacing
933931
// See http://dev.w3.org/csswg/css-text-3/#letter-spacing-property
934932
// "When the effective spacing between two characters is not zero (due to

0 commit comments

Comments
 (0)