From 52be1ef0d126f09ba943c7afcf367e7d9347f2fd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 8 Nov 2012 22:58:28 +0000 Subject: tabconv: it's all spaces now. --- src/functionunique.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/functionunique.cpp') diff --git a/src/functionunique.cpp b/src/functionunique.cpp index ca2461f..f12712e 100644 --- a/src/functionunique.cpp +++ b/src/functionunique.cpp @@ -3,7 +3,7 @@ #include #include PluginInterface3( pluginFunctionUnique, unique, FunctionUnique, Function, - "Mike Buland", 0, 1 ); + "Mike Buland", 0, 1 ); FunctionUnique::FunctionUnique() { @@ -15,33 +15,33 @@ FunctionUnique::~FunctionUnique() Bu::String FunctionUnique::getName() const { - return "unique"; + return "unique"; } Variable FunctionUnique::call( Variable &input, VarList lParams ) { - if( lParams.getSize() > 0 ) - throw Bu::ExceptionBase("Unique does not take any parameters."); - if( input.getType() != Variable::typeList ) - throw Bu::ExceptionBase("unique does not work on non-list types."); + if( lParams.getSize() > 0 ) + throw Bu::ExceptionBase("Unique does not take any parameters."); + if( input.getType() != Variable::typeList ) + throw Bu::ExceptionBase("unique does not work on non-list types."); - Bu::Hash hHas; + Bu::Hash hHas; - Variable vOut( Variable::typeList ); - for( VarList::iterator i = input.begin(); i; i++ ) - { - if( (*i).getType() != Variable::typeString ) - continue; + Variable vOut( Variable::typeList ); + for( VarList::iterator i = input.begin(); i; i++ ) + { + if( (*i).getType() != Variable::typeString ) + continue; - Bu::String s = (*i).getString(); - - if( hHas.has( s ) ) - continue; + Bu::String s = (*i).getString(); + + if( hHas.has( s ) ) + continue; - hHas.insert( s, true ); - vOut.append( *i ); - } + hHas.insert( s, true ); + vOut.append( *i ); + } - return vOut; + return vOut; } -- cgit v1.2.3