summaryrefslogtreecommitdiff
path: root/glib/glibmm/utility.h
diff options
context:
space:
mode:
Diffstat (limited to 'glib/glibmm/utility.h')
-rw-r--r--glib/glibmm/utility.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/glib/glibmm/utility.h b/glib/glibmm/utility.h
index 096b9fe3..3cbca146 100644
--- a/glib/glibmm/utility.h
+++ b/glib/glibmm/utility.h
@@ -25,65 +25,11 @@
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#ifndef GLIBMM_DISABLE_DEPRECATED
-/* Occasionally, a struct variable has to be initialized after its definition,
- * i.e. when using structs as class member data. For convenience, the macro
- * GLIBMM_INITIALIZE_STRUCT(Var, Type) is provided. It even avoids creating
- * a temporary if the compiler is GCC.
- *
- * @deprecated Use e.g. std::memset() instead.
- * It's not used any more in the code generated by _CLASS_BOXEDTYPE_STATIC.
- * It generates compiler warnings if __STRICT_ANSI__ is defined.
- */
-#if ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__)
-
-#define GLIBMM_INITIALIZE_STRUCT(Var, Type) __builtin_memset(&(Var), 0, sizeof(Type))
-
-#else
-
-// TODO: This causes warnings like this:
-//"missing initializer for member"
-#define GLIBMM_INITIALIZE_STRUCT(Var, Type) \
- G_STMT_START \
- { \
- Type const temp_initializer__ = { \
- 0, \
- }; \
- (Var) = temp_initializer__; \
- } \
- G_STMT_END
-
-#endif
-#endif // GLIBMM_DISABLE_DEPRECATED
-
namespace Glib
{
// These are used by gmmproc-generated type conversions:
-#ifndef GLIBMM_DISABLE_DEPRECATED
-/** Helper to deal with memory allocated
- * by GLib functions in an exception-safe manner.
- *
- * @deprecated Use make_unique_ptr_gfree() instead.
- */
-template <typename T>
-class ScopedPtr
-{
-private:
- T* ptr_;
- ScopedPtr(const ScopedPtr<T>&);
- ScopedPtr<T>& operator=(const ScopedPtr<T>&);
-
-public:
- ScopedPtr() : ptr_(nullptr) {}
- explicit ScopedPtr(T* ptr) : ptr_(ptr) {}
- ~ScopedPtr() noexcept { g_free(ptr_); }
- T* get() const { return ptr_; }
- T** addr() { return &ptr_; }
-};
-#endif // GLIBMM_DISABLE_DEPRECATED
-
/** Helper to deal with memory allocated
* by GLib functions in an exception-safe manner.
*