Kaydet (Commit) f3d96e6a authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

Attempt to fix some vos removal fallout on Windows

After of the vos removal, some classes in other parts of the code now
are subclasses of SimpleReferenceObject.

To avoid compilation and linking errors in those other parts, we seem
to need to have the operator new[] and operator delete[] in
SimpleReferenceObject as protected instead of private. We also need an
implementation of operator delete[]. As it can be unimplemented with
gcc, I hope it isn't actually called, though, so it for now crashes
intentionally if called.

Will see later if this actually works, this is just a commit to make
stuff build.
üst 21b69786
...@@ -121,6 +121,12 @@ private: ...@@ -121,6 +121,12 @@ private:
*/ */
void operator =(SimpleReferenceObject); void operator =(SimpleReferenceObject);
#ifdef _MSC_VER
/* We can't now have these private with MSVC2008 at least, it leads to
compilation errors in xmloff and other places.
*/
protected:
#endif
/** not implemented (see general class documentation) /** not implemented (see general class documentation)
@internal @internal
*/ */
......
...@@ -19,6 +19,7 @@ GetVersionInfo ...@@ -19,6 +19,7 @@ GetVersionInfo
UDK_3.1 { UDK_3.1 {
global: global:
??_VSimpleReferenceObject@salhelper@@KAXPAX@Z;
??_7SimpleReferenceObject@salhelper@@6B@; ??_7SimpleReferenceObject@salhelper@@6B@;
??0Condition@salhelper@@QAE@AAVMutex@osl@@@Z; ??0Condition@salhelper@@QAE@AAVMutex@osl@@@Z;
......
...@@ -74,4 +74,19 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &) ...@@ -74,4 +74,19 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
#endif // WNT #endif // WNT
} }
#ifdef _MSC_VER
/* This operator is supposed to be unimplemented, but that now leads
* to compilation and/or linking errors with MSVC2008. (Don't know
* about MSVC2010.) As it can be left unimplemented just fine with
* gcc, presumably it is never called. So do implement it then to
* avoid the compilation and/or linking errors, but make it crash
* intentionally if called.
*/
void SimpleReferenceObject::operator delete[](void * /* pPtr */)
{
free(NULL);
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment