summaryrefslogtreecommitdiffstats
path: root/src/bufstr.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-06 19:57:02 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-02-06 20:26:55 (GMT)
commit38fdb5cf1193c792153c139800c92c37a555f9d1 (patch)
tree6ad236162bfec727bab18f1e254642cb8b3fc15d /src/bufstr.h
parent0c612fec125124a062b1ba26244631e334e328b7 (diff)
downloadDoxygen-38fdb5cf1193c792153c139800c92c37a555f9d1.zip
Doxygen-38fdb5cf1193c792153c139800c92c37a555f9d1.tar.gz
Doxygen-38fdb5cf1193c792153c139800c92c37a555f9d1.tar.bz2
Refactoring: replace QCString with std::string in constexp
Diffstat (limited to 'src/bufstr.h')
-rw-r--r--src/bufstr.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/bufstr.h b/src/bufstr.h
index e64a049..ca733ad 100644
--- a/src/bufstr.h
+++ b/src/bufstr.h
@@ -1,13 +1,13 @@
/******************************************************************************
*
- *
+ *
*
*
* Copyright (C) 1997-2015 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.
*
@@ -18,20 +18,18 @@
#ifndef _BUFSTR_H
#define _BUFSTR_H
-#include <qglobal.h>
-#include <qcstring.h>
-#include <stdlib.h>
+#include <cstdlib>
/*! @brief Buffer used to store strings
- *
+ *
* This buffer is used append characters and strings. It will automatically
* resize itself, yet provide efficient random access to the content.
*/
-class BufStr
+class BufStr
{
public:
- BufStr(uint size)
- : m_size(size), m_writeOffset(0), m_spareRoom(10240), m_buf(0)
+ BufStr(uint size)
+ : m_size(size), m_writeOffset(0), m_spareRoom(10240), m_buf(0)
{
m_buf = (char *)calloc(size,1);
}
@@ -95,8 +93,8 @@ class BufStr
return m_buf;
}
uint curPos() const
- {
- return m_writeOffset;
+ {
+ return m_writeOffset;
}
void dropFromStart(uint bytes)
{
@@ -108,7 +106,7 @@ class BufStr
private:
void makeRoomFor(uint size)
{
- if (m_writeOffset+size>=m_size)
+ if (m_writeOffset+size>=m_size)
{
resize(m_size+size+m_spareRoom);
}