Added a new overload of wxDecToHex and used it in wxRichTextImageBlock::WriteHex

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-06-11 17:16:59 +00:00
parent 4e5b3a4eb5
commit f728025eae
3 changed files with 12 additions and 14 deletions

View File

@@ -140,6 +140,15 @@ void wxDecToHex(int dec, wxChar *buf)
buf[2] = 0;
}
// Convert decimal integer to 2 characters
void wxDecToHex(int dec, char* ch1, char* ch2)
{
int firstDigit = (int)(dec/16.0);
int secondDigit = (int)(dec - (firstDigit*16.0));
(*ch1) = (char) hexArray[firstDigit];
(*ch2) = (char) hexArray[secondDigit];
}
// Convert decimal integer to 2-character hex string
wxString wxDecToHex(int dec)
{
@@ -821,7 +830,7 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags)
wxLogDebug(wxT("ICStart error %d"), (int) err);
return false;
}
#else
#else
// (non-Mac, non-MSW)
#ifdef __UNIX__