Commit e4b64f53 authored by Aaron R. Larson's avatar Aaron R. Larson
Browse files

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

svn path=/trunk/; revision=3472
parent efdf1fb7
2008-03-22 Aaron Larson <alarson@aaron2>
* Remove inappropriate assert from alphabet_map::Get() (#493797).
2008-03-22 Aaron Larson <alarson@aaron2>
* Update manpage. Add "--help-options" command line argument to
......
// Alphabet.cpp
//
// Copyright (c) 2007 The Dasher Team
// Copyright (c) 2008 The Dasher Team
//
// This file is part of Dasher.
//
......@@ -222,7 +222,7 @@ void CAlphabet::GetSymbolsFull(std::vector<symbol > *Symbols, std::string *Input
// TODO: Error condition on reaching end of string prematurely.
Symbols->push_back(TextMap.Get(strCurrentSymbol, false));
Symbols->push_back(TextMap.Get(strCurrentSymbol, NULL));
++it;
}
......
......@@ -79,8 +79,6 @@ void alphabet_map::RecursiveAdd(const std::string &Key, symbol Value, bool Prefi
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) {
......
......@@ -66,6 +66,9 @@ class Dasher::alphabet_map {
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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment