summaryrefslogtreecommitdiffstats
path: root/src/utf8.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-03-28 11:58:30 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-03-28 12:25:48 (GMT)
commitc48639744a6fa118b9851b307107994ba93ce4c8 (patch)
tree8917c567f8f00560fba4554ade2b7e79bbe3ff45 /src/utf8.h
parentcef71dc4fcfca9e3580214c39f20dc538ed6b2d9 (diff)
downloadDoxygen-c48639744a6fa118b9851b307107994ba93ce4c8.zip
Doxygen-c48639744a6fa118b9851b307107994ba93ce4c8.tar.gz
Doxygen-c48639744a6fa118b9851b307107994ba93ce4c8.tar.bz2
Refactoring: Add TextStream buffer to improve output writing performance
- direct use of std::stringstream and std::ostream gave a 30% drop in performance.
Diffstat (limited to 'src/utf8.h')
-rw-r--r--src/utf8.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utf8.h b/src/utf8.h
index c4c8aad..538230d 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -18,7 +18,8 @@
#include <cstdint>
#include <string>
-#include <iostream>
+
+class TextStream;
/** @file
* @brief Various UTF8 related helper functions.
@@ -55,7 +56,7 @@ int getUTF8CharNumBytes(char firstByte);
/** Writes the UTF8 character pointed to by s to stream t and returns a pointer
* to the next character.
*/
-const char *writeUTF8Char(std::ostream &t,const char *s);
+const char *writeUTF8Char(TextStream &t,const char *s);
/** Returns true iff the last character in input is a multibyte character. */
bool lastUTF8CharIsMultibyte(const std::string &input);