From 8caac813906fcf91ebf89262f82ac4f48a884699 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 13 Oct 2021 11:47:51 -0400 Subject: [PATCH] Delete definition of GetOsVersion() I deleted the declaration of this function in https://webrtc-review.googlesource.com/c/src/+/234160 but forgot to delete the definition. This now actually happens to remove one call to GetVersionEx. No behavior change. Bug: chromium:1255114 Change-Id: I65b61a362da9b6d41c16a9da23781d5a1ccf885f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235080 Reviewed-by: Mirko Bonadei Commit-Queue: Nico Weber Cr-Commit-Position: refs/heads/main@{#35196} --- rtc_base/win32.cc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/rtc_base/win32.cc b/rtc_base/win32.cc index 8d8fe27369..b44e513026 100644 --- a/rtc_base/win32.cc +++ b/rtc_base/win32.cc @@ -311,28 +311,4 @@ int inet_pton_v6(const char* src, void* dst) { return 1; } -// Windows UWP applications cannot obtain versioning information from -// the sandbox with intention (as behehaviour based on OS versioning rather -// than feature discovery / compilation flags is discoraged and Windows -// 10 is living continously updated version unlike previous versions -// of Windows). -#if !defined(WINUWP) - -bool GetOsVersion(int* major, int* minor, int* build) { - OSVERSIONINFO info = {0}; - info.dwOSVersionInfoSize = sizeof(info); - if (GetVersionEx(&info)) { - if (major) - *major = info.dwMajorVersion; - if (minor) - *minor = info.dwMinorVersion; - if (build) - *build = info.dwBuildNumber; - return true; - } - return false; -} - -#endif // !defined(WINUWP) - } // namespace rtc