[glom] C++11: Use c* headers instead of *.h.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] C++11: Use c* headers instead of *.h.
- Date: Mon, 7 Nov 2016 19:48:04 +0000 (UTC)
commit 72040e63b23e225d19753aa34903394ca546d64d
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 7 17:06:13 2016 +0100
C++11: Use c* headers instead of *.h.
glom/libglom/connectionpool.cc | 2 +-
glom/libglom/connectionpool_backends/mysql_self.cc | 2 +-
.../connectionpool_backends/postgres_self.cc | 4 ++--
glom/libglom/data_structure/glomconversions.cc | 2 +-
glom/libglom/translations_po.cc | 2 +-
.../relationships_overview/canvas_group_dbtable.cc | 2 +-
.../mode_design/translation/window_translations.cc | 2 +-
glom/utility_widgets/canvas/canvas_editable.cc | 2 +-
glom/utility_widgets/canvas/canvas_group_grid.cc | 2 +-
tests/python/test_load_python_library.cc | 4 ++--
10 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/glom/libglom/connectionpool.cc b/glom/libglom/connectionpool.cc
index 1c30f39..ccbb81f 100644
--- a/glom/libglom/connectionpool.cc
+++ b/glom/libglom/connectionpool.cc
@@ -37,7 +37,7 @@
# include <libepc/publisher.h>
#endif
-#include <signal.h> //To catch segfaults
+#include <csignal> //To catch segfaults
#include <glibmm/convert.h>
#include <glibmm/miscutils.h>
diff --git a/glom/libglom/connectionpool_backends/mysql_self.cc
b/glom/libglom/connectionpool_backends/mysql_self.cc
index 46abb7a..823c116 100644
--- a/glom/libglom/connectionpool_backends/mysql_self.cc
+++ b/glom/libglom/connectionpool_backends/mysql_self.cc
@@ -39,7 +39,7 @@
#else
# include <sys/types.h>
# include <sys/socket.h>
-# include <errno.h>
+# include <cerrno>
# include <netinet/in.h> //For sockaddr_in
#endif
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc
b/glom/libglom/connectionpool_backends/postgres_self.cc
index b3ccf52..6e751d4 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -40,11 +40,11 @@
#else
# include <sys/types.h>
# include <sys/socket.h>
-# include <errno.h>
+# include <cerrno>
# include <netinet/in.h> //For sockaddr_in
#endif
-#include <signal.h> //To catch segfaults
+#include <csignal> //To catch segfaults
// Uncomment to see debug messages
//#define GLOM_CONNECTION_DEBUG
diff --git a/glom/libglom/data_structure/glomconversions.cc b/glom/libglom/data_structure/glomconversions.cc
index 170cbee..e834919 100644
--- a/glom/libglom/data_structure/glomconversions.cc
+++ b/glom/libglom/data_structure/glomconversions.cc
@@ -32,7 +32,7 @@
#include <ctime> // for struct tm
#include <iostream> // for cout, endl
#include <iomanip>
-#include <string.h> // for strlen, memset, strcmp
+#include <cstring> // for strlen, memset, strcmp
#include <glibmm/i18n-lib.h>
diff --git a/glom/libglom/translations_po.cc b/glom/libglom/translations_po.cc
index 13fcd60..cd24d74 100644
--- a/glom/libglom/translations_po.cc
+++ b/glom/libglom/translations_po.cc
@@ -32,7 +32,7 @@
#include <iostream>
/* For really ugly hacks! */
-#include <setjmp.h>
+#include <csetjmp>
#define GLOM_PO_HEADER \
"msgid \"\"\n" \
diff --git a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
index 3fe24fa..4602888 100644
--- a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
+++ b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
@@ -27,7 +27,7 @@
#include <goocanvasmm/rect.h>
#include <goocanvasmm/polyline.h>
#include <goocanvasmm/text.h>
-#include <math.h>
+#include <cmath>
#include <iostream>
#include <goocanvasrect.h>
#include <goocanvaspolyline.h>
diff --git a/glom/mode_design/translation/window_translations.cc
b/glom/mode_design/translation/window_translations.cc
index af2390a..45e9f85 100644
--- a/glom/mode_design/translation/window_translations.cc
+++ b/glom/mode_design/translation/window_translations.cc
@@ -31,7 +31,7 @@
#include <gtkmm/filechooserdialog.h>
#include <glibmm/i18n.h>
-#include <string.h> // for memset
+#include <cstring> // for memset
#include <sstream>
diff --git a/glom/utility_widgets/canvas/canvas_editable.cc b/glom/utility_widgets/canvas/canvas_editable.cc
index e391a8e..87b4228 100644
--- a/glom/utility_widgets/canvas/canvas_editable.cc
+++ b/glom/utility_widgets/canvas/canvas_editable.cc
@@ -21,7 +21,7 @@
#include "canvas_editable.h"
#include "canvas_group_resizable.h"
#include "canvas_rect_movable.h"
-#include <math.h>
+#include <cmath>
#include <iostream>
namespace Glom
diff --git a/glom/utility_widgets/canvas/canvas_group_grid.cc
b/glom/utility_widgets/canvas/canvas_group_grid.cc
index d43fc08..15cec1c 100644
--- a/glom/utility_widgets/canvas/canvas_group_grid.cc
+++ b/glom/utility_widgets/canvas/canvas_group_grid.cc
@@ -21,7 +21,7 @@
#include "canvas_group_grid.h"
#include "canvas_line_movable.h"
#include <goocanvasmm/canvas.h>
-#include <math.h>
+#include <cmath>
#include <iostream>
namespace Glom
diff --git a/tests/python/test_load_python_library.cc b/tests/python/test_load_python_library.cc
index 93c75fb..7b2e8bc 100644
--- a/tests/python/test_load_python_library.cc
+++ b/tests/python/test_load_python_library.cc
@@ -1,5 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include <dlfcn.h>
#include "config.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]