From 6be01a12db23788c32ca8cc8e70b8467ae912d1d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 00:44:00 -0700 Subject: [vcpkg] Refactored to simplify BuildPolicies into BuildPolicy. Restrict policy consumers to a simpler interface than std::map. Rename vcpkg::getMachineType -> vcpkg::to_machine_type. --- toolsrc/src/coff_file_reader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toolsrc/src/coff_file_reader.cpp') 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(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(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(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); -- cgit v1.2.3