From b57c4dad03e7c656d8cba2c1639341923c7a9405 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 15 Nov 2005 10:05:31 +0000 Subject: [PATCH] Added remapping of Drew's fullname. --- applications/osgversion/osgversion.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/applications/osgversion/osgversion.cpp b/applications/osgversion/osgversion.cpp index 0a8a422c1..957273fe3 100644 --- a/applications/osgversion/osgversion.cpp +++ b/applications/osgversion/osgversion.cpp @@ -264,6 +264,18 @@ void nameCorrection(NamePair& name) name.first = "Ali"; name.second = "Botorabi"; } + + if (name.first=="Waltice" && name.second=="") + { + name.first = "Walter"; + name.second = "J. Altice"; + } + + if (name.first=="Drew" && name.second=="") + { + name.first = "Drew"; + name.second = "Whitehouse"; + } } void lastValidCharacter(const std::string& name, unsigned int& pos,char c) @@ -309,9 +321,14 @@ NamePair createName(const std::string& first, const std::string& second) name = typoCorrection(name); - if (second.empty()) return NamePair(name,""); - - if (!validName(second)) return NamePair(name,""); + if (second.empty() || + !validName(second)) + { + // filter any single or two letter words as unlike to be names. + if (name.size()<=2) return EmptyNamePair; + + return NamePair(name,""); + } last = second.size(); @@ -325,6 +342,9 @@ NamePair createName(const std::string& first, const std::string& second) return NamePair(name, surname); } + // filter any single or two letter words as unlike to be names. + if (name.size()<=2) return EmptyNamePair; + return NamePair(name,""); }