8000 Merge pull request #216 from wilx/1.2.x · log4cplus/log4cplus@740d881 · GitHub
[go: up one dir, main page]

Skip to content

Commit 740d881

Browse files
authored
Merge pull request #216 from wilx/1.2.x
Fix GitHub issue #215.
2 parents 4aba5f9 + cca0dd5 commit 740d881

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

include/log4cplus/config.hxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@
109109
# define LOG4CPLUS_HAVE_RVALUE_REFS
110110
#endif
111111

112+
#if defined (LOG4CPLUS_HAVE_CXX11_SUPPORT) \
113+
&& (__has_feature(cxx_noexcept) \
114+
|| (defined (_MSC_VER) && _MSC_VER >= 1900))
115+
# define LOG4CPLUS_NOEXCEPT_FALSE noexcept(false)
116+
#else
117+
# define LOG4CPLUS_NOEXCEPT_FALSE /* empty */
118+
#endif
119+
112120
#if ! defined (UNICODE) && defined (__GNUC__) && __GNUC__ >= 3
113121
# define LOG4CPLUS_FORMAT_ATTRIBUTE(archetype, format_index, first_arg_index) \
114122
__attribute__ ((format (archetype, format_index, first_arg_index)))

include/log4cplus/hierarchylocker.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,25 @@ namespace log4cplus
4848
public:
4949
// ctor & dtor
5050
HierarchyLocker(Hierarchy& h);
51-
~HierarchyLocker();
52-
51+
~HierarchyLocker() LOG4CPLUS_NOEXCEPT_FALSE;
52+
5353
/**
5454
* Calls the <code>resetConfiguration()</code> method on the locked Hierarchy.
5555
*/
56-
void resetConfiguration();
57-
56+
void resetConfiguration();
57+
5858
/**
5959
* Calls the <code>getInstance()</code> method on the locked Hierarchy.
6060
*/
6161
Logger getInstance(const log4cplus::tstring& name);
62-
62+
6363
/**
6464
* Calls the <code>getInstance()</code> method on the locked Hierarchy.
6565
*/
6666
Logger getInstance(const log4cplus::tstring& name, spi::LoggerFactory& factory);
67-
67+
6868
void addAppender(Logger &logger, log4cplus::SharedAppenderPtr& appender);
69-
69+
7070
private:
7171
// Data
7272
Hierarchy& h;
@@ -77,4 +77,3 @@ namespace log4cplus
7777
} // end namespace log4cplus
7878

7979
#endif // LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
80-

src/hierarchylocker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ HierarchyLocker::HierarchyLocker(Hierarchy& _h)
6161
}
6262

6363

64-
HierarchyLocker::~HierarchyLocker()
64+
HierarchyLocker::~HierarchyLocker() LOG4CPLUS_NOEXCEPT_FALSE
6565
{
6666
try {
6767
for(LoggerList::iterator it=loggerList.begin(); it!=loggerList.end(); ++it) {

0 commit comments

Comments
 (0)
0