diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-10-21 17:18:16 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-10-21 17:58:49 (GMT) |
commit | a80fe4b1d24dff993442a45e63948eeb9e6a3962 (patch) | |
tree | c8e4a44e8f1228f2cc200805e5915c7a1fd08c9f /Source/cmGeneratorExpressionEvaluator.h | |
parent | bf02e750796c6b42b0e9d39ba322cd5191489a0e (diff) | |
download | CMake-a80fe4b1d24dff993442a45e63948eeb9e6a3962.zip CMake-a80fe4b1d24dff993442a45e63948eeb9e6a3962.tar.gz CMake-a80fe4b1d24dff993442a45e63948eeb9e6a3962.tar.bz2 |
use size_t for GeneratorExpressionContent::ContentLength to fix some warnings
CMake/Source/cmGeneratorExpressionParser.cxx: In member function ‘void cmGeneratorExpressionParser::ParseGeneratorExpression(std::vector<cmGeneratorExpressionEvaluator*>&)’:
CMake/Source/cmGeneratorExpressionParser.cxx:116:55: warning: conversion to ‘unsigned int’ from ‘long int’ may alter its value [-Wconversion]
CMake/Source/cmGeneratorExpressionParser.cxx:240:39: warning: conversion to ‘int’ from ‘long int’ may alter its value [-Wconversion]
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.h')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h index 218abf1..343e18b 100644 --- a/Source/cmGeneratorExpressionEvaluator.h +++ b/Source/cmGeneratorExpressionEvaluator.h @@ -63,7 +63,7 @@ private: struct TextContent : public cmGeneratorExpressionEvaluator { - TextContent(const char *start, unsigned int length) + TextContent(const char *start, size_t length) : Content(start), Length(length) { @@ -80,25 +80,25 @@ struct TextContent : public cmGeneratorExpressionEvaluator return cmGeneratorExpressionEvaluator::Text; } - void Extend(unsigned int length) + void Extend(size_t length) { this->Length += length; } - unsigned int GetLength() + size_t GetLength() { return this->Length; } private: const char *Content; - unsigned int Length; + size_t Length; }; //---------------------------------------------------------------------------- struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator { - GeneratorExpressionContent(const char *startContent, unsigned int length); + GeneratorExpressionContent(const char *startContent, size_t length); void SetIdentifier(std::vector<cmGeneratorExpressionEvaluator*> identifier) { this->IdentifierChildren = identifier; @@ -141,7 +141,7 @@ private: std::vector<cmGeneratorExpressionEvaluator*> IdentifierChildren; std::vector<std::vector<cmGeneratorExpressionEvaluator*> > ParamChildren; const char *StartContent; - unsigned int ContentLength; + size_t ContentLength; }; #endif |