Fixed the order of #include's fixes, a subtle but present bug.

PiperOrigin-RevId: 501360403
This commit is contained in:
John Carroll
2023-01-11 13:16:19 -08:00
committed by Copybara-Service
parent d9f113e6e1
commit 3be5844fc3
2 changed files with 11 additions and 3 deletions
@@ -14,6 +14,14 @@
#include "internal/platform/implementation/windows/bluetooth_adapter.h"
// clang-format off
#include <windows.h> // These two headers must be defined
#include <winioctl.h> // first and in this order, otherwise
// the MSVC compiler emits a warning
// 'CTL_CODE undefined. Include winioctl.h or wdm.h'
// See https://screenshot.googleplex.com/BYB9QnoHT6eP6oc
// clang-format on
#include <bthdef.h>
#include <bthioctl.h>
#include <cfgmgr32.h>
@@ -23,8 +31,6 @@
#include <setupapi.h>
#include <stdio.h>
#include <usbiodef.h>
#include <windows.h> // These two headers must be defined
#include <winioctl.h> // first and in this order
#include <string>
@@ -15,8 +15,10 @@
#ifndef PLATFORM_IMPL_WINDOWS_BLUETOOTH_ADAPTER_H_
#define PLATFORM_IMPL_WINDOWS_BLUETOOTH_ADAPTER_H_
#include <guiddef.h>
// clang-format off
#include <windows.h>
#include <guiddef.h>
// clang-format on
#include <functional>
#include <optional>