[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [libqgit2] src: Inline return code checking
From: Peter_Kümmel <syntheticpp () gmx ! net>
Date: 2014-03-02 13:56:53
Message-ID: E1WK6sv-0005cs-Ni () scm ! kde ! org
[Download RAW message or body]
Git commit ef7d236e883a608ee0bbef81dd308e82e0ce9ec8 by Peter Kümmel.
Committed on 02/03/2014 at 13:50.
Pushed by kuemmel into branch 'master'.
Inline return code checking
M +0 -7 src/qgitexception.cpp
M +1 -1 src/qgitexception.h
http://commits.kde.org/libqgit2/ef7d236e883a608ee0bbef81dd308e82e0ce9ec8
diff --git a/src/qgitexception.cpp b/src/qgitexception.cpp
index a502f0f..6d0bebb 100644
--- a/src/qgitexception.cpp
+++ b/src/qgitexception.cpp
@@ -49,12 +49,5 @@ QByteArray Exception::message() const throw()
return m;
}
-int qGitThrow(int ret)
-{
- if (ret < 0) {
- throw Exception();
- }
- return ret;
-}
}
diff --git a/src/qgitexception.h b/src/qgitexception.h
index fbae150..45081f5 100644
--- a/src/qgitexception.h
+++ b/src/qgitexception.h
@@ -48,7 +48,7 @@ namespace LibQGit2
QByteArray m;
};
- int qGitThrow(int ret);
+ inline int qGitThrow(int ret) { if (ret < 0) throw Exception(); return ret; }
inline void qGitEnsureValue(int value, int ret) { if (qGitThrow(ret) != value) throw Exception(); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic