summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-03-29 10:02:44 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-03-29 10:02:44 (GMT)
commit26f3d147cf3acf62007cb2223c46d6dd033c6fd5 (patch)
treedb6cd68ffb1e3e1f21dab3578aeddad4154f069c /src
parentb0554573d373519dbf8bc7109e0e143952ec6302 (diff)
downloadDoxygen-26f3d147cf3acf62007cb2223c46d6dd033c6fd5.zip
Doxygen-26f3d147cf3acf62007cb2223c46d6dd033c6fd5.tar.gz
Doxygen-26f3d147cf3acf62007cb2223c46d6dd033c6fd5.tar.bz2
Revert addition of std::string conversion operator for QCString
Diffstat (limited to 'src')
-rw-r--r--src/dotrunner.cpp12
-rw-r--r--src/pre.l12
-rw-r--r--src/section.h5
3 files changed, 15 insertions, 14 deletions
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index cb6bd73..c9ff284 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -73,7 +73,7 @@ static bool resetPDFSize(const int width,const int height, const char *base)
}
QFile fi(tmpName);
QFile fo(patchFile);
- if (!fi.open(IO_ReadOnly))
+ if (!fi.open(IO_ReadOnly))
{
err("problem opening file %s for patching!\n",tmpName.data());
QDir::current().rename(tmpName,patchFile);
@@ -117,7 +117,7 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
int bblen = (int)strlen(bb);
FILE *f = Portable::fopen(fileName,"rb");
- if (!f)
+ if (!f)
{
//printf("readBoundingBox: could not open %s\n",fileName);
return FALSE;
@@ -158,7 +158,7 @@ DotRunner::DotRunner(const std::string& absDotName, const std::string& md5Hash)
void DotRunner::addJob(const char *format, const char *output)
{
-
+
for (auto& s: m_jobs)
{
if (s.format != format) continue;
@@ -226,20 +226,20 @@ bool DotRunner::run()
}
// remove .dot files
- if (m_cleanUp)
+ if (m_cleanUp)
{
//printf("removing dot file %s\n",m_file.data());
Portable::unlink(m_file.data());
}
// create checksum file
- if (!m_md5Hash.empty())
+ if (!m_md5Hash.empty())
{
QCString md5Name = getBaseNameOfOutput(m_file.data()) + ".md5";
FILE *f = Portable::fopen(md5Name,"w");
if (f)
{
- fwrite(m_md5Hash.data(),1,32,f);
+ fwrite(m_md5Hash.data(),1,32,f);
fclose(f);
}
}
diff --git a/src/pre.l b/src/pre.l
index 1dd6004..c7b874f 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1782,13 +1782,13 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
// global guard
if (state->curlyCount==0) // not #include inside { ... }
{
- if (g_allIncludes.find(absName)!=g_allIncludes.end())
+ if (g_allIncludes.find(absName.data())!=g_allIncludes.end())
{
alreadyIncluded = TRUE;
//printf(" already included 1\n");
return 0; // already done
}
- g_allIncludes.insert(absName);
+ g_allIncludes.insert(absName.data());
}
// check include stack for absName
@@ -2396,7 +2396,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//printf("<expandExpression: empty\n");
return TRUE;
}
- if (state->expanded.find(expr)!=state->expanded.end() &&
+ if (state->expanded.find(expr.data())!=state->expanded.end() &&
level>MAX_EXPANSION_DEPTH) // check for too deep recursive expansions
{
//printf("<expandExpression: already expanded expr='%s'\n",expr.data());
@@ -2404,7 +2404,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
}
else
{
- state->expanded.insert(expr);
+ state->expanded.insert(expr.data());
}
QCString macroName;
QCString expMacro;
@@ -2419,7 +2419,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//printf(" p=%d macroName=%s\n",p,macroName.data());
if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
{
- if (state->expandedDict.find(macroName)==state->expandedDict.end()) // expand macro
+ if (state->expandedDict.find(macroName.data())==state->expandedDict.end()) // expand macro
{
Define *def=state->defineManager.isDefined(macroName);
if (macroName=="defined")
@@ -2472,7 +2472,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
{
state->expandedDict.emplace(macroName,def);
expanded = expandExpression(yyscanner,resultExpr,&restExpr,0,level+1);
- state->expandedDict.erase(macroName);
+ state->expandedDict.erase(macroName.data());
}
if (expanded)
{
diff --git a/src/section.h b/src/section.h
index 9f1916e..ce778b9 100644
--- a/src/section.h
+++ b/src/section.h
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -16,6 +16,7 @@
#ifndef SECTION_H
#define SECTION_H
+#include <string>
#include <unordered_map>
#include <qcstring.h>