Sfoglia il codice sorgente

Added [] operators to cachefile
Author: jgg
Date: 1999-06-12 03:43:48 GMT
Added [] operators to cachefile

Arch Librarian 22 anni fa
parent
commit
b826eb9e01
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      apt-pkg/cachefile.h

+ 4 - 2
apt-pkg/cachefile.h

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: cachefile.h,v 1.1 1999/04/18 06:36:36 jgg Exp $
+// $Id: cachefile.h,v 1.2 1999/06/12 03:43:48 jgg Exp $
 /* ######################################################################
    
    CacheFile - Simple wrapper class for opening, generating and whatnot
@@ -35,7 +35,9 @@ class pkgCacheFile
    inline operator pkgDepCache &() {return *Cache;};
    inline pkgDepCache *operator ->() {return Cache;};
    inline pkgDepCache &operator *() {return *Cache;};
-
+   inline pkgDepCache::StateCache &operator [](pkgCache::PkgIterator const &I) {return (*Cache)[I];};
+   inline unsigned char &operator [](pkgCache::DepIterator const &I) {return (*Cache)[I];};
+   
    // Release the dpkg status lock
    inline void ReleaseLock() {Lock->Close();};