File: 0003-do-not-use-absl-any.patch

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (64 lines) | stat: -rw-r--r-- 2,440 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 690b61c7627db0a839a9345075b65b6b618eff99 Mon Sep 17 00:00:00 2001
From: Robert Ogden <robertogden@chromium.org>
Date: Wed, 30 Nov 2022 10:24:10 -0800
Subject: [PATCH 03/11] do not use absl any

---
 .../cc/task/vision/core/frame_buffer.h        | 27 -------------------
 1 file changed, 27 deletions(-)

diff --git a/third_party/tflite_support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h b/third_party/tflite_support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
index ed44a1cae05b6..0a888f18d4d00 100644
--- a/third_party/tflite_support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
+++ b/third_party/tflite_support/src/tensorflow_lite_support/cc/task/vision/core/frame_buffer.h
@@ -28,7 +28,6 @@ limitations under the License.
 #include "absl/strings/str_cat.h"  // from @com_google_absl
 #include "absl/time/clock.h"  // from @com_google_absl
 #include "absl/time/time.h"  // from @com_google_absl
-#include "absl/types/any.h"  // from @com_google_absl
 #include "absl/types/optional.h"  // from @com_google_absl
 #include "tensorflow_lite_support/cc/port/statusor.h"
 
@@ -277,31 +276,6 @@ class FrameBuffer {
     return {};
   }
 
-  // Returns the tag associated to the tag_key.
-  absl::any GetTag(const std::string& tag_key) const {
-    auto iter = tags_.find(tag_key);
-    if (iter != tags_.end()) {
-      return iter->second;
-    }
-    return absl::any();
-  }
-
-  // Inserts or updates the tags map with key value pair (tag_key, tag_value).
-  void InsertOrUpdateTag(const std::string& tag_key, absl::any tag_value) {
-    tags_[tag_key] = std::move(tag_value);
-  }
-
-  // Inserts the key value pair (tag_key, tag_value) into tags map. If the
-  // tag_key already exists, an internal error will return.
-  absl::Status InsertTag(const std::string& tag_key, absl::any tag_value) {
-    auto iter = tags_.emplace(tag_key, tag_value);
-    if (iter.second) {
-      return absl::OkStatus();
-    }
-    return absl::InternalError(absl::StrCat(
-        "tag_key already exists in tags.tag_key was not inserted: ", tag_key));
-  }
-
   // Returns FrameBuffer dimension.
   const Dimension dimension() const { return dimension_; }
 
@@ -316,7 +290,6 @@ class FrameBuffer {
 
  private:
   std::vector<Plane> planes_;
-  std::map<std::string, absl::any> tags_;
   Dimension dimension_;
   Format format_;
   Orientation orientation_;
-- 
2.49.0.777.g153de2bbd5-goog