Feature request.

30 views
Skip to first unread message

Ivan Timofeev

unread,
Nov 4, 2011, 11:28:55 AM11/4/11
to Logog
Could you please add the methods below to make the Object class
complete and suppress compliler's warnings?

#ifdef _DEBUG
#ifdef LOGOG_FLAVOR_WINDOWS
void operator delete(void* ptr, LPCSTR lpszFileName, int nLine);
void operator delete[](void* ptr, LPCSTR lpszFileName, int
nLine);
#endif // LOGOG_FLAVOR_WINDOWS
#endif // _DEBUG


#ifdef _DEBUG
#ifdef LOGOG_FLAVOR_WINDOWS

void Object::operator delete(void *ptr, LPCSTR lpszFileName, int
nLine)
{
lpszFileName;
nLine;
Deallocate( ptr );
}

void Object::operator delete[](void *ptr, LPCSTR lpszFileName, int
nLine)
{
lpszFileName;
nLine;
Deallocate( ptr );
}

#endif // LOGOG_FLAVOR_WINDOWS
#endif // _DEBUG

=======================================================================
replace localtime for localtime_ s in the TimeStamp::Get() method?

const char * TimeStamp::Get()
{
time_t tRawTime;
struct tm tmInfo;

time ( &tRawTime );
localtime_s( &tmInfo, &tRawTime );

strftime (cTimeString, LOGOG_TIME_STRING_MAX, "%c", &tmInfo);

return cTimeString;
}

=========================================================================

Add a public method to the String class:

LOGOG_CHAR* c_str() const;

LOGOG_CHAR* String::c_str() const
{
return m_pBuffer;
}

When subclassing the Target class it is necessary to have access to
the raw data char* or wchar_t*

Thanks!

John Byrd

unread,
Nov 6, 2011, 10:30:55 PM11/6/11
to lo...@googlegroups.com
I made the Microsoft compiler stop complaining about the localtime() function.

It's possible to access the m_pBuffer field directly when subclassing
a target. Regardless I added your c_str() function to String.

I also added the delete() calls, again to make Microsoft happy.

Please download latest and let me know, thanks.

jwb

> --
> You received this message because you are subscribed to the Google Groups "Logog" group.
> To post to this group, send email to lo...@googlegroups.com.
> To unsubscribe from this group, send email to logog+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/logog?hl=en.
>
>

--
---

John Byrd
Gigantic Software
2102 Business Center Drive
Suite 144
Irvine, CA   92612-1001
http://www.giganticsoftware.com
T: (949) 892-3526 F: (206) 309-0850

Reply all
Reply to author
Forward
0 new messages