aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <swo-dev@marcschink.de>2017-03-12 19:21:07 +0100
committerMarc Schink <swo-dev@marcschink.de>2017-03-12 19:21:07 +0100
commit268a6cdb540f3679059306cf6cdece732bac00c0 (patch)
tree08f5990d6e419243785ec032de6920c94f023d97
parent735743a66ad8f80d00dade11cde8a525b03deeaf (diff)
Minor code cleanups
-rw-r--r--bindings/cxx/libswocxx.h3
-rw-r--r--bindings/python/Context.h2
-rw-r--r--bindings/python/swopy.i8
-rw-r--r--configure.ac6
-rw-r--r--libswo/libswo.h1
5 files changed, 9 insertions, 11 deletions
diff --git a/bindings/cxx/libswocxx.h b/bindings/cxx/libswocxx.h
index 01f92ff..0418f7f 100644
--- a/bindings/cxx/libswocxx.h
+++ b/bindings/cxx/libswocxx.h
@@ -331,7 +331,8 @@ private:
LogCallbackHelper _log_callback;
};
-class LIBSWO_API Version {
+class LIBSWO_API Version
+{
public:
static int get_package_major(void);
static int get_package_minor(void);
diff --git a/bindings/python/Context.h b/bindings/python/Context.h
index 3aed9ed..4b9006c 100644
--- a/bindings/python/Context.h
+++ b/bindings/python/Context.h
@@ -20,8 +20,6 @@
#ifndef LIBSWO_BINDINGS_PYTHON_CONTEXT_H
#define LIBSWO_BINDINGS_PYTHON_CONTEXT_H
-#include <string>
-
#include "libswocxx.h"
class Context : public libswo::Context
diff --git a/bindings/python/swopy.i b/bindings/python/swopy.i
index 0420571..527ae9a 100644
--- a/bindings/python/swopy.i
+++ b/bindings/python/swopy.i
@@ -126,9 +126,9 @@ static int log_callback(libswo::LogLevel level, const std::string &message,
}
if (res == Py_None || res == Py_True) {
- ret = 1;
+ ret = true;
} else if (res == Py_False) {
- ret = 0;
+ ret = false;
} else {
PyErr_SetString(PyExc_TypeError, "log callback function "
"neither returned a boolean value nor None");
@@ -247,9 +247,9 @@ static int packet_callback(const libswo::Packet &packet, void *user_data)
}
if (res == Py_None || res == Py_True) {
- ret = 1;
+ ret = true;
} else if (res == Py_False) {
- ret = 0;
+ ret = false;
} else {
PyErr_SetString(PyExc_TypeError, "decoder callback function "
"neither returned a boolean value nor None");
diff --git a/configure.ac b/configure.ac
index 348371c..91557bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ PKG_PROG_PKG_CONFIG
# Checks for library functions.
# Disable progress and informational output of libtool.
-AC_SUBST(AM_LIBTOOLFLAGS, '--silent')
+AC_SUBST([AM_LIBTOOLFLAGS], '--silent')
# Check for SWIG.
AC_CHECK_PROGS([SWIG], [swig swig3.0 swig2.0])
@@ -155,8 +155,8 @@ else
python_msg=" ($python_msg)"
fi
-AM_CONDITIONAL(BINDINGS_CXX, [test "x$BINDINGS_CXX" = "xyes"])
-AM_CONDITIONAL(BINDINGS_PYTHON, [test "x$BINDINGS_PYTHON" = "xyes"])
+AM_CONDITIONAL([BINDINGS_CXX], [test "x$BINDINGS_CXX" = "xyes"])
+AM_CONDITIONAL([BINDINGS_PYTHON], [test "x$BINDINGS_PYTHON" = "xyes"])
# Use C99 compatible stdio functions on MinGW instead of the incompatible
# functions provided by Microsoft.
diff --git a/libswo/libswo.h b/libswo/libswo.h
index e4aeaf9..99ba761 100644
--- a/libswo/libswo.h
+++ b/libswo/libswo.h
@@ -63,7 +63,6 @@ enum libswo_log_level {
LIBSWO_LOG_LEVEL_DEBUG = 4
};
-
/** Default libswo log domain. */
#define LIBSWO_LOG_DOMAIN_DEFAULT "libswo: "