STYLE: Fix style

This commit is contained in:
Andy Cedilnik 2006-05-16 08:42:14 -04:00
parent 8224fee5df
commit 70d8c0f3d8
2 changed files with 21 additions and 20 deletions

View File

@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information. PURPOSE. See the above copyright notices for more information.
=========================================================================*/ =========================================================================*/
@ -28,7 +28,7 @@ bool cmListCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("must be called with at least one argument."); this->SetError("must be called with at least one argument.");
return false; return false;
} }
const std::string &subCommand = args[0]; const std::string &subCommand = args[0];
if(subCommand == "LENGTH") if(subCommand == "LENGTH")
{ {
@ -54,7 +54,7 @@ bool cmListCommand::InitialPass(std::vector<std::string> const& args)
{ {
return this->HandleRemoveItemCommand(args); return this->HandleRemoveItemCommand(args);
} }
std::string e = "does not recognize sub-command "+subCommand; std::string e = "does not recognize sub-command "+subCommand;
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
@ -151,8 +151,8 @@ bool cmListCommand::HandleGetCommand(std::vector<std::string> const& args)
if ( item < 0 || nitem <= (size_t)item ) if ( item < 0 || nitem <= (size_t)item )
{ {
cmOStringStream str; cmOStringStream str;
str << "index: " << item << " out of range (-" str << "index: " << item << " out of range (-"
<< varArgsExpanded.size() << ", " << varArgsExpanded.size() << ", "
<< varArgsExpanded.size()-1 << ")"; << varArgsExpanded.size()-1 << ")";
this->SetError(str.str().c_str()); this->SetError(str.str().c_str());
return false; return false;
@ -223,8 +223,8 @@ bool cmListCommand::HandleInsertCommand(std::vector<std::string> const& args)
if ( item < 0 || nitem <= (size_t)item ) if ( item < 0 || nitem <= (size_t)item )
{ {
cmOStringStream str; cmOStringStream str;
str << "index: " << item << " out of range (-" str << "index: " << item << " out of range (-"
<< varArgsExpanded.size() << ", " << varArgsExpanded.size() << ", "
<< (varArgsExpanded.size() == 0?0:(varArgsExpanded.size()-1)) << ")"; << (varArgsExpanded.size() == 0?0:(varArgsExpanded.size()-1)) << ")";
this->SetError(str.str().c_str()); this->SetError(str.str().c_str());
return false; return false;
@ -299,7 +299,8 @@ bool cmListCommand
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmListCommand::HandleRemoveAtCommand(std::vector<std::string> const& args) bool cmListCommand::HandleRemoveAtCommand(
std::vector<std::string> const& args)
{ {
if(args.size() < 3) if(args.size() < 3)
{ {
@ -329,8 +330,8 @@ bool cmListCommand::HandleRemoveAtCommand(std::vector<std::string> const& args)
if ( item < 0 || nitem <= (size_t)item ) if ( item < 0 || nitem <= (size_t)item )
{ {
cmOStringStream str; cmOStringStream str;
str << "index: " << item << " out of range (-" str << "index: " << item << " out of range (-"
<< varArgsExpanded.size() << ", " << varArgsExpanded.size() << ", "
<< varArgsExpanded.size()-1 << ")"; << varArgsExpanded.size()-1 << ")";
this->SetError(str.str().c_str()); this->SetError(str.str().c_str());
return false; return false;

View File

@ -9,8 +9,8 @@
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information. PURPOSE. See the above copyright notices for more information.
=========================================================================*/ =========================================================================*/
@ -29,7 +29,7 @@ public:
/** /**
* This is a virtual constructor for the command. * This is a virtual constructor for the command.
*/ */
virtual cmCommand* Clone() virtual cmCommand* Clone()
{ {
return new cmListCommand; return new cmListCommand;
} }
@ -53,11 +53,11 @@ public:
/** /**
* Succinct documentation. * Succinct documentation.
*/ */
virtual const char* GetTerseDocumentation() virtual const char* GetTerseDocumentation()
{ {
return "List operations."; return "List operations.";
} }
/** /**
* More documentation. * More documentation.
*/ */
@ -79,12 +79,12 @@ public:
"INSERT will insert elements to the list to the specified location.\n" "INSERT will insert elements to the list to the specified location.\n"
"When specifying an index, negative value corresponds to index from the" "When specifying an index, negative value corresponds to index from the"
" end of the list.\n" " end of the list.\n"
"REMOVE_AT and REMOVE_ITEM will remove item from the list. The difference " "REMOVE_AT and REMOVE_ITEM will remove item from the list. The "
"is that REMOVE_ITEM will remove the given items, while REMOVE_AT will " "difference is that REMOVE_ITEM will remove the given items, while "
"remove the item at the given indices.\n" "REMOVE_AT will remove the item at the given indices.\n"
; ;
} }
cmTypeMacro(cmListCommand, cmCommand); cmTypeMacro(cmListCommand, cmCommand);
protected: protected:
bool HandleLengthCommand(std::vector<std::string> const& args); bool HandleLengthCommand(std::vector<std::string> const& args);