dasher r3472 - in trunk: . Src/DasherCore/Alphabet



Author: alarson
Date: Sat Mar 22 16:30:03 2008
New Revision: 3472
URL: http://svn.gnome.org/viewvc/dasher?rev=3472&view=rev

Log:
Remove inappropriate assert from alphabet_map::Get() (#493797).


Modified:
   trunk/ChangeLog
   trunk/Src/DasherCore/Alphabet/Alphabet.cpp
   trunk/Src/DasherCore/Alphabet/AlphabetMap.cpp
   trunk/Src/DasherCore/Alphabet/AlphabetMap.h

Modified: trunk/Src/DasherCore/Alphabet/Alphabet.cpp
==============================================================================
--- trunk/Src/DasherCore/Alphabet/Alphabet.cpp	(original)
+++ trunk/Src/DasherCore/Alphabet/Alphabet.cpp	Sat Mar 22 16:30:03 2008
@@ -1,6 +1,6 @@
 // Alphabet.cpp
 //
-// Copyright (c) 2007 The Dasher Team
+// Copyright (c) 2008 The Dasher Team
 //
 // This file is part of Dasher.
 //
@@ -222,7 +222,7 @@
 
     // TODO: Error condition on reaching end of string prematurely.
 
-    Symbols->push_back(TextMap.Get(strCurrentSymbol, false));
+    Symbols->push_back(TextMap.Get(strCurrentSymbol, NULL));
 
     ++it;
   }

Modified: trunk/Src/DasherCore/Alphabet/AlphabetMap.cpp
==============================================================================
--- trunk/Src/DasherCore/Alphabet/AlphabetMap.cpp	(original)
+++ trunk/Src/DasherCore/Alphabet/AlphabetMap.cpp	Sat Mar 22 16:30:03 2008
@@ -79,8 +79,6 @@
 
 symbol alphabet_map::Get(const std::string &Key, bool *KeyIsPrefix) const {
 
-  DASHER_ASSERT_VALIDPTR_RW(KeyIsPrefix);
-
   // Loop through Entries with the correct Hash value.
   for(Entry * i = HashTable[Hash(Key)]; i; i = i->Next) {
     if(i->Key == Key) {

Modified: trunk/Src/DasherCore/Alphabet/AlphabetMap.h
==============================================================================
--- trunk/Src/DasherCore/Alphabet/AlphabetMap.h	(original)
+++ trunk/Src/DasherCore/Alphabet/AlphabetMap.h	Sat Mar 22 16:30:03 2008
@@ -66,6 +66,9 @@
 public:
   alphabet_map(unsigned int InitialTableSize = 255);
   void Add(const std::string & Key, symbol Value);
+
+  // Return the symbol associated with Key or Undefined.  KeyIsPrefix, if non
+  // NULL, will be set to true if ???
   symbol Get(const std::string & Key, bool * KeyIsPrefix) const;
 
 private:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]