Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: webrtc/base/versionparsing.cc

Issue 2373003002: Delete unused file versionparsing.h. (Closed)
Patch Set: Rebased. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/versionparsing.h ('k') | webrtc/base/versionparsing_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/versionparsing.cc
diff --git a/webrtc/base/versionparsing.cc b/webrtc/base/versionparsing.cc
deleted file mode 100644
index c3f982ff6ec561e8f5b95284da32d6d86a3859db..0000000000000000000000000000000000000000
--- a/webrtc/base/versionparsing.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2004 The WebRTC Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/base/versionparsing.h"
-
-#include <stdlib.h>
-
-namespace rtc {
-
-bool ParseVersionString(const std::string& version_str,
- int num_expected_segments,
- int version[]) {
- size_t pos = 0;
- for (int i = 0;;) {
- size_t dot_pos = version_str.find('.', pos);
- size_t n;
- if (dot_pos == std::string::npos) {
- // npos here is a special value meaning "to the end of the string"
- n = std::string::npos;
- } else {
- n = dot_pos - pos;
- }
-
- version[i] = atoi(version_str.substr(pos, n).c_str());
-
- if (++i >= num_expected_segments) break;
-
- if (dot_pos == std::string::npos) {
- // Previous segment was not terminated by a dot, but there's supposed to
- // be more segments, so that's an error.
- return false;
- }
- pos = dot_pos + 1;
- }
- return true;
-}
-
-int CompareVersions(const int version1[],
- const int version2[],
- int num_segments) {
- for (int i = 0; i < num_segments; ++i) {
- int diff = version1[i] - version2[i];
- if (diff != 0) {
- return diff;
- }
- }
- return 0;
-}
-
-} // namespace rtc
« no previous file with comments | « webrtc/base/versionparsing.h ('k') | webrtc/base/versionparsing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698