~ubuntu-branches/ubuntu/natty/clamav/natty-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/ADT/ValueMap.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-02 21:04:10 UTC
  • mfrom: (0.35.17 sid)
  • Revision ID: james.westby@ubuntu.com-20101202210410-ppgyckmylngsfa8o
Tags: 0.96.5+dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop initial signature definitions from clamav-base
  - Drop build-dep on electric-fence (in Universe)
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
  struct ExtraData {};
60
60
 
61
61
  template<typename ExtraDataT>
62
 
  static void onRAUW(const ExtraDataT &Data, KeyT Old, KeyT New) {}
 
62
  static void onRAUW(const ExtraDataT & /*Data*/, KeyT /*Old*/, KeyT /*New*/) {}
63
63
  template<typename ExtraDataT>
64
 
  static void onDelete(const ExtraDataT &Data, KeyT Old) {}
 
64
  static void onDelete(const ExtraDataT &/*Data*/, KeyT /*Old*/) {}
65
65
 
66
66
  /// Returns a mutex that should be acquired around any changes to the map.
67
67
  /// This is only acquired from the CallbackVH (and held around calls to onRAUW
68
68
  /// and onDelete) and not inside other ValueMap methods.  NULL means that no
69
69
  /// mutex is necessary.
70
70
  template<typename ExtraDataT>
71
 
  static sys::Mutex *getMutex(const ExtraDataT &Data) { return NULL; }
 
71
  static sys::Mutex *getMutex(const ExtraDataT &/*Data*/) { return NULL; }
72
72
};
73
73
 
74
74
/// See the file comment.
82
82
  typedef typename Config::ExtraData ExtraData;
83
83
  MapT Map;
84
84
  ExtraData Data;
 
85
  ValueMap(const ValueMap&); // DO NOT IMPLEMENT
 
86
  ValueMap& operator=(const ValueMap&); // DO NOT IMPLEMENT
85
87
public:
86
88
  typedef KeyT key_type;
87
89
  typedef ValueT mapped_type;
88
90
  typedef std::pair<KeyT, ValueT> value_type;
89
91
 
90
 
  ValueMap(const ValueMap& Other) : Map(Other.Map), Data(Other.Data) {}
91
 
 
92
92
  explicit ValueMap(unsigned NumInitBuckets = 64)
93
93
    : Map(NumInitBuckets), Data() {}
94
94
  explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64)
149
149
  bool erase(const KeyT &Val) {
150
150
    return Map.erase(Wrap(Val));
151
151
  }
152
 
  bool erase(iterator I) {
 
152
  void erase(iterator I) {
153
153
    return Map.erase(I.base());
154
154
  }
155
155
 
161
161
    return Map[Wrap(Key)];
162
162
  }
163
163
 
164
 
  ValueMap& operator=(const ValueMap& Other) {
165
 
    Map = Other.Map;
166
 
    Data = Other.Data;
167
 
    return *this;
168
 
  }
169
 
 
170
164
  /// isPointerIntoBucketsArray - Return true if the specified pointer points
171
165
  /// somewhere into the ValueMap's array of buckets (i.e. either to a key or
172
166
  /// value in the ValueMap).
250
244
  }
251
245
};
252
246
 
253
 
  
254
 
template<typename KeyT, typename ValueT, typename Config, typename ValueInfoT>
255
 
struct isPodLike<ValueMapCallbackVH<KeyT, ValueT, Config, ValueInfoT> > {
256
 
  static const bool value = true;
257
 
};
258
 
 
259
247
template<typename KeyT, typename ValueT, typename Config, typename ValueInfoT>
260
248
struct DenseMapInfo<ValueMapCallbackVH<KeyT, ValueT, Config, ValueInfoT> > {
261
249
  typedef ValueMapCallbackVH<KeyT, ValueT, Config, ValueInfoT> VH;