[snapshot][cleanup] Using 'using' instead of 'typedef'

Even though both are allowed in the style guide, it recommends to use
'using', as its syntax is more consistent with the rest of C++.
This CL turns all typedefs in src/snapshot to 'using' declarations.

R=jgruber@chromium.org

Bug: v8:8834
Change-Id: Ie555e9ac7e1ec04c20d411647f8ab70f671c1cb2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545903
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60699}
This commit is contained in:
Clemens Hammacher 2019-04-09 12:19:19 +02:00 committed by Commit Bot
parent ede4557491
commit 6dcccf8d4a
3 changed files with 3 additions and 4 deletions

View File

@ -246,7 +246,7 @@ void WriteEmbeddedFile(i::EmbeddedFileWriter* writer) {
writer->WriteEmbedded(&embedded_blob);
}
typedef std::map<std::string, int> CounterMap;
using CounterMap = std::map<std::string, int>;
CounterMap* counter_map_ = nullptr;
void MaybeSetCounterFunction(v8::Isolate* isolate) {

View File

@ -39,8 +39,7 @@ class V8_EXPORT_PRIVATE NativesCollection {
static Vector<const char> GetScriptsSource();
};
typedef NativesCollection<EXTRAS> ExtraNatives;
using ExtraNatives = NativesCollection<EXTRAS>;
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
// Used for reading the natives at runtime. Implementation in natives-empty.cc

View File

@ -154,7 +154,7 @@ class SerializerReferenceMap
base::KeyEqualityMatcher<intptr_t>,
base::DefaultAllocationPolicy> {
public:
typedef base::TemplateHashMapEntry<uintptr_t, SerializerReference> Entry;
using Entry = base::TemplateHashMapEntry<uintptr_t, SerializerReference>;
SerializerReferenceMap() : attached_reference_index_(0) {}