Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp
- index 0f678ad..541409e 100644
- --- a/src/libs/cplusplus/pp-engine.cpp
- +++ b/src/libs/cplusplus/pp-engine.cpp
- @@ -916,29 +916,7 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
- if (macroNameRef.size() == 8
- && macroNameRef[0] == '_'
- && macroNameRef[1] == '_') {
- - PPToken newTk;
- - if (macroNameRef == ppLine) {
- - QByteArray txt = QByteArray::number(tk->lineno);
- - newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
- - } else if (macroNameRef == ppFile) {
- - QByteArray txt;
- - txt.append('"');
- - txt.append(m_env->currentFileUtf8);
- - txt.append('"');
- - newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
- - } else if (macroNameRef == ppDate) {
- - QByteArray txt;
- - txt.append('"');
- - txt.append(QDate::currentDate().toString().toUtf8());
- - txt.append('"');
- - newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
- - } else if (macroNameRef == ppTime) {
- - QByteArray txt;
- - txt.append('"');
- - txt.append(QTime::currentTime().toString().toUtf8());
- - txt.append('"');
- - newTk = generateToken(T_STRING_LITERAL, txt.constData(), txt.size(), tk->lineno, false);
- - }
- + PPToken newTk = generateToken(T_STRING_LITERAL, macroNameRef.toByteArray().constData(), macroNameRef.toByteArray().size(), tk->lineno, false);
- if (newTk.hasSource()) {
- newTk.f.newline = tk->newline();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement