summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2009-08-11 16:11:44 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-11 16:28:32 (GMT)
commit7c46245633a1edfbdc1ff770a28a7d5e7a5739bf (patch)
tree474cc856efdf8a2d6dc907d1f4957ed486f68087 /src
parent085d1cb57d240e5335517ccd08da699d4faeed6a (diff)
downloadQt-7c46245633a1edfbdc1ff770a28a7d5e7a5739bf.zip
Qt-7c46245633a1edfbdc1ff770a28a7d5e7a5739bf.tar.gz
Qt-7c46245633a1edfbdc1ff770a28a7d5e7a5739bf.tar.bz2
optimize inlines in QFSFileEngine
un-inline isDirPath() since it too large for this (reduce size of QtCore binary in a few kilobytes) Merge-request: 1176 Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index ff10a44..50ed46d 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE
Returns the stdlib open string corresponding to a QIODevice::OpenMode.
*/
-static QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &fileName = QString())
+static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &fileName)
{
QByteArray mode;
if ((flags & QIODevice::ReadOnly) && !(flags & QIODevice::Truncate)) {
@@ -109,7 +109,7 @@ static QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &
Returns the stdio open flags corresponding to a QIODevice::OpenMode.
*/
-static int openModeToOpenFlags(QIODevice::OpenMode mode)
+static inline int openModeToOpenFlags(QIODevice::OpenMode mode)
{
int oflags = QT_OPEN_RDONLY;
#ifdef QT_LARGEFILE_SUPPORT
@@ -138,7 +138,7 @@ static int openModeToOpenFlags(QIODevice::OpenMode mode)
Sets the file descriptor to close on exec. That is, the file
descriptor is not inherited by child processes.
*/
-static bool setCloseOnExec(int fd)
+static inline bool setCloseOnExec(int fd)
{
return fd != -1 && fcntl(fd, F_SETFD, FD_CLOEXEC) != -1;
}
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 3a5e9f4..e669752 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -296,7 +296,7 @@ static bool isUncRoot(const QString &server)
}
#if !defined(Q_OS_WINCE)
-static bool isUncPath(const QString &path)
+static inline bool isUncPath(const QString &path)
{
// Starts with \\, but not \\.
return (path.startsWith(QLatin1String("\\\\"))
@@ -304,7 +304,7 @@ static bool isUncPath(const QString &path)
}
#endif
-static bool isRelativePath(const QString &path)
+static inline bool isRelativePath(const QString &path)
{
return !(path.startsWith(QLatin1Char('/'))
|| (path.length() >= 2
@@ -338,7 +338,7 @@ static bool uncShareExists(const QString &server)
return false;
}
-static bool isDriveRoot(const QString &path)
+static inline bool isDriveRoot(const QString &path)
{
return (path.length() == 3
&& path.at(0).isLetter() && path.at(1) == QLatin1Char(':')
@@ -894,7 +894,7 @@ static inline bool rmDir(const QString &path)
return ::RemoveDirectory((wchar_t*)QFSFileEnginePrivate::longFileName(path).utf16());
}
-static inline bool isDirPath(const QString &dirPath, bool *existed)
+static bool isDirPath(const QString &dirPath, bool *existed)
{
QString path = dirPath;
if (path.length() == 2 && path.at(1) == QLatin1Char(':'))