mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
45
Externals/wxWidgets3/include/wx/meta/movable.h
vendored
Normal file
45
Externals/wxWidgets3/include/wx/meta/movable.h
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/meta/movable.h
|
||||
// Purpose: Test if a type is movable using memmove() etc.
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2008-01-21
|
||||
// RCS-ID: $Id: movable.h 64589 2010-06-14 15:12:37Z JMS $
|
||||
// Copyright: (c) 2008 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_META_MOVABLE_H_
|
||||
#define _WX_META_MOVABLE_H_
|
||||
|
||||
#include "wx/meta/pod.h"
|
||||
#include "wx/string.h" // for wxIsMovable<wxString> specialization
|
||||
|
||||
// Helper to decide if an object of type T is "movable", i.e. if it can be
|
||||
// copied to another memory location using memmove() or realloc() C functions.
|
||||
// C++ only gurantees that POD types (including primitive types) are
|
||||
// movable.
|
||||
template<typename T>
|
||||
struct wxIsMovable
|
||||
{
|
||||
wxDEFINE_TEMPLATE_BOOL_VALUE(wxIsPod<T>::value);
|
||||
};
|
||||
|
||||
// Macro to add wxIsMovable<T> specialization for given type that marks it
|
||||
// as movable:
|
||||
#define WX_DECLARE_TYPE_MOVABLE(type) \
|
||||
template<> struct wxIsMovable<type> \
|
||||
{ \
|
||||
wxDEFINE_TEMPLATE_BOOL_VALUE(true); \
|
||||
};
|
||||
|
||||
// Our implementation of wxString is written in such way that it's safe to move
|
||||
// it around (unless position cache is used which unfortunately breaks this).
|
||||
// OTOH, we don't know anything about std::string.
|
||||
// (NB: we don't put this into string.h and choose to include wx/string.h from
|
||||
// here instead so that rarely-used wxIsMovable<T> code isn't included by
|
||||
// everything)
|
||||
#if !wxUSE_STL && !wxUSE_STRING_POS_CACHE
|
||||
WX_DECLARE_TYPE_MOVABLE(wxString)
|
||||
#endif
|
||||
|
||||
#endif // _WX_META_MOVABLE_H_
|
Reference in New Issue
Block a user