Commit f832c9dd by Jamie Madill Committed by Commit Bot

Fix style in the preprocessor.

Again using git cl format. BUG=angleproject:650 Change-Id: I8898d00bfc6a50db50bffd2cc30c3eda7c08c6c2 Reviewed-on: https://chromium-review.googlesource.com/419097Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent d7b1ab58
......@@ -15,9 +15,7 @@ Diagnostics::~Diagnostics()
{
}
void Diagnostics::report(ID id,
const SourceLocation &loc,
const std::string &text)
void Diagnostics::report(ID id, const SourceLocation &loc, const std::string &text)
{
// TODO(alokp): Keep a count of errors and warnings.
print(id, loc, text);
......@@ -39,104 +37,105 @@ std::string Diagnostics::message(ID id)
{
switch (id)
{
// Errors begin.
case PP_INTERNAL_ERROR:
return "internal error";
case PP_OUT_OF_MEMORY:
return "out of memory";
case PP_INVALID_CHARACTER:
return "invalid character";
case PP_INVALID_NUMBER:
return "invalid number";
case PP_INTEGER_OVERFLOW:
return "integer overflow";
case PP_FLOAT_OVERFLOW:
return "float overflow";
case PP_TOKEN_TOO_LONG:
return "token too long";
case PP_INVALID_EXPRESSION:
return "invalid expression";
case PP_DIVISION_BY_ZERO:
return "division by zero";
case PP_EOF_IN_COMMENT:
return "unexpected end of file found in comment";
case PP_UNEXPECTED_TOKEN:
return "unexpected token";
case PP_DIRECTIVE_INVALID_NAME:
return "invalid directive name";
case PP_MACRO_NAME_RESERVED:
return "macro name is reserved";
case PP_MACRO_REDEFINED:
return "macro redefined";
case PP_MACRO_PREDEFINED_REDEFINED:
return "predefined macro redefined";
case PP_MACRO_PREDEFINED_UNDEFINED:
return "predefined macro undefined";
case PP_MACRO_UNTERMINATED_INVOCATION:
return "unterminated macro invocation";
case PP_MACRO_UNDEFINED_WHILE_INVOKED:
return "macro undefined while being invoked";
case PP_MACRO_TOO_FEW_ARGS:
return "Not enough arguments for macro";
case PP_MACRO_TOO_MANY_ARGS:
return "Too many arguments for macro";
case PP_MACRO_DUPLICATE_PARAMETER_NAMES:
return "duplicate macro parameter name";
case PP_MACRO_INVOCATION_CHAIN_TOO_DEEP:
return "macro invocation chain too deep";
case PP_CONDITIONAL_ENDIF_WITHOUT_IF:
return "unexpected #endif found without a matching #if";
case PP_CONDITIONAL_ELSE_WITHOUT_IF:
return "unexpected #else found without a matching #if";
case PP_CONDITIONAL_ELSE_AFTER_ELSE:
return "unexpected #else found after another #else";
case PP_CONDITIONAL_ELIF_WITHOUT_IF:
return "unexpected #elif found without a matching #if";
case PP_CONDITIONAL_ELIF_AFTER_ELSE:
return "unexpected #elif found after #else";
case PP_CONDITIONAL_UNTERMINATED:
return "unexpected end of file found in conditional block";
case PP_INVALID_EXTENSION_NAME:
return "invalid extension name";
case PP_INVALID_EXTENSION_BEHAVIOR:
return "invalid extension behavior";
case PP_INVALID_EXTENSION_DIRECTIVE:
return "invalid extension directive";
case PP_INVALID_VERSION_NUMBER:
return "invalid version number";
case PP_INVALID_VERSION_DIRECTIVE:
return "invalid version directive";
case PP_VERSION_NOT_FIRST_STATEMENT:
return "#version directive must occur before anything else, "
"except for comments and white space";
case PP_VERSION_NOT_FIRST_LINE_ESSL3:
return "#version directive must occur on the first line of the shader";
case PP_INVALID_LINE_NUMBER:
return "invalid line number";
case PP_INVALID_FILE_NUMBER:
return "invalid file number";
case PP_INVALID_LINE_DIRECTIVE:
return "invalid line directive";
case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL3:
return "extension directive must occur before any non-preprocessor tokens in ESSL3";
case PP_UNDEFINED_SHIFT:
return "shift exponent is negative or undefined";
// Errors end.
// Warnings begin.
case PP_EOF_IN_DIRECTIVE:
return "unexpected end of file found in directive";
case PP_CONDITIONAL_UNEXPECTED_TOKEN:
return "unexpected token after conditional expression";
case PP_UNRECOGNIZED_PRAGMA:
return "unrecognized pragma";
case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1:
return "extension directive should occur before any non-preprocessor tokens";
case PP_WARNING_MACRO_NAME_RESERVED:
return "macro name with a double underscore is reserved - unintented behavior is possible";
// Warnings end.
default:
UNREACHABLE();
return "";
// Errors begin.
case PP_INTERNAL_ERROR:
return "internal error";
case PP_OUT_OF_MEMORY:
return "out of memory";
case PP_INVALID_CHARACTER:
return "invalid character";
case PP_INVALID_NUMBER:
return "invalid number";
case PP_INTEGER_OVERFLOW:
return "integer overflow";
case PP_FLOAT_OVERFLOW:
return "float overflow";
case PP_TOKEN_TOO_LONG:
return "token too long";
case PP_INVALID_EXPRESSION:
return "invalid expression";
case PP_DIVISION_BY_ZERO:
return "division by zero";
case PP_EOF_IN_COMMENT:
return "unexpected end of file found in comment";
case PP_UNEXPECTED_TOKEN:
return "unexpected token";
case PP_DIRECTIVE_INVALID_NAME:
return "invalid directive name";
case PP_MACRO_NAME_RESERVED:
return "macro name is reserved";
case PP_MACRO_REDEFINED:
return "macro redefined";
case PP_MACRO_PREDEFINED_REDEFINED:
return "predefined macro redefined";
case PP_MACRO_PREDEFINED_UNDEFINED:
return "predefined macro undefined";
case PP_MACRO_UNTERMINATED_INVOCATION:
return "unterminated macro invocation";
case PP_MACRO_UNDEFINED_WHILE_INVOKED:
return "macro undefined while being invoked";
case PP_MACRO_TOO_FEW_ARGS:
return "Not enough arguments for macro";
case PP_MACRO_TOO_MANY_ARGS:
return "Too many arguments for macro";
case PP_MACRO_DUPLICATE_PARAMETER_NAMES:
return "duplicate macro parameter name";
case PP_MACRO_INVOCATION_CHAIN_TOO_DEEP:
return "macro invocation chain too deep";
case PP_CONDITIONAL_ENDIF_WITHOUT_IF:
return "unexpected #endif found without a matching #if";
case PP_CONDITIONAL_ELSE_WITHOUT_IF:
return "unexpected #else found without a matching #if";
case PP_CONDITIONAL_ELSE_AFTER_ELSE:
return "unexpected #else found after another #else";
case PP_CONDITIONAL_ELIF_WITHOUT_IF:
return "unexpected #elif found without a matching #if";
case PP_CONDITIONAL_ELIF_AFTER_ELSE:
return "unexpected #elif found after #else";
case PP_CONDITIONAL_UNTERMINATED:
return "unexpected end of file found in conditional block";
case PP_INVALID_EXTENSION_NAME:
return "invalid extension name";
case PP_INVALID_EXTENSION_BEHAVIOR:
return "invalid extension behavior";
case PP_INVALID_EXTENSION_DIRECTIVE:
return "invalid extension directive";
case PP_INVALID_VERSION_NUMBER:
return "invalid version number";
case PP_INVALID_VERSION_DIRECTIVE:
return "invalid version directive";
case PP_VERSION_NOT_FIRST_STATEMENT:
return "#version directive must occur before anything else, "
"except for comments and white space";
case PP_VERSION_NOT_FIRST_LINE_ESSL3:
return "#version directive must occur on the first line of the shader";
case PP_INVALID_LINE_NUMBER:
return "invalid line number";
case PP_INVALID_FILE_NUMBER:
return "invalid file number";
case PP_INVALID_LINE_DIRECTIVE:
return "invalid line directive";
case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL3:
return "extension directive must occur before any non-preprocessor tokens in ESSL3";
case PP_UNDEFINED_SHIFT:
return "shift exponent is negative or undefined";
// Errors end.
// Warnings begin.
case PP_EOF_IN_DIRECTIVE:
return "unexpected end of file found in directive";
case PP_CONDITIONAL_UNEXPECTED_TOKEN:
return "unexpected token after conditional expression";
case PP_UNRECOGNIZED_PRAGMA:
return "unrecognized pragma";
case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1:
return "extension directive should occur before any non-preprocessor tokens";
case PP_WARNING_MACRO_NAME_RESERVED:
return "macro name with a double underscore is reserved - unintented behavior is "
"possible";
// Warnings end.
default:
UNREACHABLE();
return "";
}
}
......
......@@ -86,9 +86,7 @@ class Diagnostics
Severity severity(ID id);
std::string message(ID id);
virtual void print(ID id,
const SourceLocation &loc,
const std::string &text) = 0;
virtual void print(ID id, const SourceLocation &loc, const std::string &text) = 0;
};
} // namespace pp
......
......@@ -23,8 +23,7 @@ class DirectiveHandler
public:
virtual ~DirectiveHandler();
virtual void handleError(const SourceLocation &loc,
const std::string &msg) = 0;
virtual void handleError(const SourceLocation &loc, const std::string &msg) = 0;
// Handle pragma of form: #pragma name[(value)]
virtual void handlePragma(const SourceLocation &loc,
......@@ -36,8 +35,7 @@ class DirectiveHandler
const std::string &name,
const std::string &behavior) = 0;
virtual void handleVersion(const SourceLocation &loc,
int version) = 0;
virtual void handleVersion(const SourceLocation &loc, int version) = 0;
};
} // namespace pp
......
......@@ -30,7 +30,6 @@ class DirectiveParser : public Lexer
void lex(Token *token) override;
private:
void parseDirective(Token *token);
void parseDefine(Token *token);
void parseUndef(Token *token);
......@@ -61,16 +60,14 @@ class DirectiveParser : public Lexer
bool foundElseGroup;
ConditionalBlock()
: skipBlock(false),
skipGroup(false),
foundValidGroup(false),
foundElseGroup(false)
: skipBlock(false), skipGroup(false), foundValidGroup(false), foundElseGroup(false)
{
}
};
bool mPastFirstStatement;
bool mSeenNonPreprocessorToken; // Tracks if a non-preprocessor token has been seen yet. Some macros, such as
// #extension must be declared before all shader code.
bool mSeenNonPreprocessorToken; // Tracks if a non-preprocessor token has been seen yet. Some
// macros, such as
// #extension must be declared before all shader code.
std::vector<ConditionalBlock> mConditionalStack;
Tokenizer *mTokenizer;
MacroSet *mMacroSet;
......
......@@ -18,9 +18,8 @@ Input::Input() : mCount(0), mString(0)
{
}
Input::Input(size_t count, const char *const string[], const int length[]) :
mCount(count),
mString(string)
Input::Input(size_t count, const char *const string[], const int length[])
: mCount(count), mString(string)
{
mLength.reserve(mCount);
for (size_t i = 0; i < mCount; ++i)
......@@ -87,7 +86,7 @@ size_t Input::read(char *buf, size_t maxSize, int *lineNo)
while ((nRead < maxRead) && (mReadLoc.sIndex < mCount))
{
size_t size = mLength[mReadLoc.sIndex] - mReadLoc.cIndex;
size = std::min(size, maxSize);
size = std::min(size, maxSize);
for (size_t i = 0; i < size; ++i)
{
// Stop if a possible line continuation is encountered.
......@@ -95,7 +94,7 @@ size_t Input::read(char *buf, size_t maxSize, int *lineNo)
// and increments line number if necessary.
if (*(mString[mReadLoc.sIndex] + mReadLoc.cIndex + i) == '\\')
{
size = i;
size = i;
maxRead = nRead + size; // Stop reading right before the backslash.
}
}
......@@ -114,4 +113,3 @@ size_t Input::read(char *buf, size_t maxSize, int *lineNo)
}
} // namespace pp
......@@ -20,18 +20,9 @@ class Input
Input();
Input(size_t count, const char *const string[], const int length[]);
size_t count() const
{
return mCount;
}
const char *string(size_t index) const
{
return mString[index];
}
size_t length(size_t index) const
{
return mLength[index];
}
size_t count() const { return mCount; }
const char *string(size_t index) const { return mString[index]; }
size_t length(size_t index) const { return mLength[index]; }
size_t read(char *buf, size_t maxSize, int *lineNo);
......@@ -40,11 +31,7 @@ class Input
size_t sIndex; // String index;
size_t cIndex; // Char index.
Location()
: sIndex(0),
cIndex(0)
{
}
Location() : sIndex(0), cIndex(0) {}
};
const Location &readLoc() const { return mReadLoc; }
......@@ -55,7 +42,7 @@ class Input
// Input.
size_t mCount;
const char * const *mString;
const char *const *mString;
std::vector<size_t> mLength;
Location mReadLoc;
......
......@@ -14,9 +14,7 @@ namespace pp
bool Macro::equals(const Macro &other) const
{
return (type == other.type) &&
(name == other.name) &&
(parameters == other.parameters) &&
return (type == other.type) && (name == other.name) && (parameters == other.parameters) &&
(replacements == other.replacements);
}
......@@ -29,11 +27,10 @@ void PredefineMacro(MacroSet *macroSet, const char *name, int value)
Macro macro;
macro.predefined = true;
macro.type = Macro::kTypeObj;
macro.name = name;
macro.name = name;
macro.replacements.push_back(token);
(*macroSet)[name] = macro;
}
} // namespace pp
......@@ -22,7 +22,7 @@ const size_t kMaxContextTokens = 10000;
class TokenLexer : public Lexer
{
public:
public:
typedef std::vector<Token> TokenVector;
TokenLexer(TokenVector *tokens)
......@@ -44,7 +44,7 @@ class TokenLexer : public Lexer
}
}
private:
private:
TokenVector mTokens;
TokenVector::const_iterator mIter;
};
......@@ -115,7 +115,7 @@ void MacroExpander::lex(Token *token)
if (iter == mMacroSet->end())
break;
const Macro& macro = iter->second;
const Macro &macro = iter->second;
if (macro.disabled)
{
// If a particular token is not expanded, it is never expanded.
......@@ -205,7 +205,7 @@ bool MacroExpander::pushMacro(const Macro &macro, const Token &identifier)
macro.disabled = true;
MacroContext *context = new MacroContext;
context->macro = &macro;
context->macro = &macro;
context->replacements.swap(replacements);
mContextStack.push_back(context);
mTotalTokensInContexts += context->replacements.size();
......@@ -248,8 +248,7 @@ bool MacroExpander::expandMacro(const Macro &macro,
SourceLocation replacementLocation = identifier.location;
if (macro.type == Macro::kTypeObj)
{
replacements->assign(macro.replacements.begin(),
macro.replacements.end());
replacements->assign(macro.replacements.begin(), macro.replacements.end());
if (macro.predefined)
{
......@@ -257,7 +256,7 @@ bool MacroExpander::expandMacro(const Macro &macro,
const char kFile[] = "__FILE__";
ASSERT(replacements->size() == 1);
Token& repl = replacements->front();
Token &repl = replacements->front();
if (macro.name == kLine)
{
repl.text = ToString(identifier.location.line);
......@@ -281,7 +280,7 @@ bool MacroExpander::expandMacro(const Macro &macro,
for (std::size_t i = 0; i < replacements->size(); ++i)
{
Token& repl = replacements->at(i);
Token &repl = replacements->at(i);
if (i == 0)
{
// The first token in the replacement list inherits the padding
......@@ -317,36 +316,36 @@ bool MacroExpander::collectMacroArgs(const Macro &macro,
if (token.type == Token::LAST)
{
mDiagnostics->report(Diagnostics::PP_MACRO_UNTERMINATED_INVOCATION,
identifier.location, identifier.text);
mDiagnostics->report(Diagnostics::PP_MACRO_UNTERMINATED_INVOCATION, identifier.location,
identifier.text);
// Do not lose EOF token.
ungetToken(token);
return false;
}
bool isArg = false; // True if token is part of the current argument.
bool isArg = false; // True if token is part of the current argument.
switch (token.type)
{
case '(':
++openParens;
isArg = true;
break;
case ')':
--openParens;
isArg = openParens != 0;
*closingParenthesisLocation = token.location;
break;
case ',':
// The individual arguments are separated by comma tokens, but
// the comma tokens between matching inner parentheses do not
// seperate arguments.
if (openParens == 1)
args->push_back(MacroArg());
isArg = openParens != 1;
break;
default:
isArg = true;
break;
case '(':
++openParens;
isArg = true;
break;
case ')':
--openParens;
isArg = openParens != 0;
*closingParenthesisLocation = token.location;
break;
case ',':
// The individual arguments are separated by comma tokens, but
// the comma tokens between matching inner parentheses do not
// seperate arguments.
if (openParens == 1)
args->push_back(MacroArg());
isArg = openParens != 1;
break;
default:
isArg = true;
break;
}
if (isArg)
{
......@@ -367,9 +366,9 @@ bool MacroExpander::collectMacroArgs(const Macro &macro,
// Validate the number of arguments.
if (args->size() != params.size())
{
Diagnostics::ID id = args->size() < macro.parameters.size() ?
Diagnostics::PP_MACRO_TOO_FEW_ARGS :
Diagnostics::PP_MACRO_TOO_MANY_ARGS;
Diagnostics::ID id = args->size() < macro.parameters.size()
? Diagnostics::PP_MACRO_TOO_FEW_ARGS
: Diagnostics::PP_MACRO_TOO_MANY_ARGS;
mDiagnostics->report(id, identifier.location, identifier.text);
return false;
}
......@@ -430,15 +429,15 @@ void MacroExpander::replaceMacroParams(const Macro &macro,
// TODO(alokp): Optimize this.
// There is no need to search for macro params every time.
// The param index can be cached with the replacement token.
Macro::Parameters::const_iterator iter = std::find(
macro.parameters.begin(), macro.parameters.end(), repl.text);
Macro::Parameters::const_iterator iter =
std::find(macro.parameters.begin(), macro.parameters.end(), repl.text);
if (iter == macro.parameters.end())
{
replacements->push_back(repl);
continue;
}
std::size_t iArg = std::distance(macro.parameters.begin(), iter);
std::size_t iArg = std::distance(macro.parameters.begin(), iter);
const MacroArg &arg = args[iArg];
if (arg.empty())
{
......@@ -473,4 +472,3 @@ void MacroExpander::MacroContext::unget()
}
} // namespace pp
......@@ -38,9 +38,7 @@ class MacroExpander : public Lexer
bool pushMacro(const Macro &macro, const Token &identifier);
void popMacro();
bool expandMacro(const Macro &macro,
const Token &identifier,
std::vector<Token> *replacements);
bool expandMacro(const Macro &macro, const Token &identifier, std::vector<Token> *replacements);
typedef std::vector<Token> MacroArg;
bool collectMacroArgs(const Macro &macro,
......
......@@ -52,9 +52,7 @@ Preprocessor::~Preprocessor()
delete mImpl;
}
bool Preprocessor::init(size_t count,
const char * const string[],
const int length[])
bool Preprocessor::init(size_t count, const char *const string[], const int length[])
{
static const int kDefaultGLSLVersion = 100;
......@@ -80,23 +78,23 @@ void Preprocessor::lex(Token *token)
mImpl->macroExpander.lex(token);
switch (token->type)
{
// We should not be returning internal preprocessing tokens.
// Convert preprocessing tokens to compiler tokens or report
// diagnostics.
case Token::PP_HASH:
UNREACHABLE();
break;
case Token::PP_NUMBER:
mImpl->diagnostics->report(Diagnostics::PP_INVALID_NUMBER,
token->location, token->text);
break;
case Token::PP_OTHER:
mImpl->diagnostics->report(Diagnostics::PP_INVALID_CHARACTER,
token->location, token->text);
break;
default:
validToken = true;
break;
// We should not be returning internal preprocessing tokens.
// Convert preprocessing tokens to compiler tokens or report
// diagnostics.
case Token::PP_HASH:
UNREACHABLE();
break;
case Token::PP_NUMBER:
mImpl->diagnostics->report(Diagnostics::PP_INVALID_NUMBER, token->location,
token->text);
break;
case Token::PP_OTHER:
mImpl->diagnostics->report(Diagnostics::PP_INVALID_CHARACTER, token->location,
token->text);
break;
default:
validToken = true;
break;
}
}
}
......
......@@ -42,7 +42,7 @@ class Preprocessor : angle::NonCopyable
// Each element in the length array may contain the length of the
// corresponding string or a value less than 0 to indicate that the string
// is null terminated.
bool init(size_t count, const char * const string[], const int length[]);
bool init(size_t count, const char *const string[], const int length[]);
// Adds a pre-defined macro.
void predefineMacro(const char *name, int value);
......
......@@ -12,16 +12,8 @@ namespace pp
struct SourceLocation
{
SourceLocation()
: file(0),
line(0)
{
}
SourceLocation(int f, int l)
: file(f),
line(l)
{
}
SourceLocation() : file(0), line(0) {}
SourceLocation(int f, int l) : file(f), line(l) {}
bool equals(const SourceLocation &other) const
{
......
......@@ -14,17 +14,15 @@ namespace pp
void Token::reset()
{
type = 0;
flags = 0;
type = 0;
flags = 0;
location = SourceLocation();
text.clear();
}
bool Token::equals(const Token &other) const
{
return (type == other.type) &&
(flags == other.flags) &&
(location == other.location) &&
return (type == other.type) && (flags == other.flags) && (location == other.location) &&
(text == other.text);
}
......
......@@ -62,33 +62,20 @@ struct Token
EXPANSION_DISABLED = 1 << 2
};
Token()
: type(0),
flags(0)
{
}
Token() : type(0), flags(0) {}
void reset();
bool equals(const Token &other) const;
// Returns true if this is the first token on line.
// It disregards any leading whitespace.
bool atStartOfLine() const
{
return (flags & AT_START_OF_LINE) != 0;
}
bool atStartOfLine() const { return (flags & AT_START_OF_LINE) != 0; }
void setAtStartOfLine(bool start);
bool hasLeadingSpace() const
{
return (flags & HAS_LEADING_SPACE) != 0;
}
bool hasLeadingSpace() const { return (flags & HAS_LEADING_SPACE) != 0; }
void setHasLeadingSpace(bool space);
bool expansionDisabled() const
{
return (flags & EXPANSION_DISABLED) != 0;
}
bool expansionDisabled() const { return (flags & EXPANSION_DISABLED) != 0; }
void setExpansionDisabled(bool disable);
// Converts text into numeric value for CONST_INT and CONST_FLOAT token.
......
......@@ -36,7 +36,7 @@ class Tokenizer : public Lexer
Tokenizer(Diagnostics *diagnostics);
~Tokenizer();
bool init(size_t count, const char * const string[], const int length[]);
bool init(size_t count, const char *const string[], const int length[]);
void setFileNumber(int file);
void setLineNumber(int line);
......@@ -48,9 +48,9 @@ class Tokenizer : public Lexer
bool initScanner();
void destroyScanner();
void *mHandle; // Scanner handle.
Context mContext; // Scanner extra.
size_t mMaxTokenSize; // Maximum token size
void *mHandle; // Scanner handle.
Context mContext; // Scanner extra.
size_t mMaxTokenSize; // Maximum token size
};
} // namespace pp
......
......@@ -12,13 +12,12 @@
#include <cmath>
#include <sstream>
namespace pp {
namespace pp
{
inline std::ios::fmtflags numeric_base_int(const std::string &str)
{
if ((str.size() >= 2) &&
(str[0] == '0') &&
(str[1] == 'x' || str[1] == 'X'))
if ((str.size() >= 2) && (str[0] == '0') && (str[1] == 'x' || str[1] == 'X'))
{
return std::ios::hex;
}
......@@ -34,7 +33,7 @@ inline std::ios::fmtflags numeric_base_int(const std::string &str)
// of the correct form. They can only fail if the parsed value is too big,
// in which case false is returned.
template<typename IntType>
template <typename IntType>
bool numeric_lex_int(const std::string &str, IntType *value)
{
std::istringstream stream(str);
......@@ -46,7 +45,7 @@ bool numeric_lex_int(const std::string &str, IntType *value)
return !stream.fail();
}
template<typename FloatType>
template <typename FloatType>
bool numeric_lex_float(const std::string &str, FloatType *value)
{
// On 64-bit Intel Android, istringstream is broken. Until this is fixed in
......@@ -68,6 +67,6 @@ bool numeric_lex_float(const std::string &str, FloatType *value)
#endif
}
} // namespace pp.
} // namespace pp.
#endif // COMPILER_PREPROCESSOR_NUMERICLEX_H_
#endif // COMPILER_PREPROCESSOR_NUMERICLEX_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment