[vte] all: Remove overzealous use of constexpr
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] all: Remove overzealous use of constexpr
- Date: Sat, 13 Jan 2018 21:30:15 +0000 (UTC)
commit 5f5a11a42b86afed9e1984518d7fe5477289c65b
Author: Christian Persch <chpe src gnome org>
Date: Sat Jan 13 22:29:28 2018 +0100
all: Remove overzealous use of constexpr
Seems some compilers don't like it in these places.
src/attr.hh | 14 +++++++-------
src/color-triple.hh | 12 ++++++------
src/vterowdata.h | 10 +++++-----
3 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/attr.hh b/src/attr.hh
index 9089927..7288ed9 100644
--- a/src/attr.hh
+++ b/src/attr.hh
@@ -104,9 +104,9 @@
#define VTE_ATTR_NONE (0U)
#define VTE_ATTR_DEFAULT (VTE_ATTR_COLUMNS(1))
-static constexpr inline void vte_attr_set_bool(uint32_t* attr,
- uint32_t mask,
- bool value)
+static inline void vte_attr_set_bool(uint32_t* attr,
+ uint32_t mask,
+ bool value)
{
if (value)
*attr |= mask;
@@ -114,10 +114,10 @@ static constexpr inline void vte_attr_set_bool(uint32_t* attr,
*attr &= ~mask;
}
-static constexpr inline void vte_attr_set_value(uint32_t* attr,
- uint32_t mask,
- unsigned int shift,
- uint32_t value)
+static inline void vte_attr_set_value(uint32_t* attr,
+ uint32_t mask,
+ unsigned int shift,
+ uint32_t value)
{
g_assert_cmpuint(value << shift, <=, mask); /* assurance */
*attr = (*attr & ~mask) | ((value << shift) & mask /* assurance */);
diff --git a/src/color-triple.hh b/src/color-triple.hh
index 2321f4a..d5b1ea8 100644
--- a/src/color-triple.hh
+++ b/src/color-triple.hh
@@ -48,20 +48,20 @@ static constexpr inline vte_color_triple_t vte_color_triple_copy(vte_color_tripl
return ct;
}
-static inline constexpr void vte_color_triple_set_fore(vte_color_triple_t* ct,
- uint32_t fore)
+static inline void vte_color_triple_set_fore(vte_color_triple_t* ct,
+ uint32_t fore)
{
*ct = (*ct & ~VTE_COLOR_TRIPLE_FORE_MASK) | (uint64_t(fore)) << VTE_COLOR_TRIPLE_FORE_SHIFT;
}
-static inline constexpr void vte_color_triple_set_back(vte_color_triple_t* ct,
- uint32_t back)
+static inline void vte_color_triple_set_back(vte_color_triple_t* ct,
+ uint32_t back)
{
*ct = (*ct & ~VTE_COLOR_TRIPLE_BACK_MASK) | (uint64_t(back)) << VTE_COLOR_TRIPLE_BACK_SHIFT;
}
-static inline constexpr void vte_color_triple_set_deco(vte_color_triple_t* ct,
- uint32_t deco)
+static inline void vte_color_triple_set_deco(vte_color_triple_t* ct,
+ uint32_t deco)
{
*ct = (*ct & ~VTE_COLOR_TRIPLE_DECO_MASK) | (uint64_t(deco)) << VTE_COLOR_TRIPLE_DECO_SHIFT;
}
diff --git a/src/vterowdata.h b/src/vterowdata.h
index 410219a..80483d3 100644
--- a/src/vterowdata.h
+++ b/src/vterowdata.h
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
*/
#define CELL_ATTR_BOOL(lname,uname) \
- inline constexpr void set_##lname(bool value) \
+ inline void set_##lname(bool value) \
{ \
vte_attr_set_bool(&attr, VTE_ATTR_##uname##_MASK, value); \
} \
@@ -56,7 +56,7 @@ G_BEGIN_DECLS
}
#define CELL_ATTR_UINT(lname,uname) \
- inline constexpr void set_##lname(unsigned int value) \
+ inline void set_##lname(unsigned int value) \
{ \
vte_attr_set_value(&attr, VTE_ATTR_##uname##_MASK, VTE_ATTR_##uname##_SHIFT, value); \
} \
@@ -85,13 +85,13 @@ typedef struct _VTE_GNUC_PACKED VteCellAttr {
inline constexpr uint64_t colors() const { return m_colors; }
- inline constexpr void copy_colors(VteCellAttr const& other)
+ inline void copy_colors(VteCellAttr const& other)
{
m_colors = vte_color_triple_copy(other.colors());
}
#define CELL_ATTR_COLOR(name) \
- inline constexpr void set_##name(uint32_t value) \
+ inline void set_##name(uint32_t value) \
{ \
vte_color_triple_set_##name(&m_colors, value); \
} \
@@ -121,7 +121,7 @@ typedef struct _VTE_GNUC_PACKED VteCellAttr {
return !(attr & mask);
}
- inline constexpr void unset(uint32_t mask)
+ inline void unset(uint32_t mask)
{
attr &= ~mask;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]