Skip to content

Commit

Permalink
COMP: Eliminate 64-bit compile warnings about conversion from size_t …
Browse files Browse the repository at this point in the history
…to unsigned int. None of the entities involved should ever approach the 4G 32-bit limit of an unsigned int, so static_cast should be safe for the foreseeable future.
  • Loading branch information
dlrdave committed Jun 12, 2009
1 parent b7773ef commit 96509cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cable/Parsers/cableFunctionType.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void FunctionType::AddArgument(Type* argument, bool hasDefault, const char *name
//----------------------------------------------------------------------------
unsigned int FunctionType::GetNumberOfArguments() const
{
return m_ArgumentTypeVector.size();
return static_cast<unsigned int>(m_ArgumentTypeVector.size());
}

//----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Cable/Parsers/cableXMLParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool XMLParser::ParseStream()
in.read(buffer, bufferSize);
if(in.gcount())
{
if(!this->ParseBuffer(buffer, in.gcount()))
if(!this->ParseBuffer(buffer, static_cast<unsigned int>(in.gcount())))
{
return false;
}
Expand Down Expand Up @@ -208,7 +208,7 @@ bool XMLParser::ParseBuffer(const char* buffer, unsigned int count)
//----------------------------------------------------------------------------
bool XMLParser::ParseBuffer(const char* buffer)
{
return this->ParseBuffer(buffer, strlen(buffer));
return this->ParseBuffer(buffer, static_cast<unsigned int>(strlen(buffer)));
}

//----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Cable/Parsers/cableXMLSourceElement.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ XMLSourceElement* XMLSourceElement::GetElement(const char* name) const
//----------------------------------------------------------------------------
unsigned int XMLSourceElement::GetNumberOfNestedElements() const
{
return m_NestedElementVector.size();
return static_cast<unsigned int>(m_NestedElementVector.size());
}

//----------------------------------------------------------------------------
Expand Down

0 comments on commit 96509cc

Please sign in to comment.