diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-05-24 00:44:00 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-05-24 00:44:00 -0700 |
| commit | 6be01a12db23788c32ca8cc8e70b8467ae912d1d (patch) | |
| tree | 20733eb131d185a917aa40a6b6830549dfa90a01 /toolsrc/src/coff_file_reader.cpp | |
| parent | e9b561fa4809a027089da0a726ebcd80a0043294 (diff) | |
| download | vcpkg-6be01a12db23788c32ca8cc8e70b8467ae912d1d.tar.gz vcpkg-6be01a12db23788c32ca8cc8e70b8467ae912d1d.zip | |
[vcpkg] Refactored to simplify BuildPolicies into BuildPolicy.
Restrict policy consumers to a simpler interface than std::map.
Rename vcpkg::getMachineType -> vcpkg::to_machine_type.
Diffstat (limited to 'toolsrc/src/coff_file_reader.cpp')
| -rw-r--r-- | toolsrc/src/coff_file_reader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index 467fc9a64..b06c6d57b 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -87,7 +87,7 @@ namespace vcpkg::COFFFileReader std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const uint16_t machine = reinterpret_bytes<uint16_t>(machine_field_as_string.c_str()); - return getMachineType(machine); + return to_machine_type(machine); } private: @@ -210,7 +210,7 @@ namespace vcpkg::COFFFileReader std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const uint16_t machine = reinterpret_bytes<uint16_t>(machine_field_as_string.c_str()); - return getMachineType(machine); + return to_machine_type(machine); } private: @@ -297,7 +297,7 @@ namespace vcpkg::COFFFileReader marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. marker.seek_to_marker(fs); const uint16_t first_two_bytes = peek_value_from_stream<uint16_t>(fs); - const bool isImportHeader = getMachineType(first_two_bytes) == MachineType::UNKNOWN; + const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; const MachineType machine = isImportHeader ? ImportHeader::read(fs).machineType() : CoffFileHeader::read(fs).machineType(); machine_types.insert(machine); |
