Click here to Skip to main content
15,908,901 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get another process Debug Registers of content Pin
Stephen Hewitt2-Jun-10 17:05
Stephen Hewitt2-Jun-10 17:05 
QuestionGDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
vkinra2-Jun-10 10:49
vkinra2-Jun-10 10:49 
AnswerRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
John R. Shaw2-Jun-10 11:34
John R. Shaw2-Jun-10 11:34 
GeneralRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
vkinra2-Jun-10 11:57
vkinra2-Jun-10 11:57 
GeneralRe: GDI: Create 8bit grayscale bitmap from raw pixel intensity data problem Pin
John R. Shaw2-Jun-10 13:29
John R. Shaw2-Jun-10 13:29 
QuestionShort Circuit Evaluation Pin
bob169722-Jun-10 6:47
bob169722-Jun-10 6:47 
AnswerRe: Short Circuit Evaluation PinPopular
Luc Pattyn2-Jun-10 7:39
sitebuilderLuc Pattyn2-Jun-10 7:39 
GeneralRe: Short Circuit Evaluation Pin
bob169722-Jun-10 9:57
bob169722-Jun-10 9:57 
GeneralRe: Short Circuit Evaluation Pin
Luc Pattyn2-Jun-10 10:00
sitebuilderLuc Pattyn2-Jun-10 10:00 
GeneralRe: Short Circuit Evaluation Pin
Tim Craig2-Jun-10 16:46
Tim Craig2-Jun-10 16:46 
GeneralRe: Short Circuit Evaluation Pin
Stephen Hewitt2-Jun-10 17:07
Stephen Hewitt2-Jun-10 17:07 
QuestionHow much Memory my App uses? Pin
Software20072-Jun-10 5:00
Software20072-Jun-10 5:00 
AnswerRe: use GetProcessMemoryInfo Pin
Software_Developer2-Jun-10 5:09
Software_Developer2-Jun-10 5:09 
AnswerRe: How much Memory my App uses? Pin
Maximilien2-Jun-10 5:09
Maximilien2-Jun-10 5:09 
AnswerRe: How much Memory my App uses? Pin
Nuri Ismail2-Jun-10 5:12
Nuri Ismail2-Jun-10 5:12 
GeneralRe: How much Memory my App uses? [modified] Pin
Software20073-Jun-10 6:01
Software20073-Jun-10 6:01 
QuestionRe: How much Memory my App uses? Pin
David Crow3-Jun-10 7:32
David Crow3-Jun-10 7:32 
GeneralRe: How much Memory my App uses? Pin
Nuri Ismail3-Jun-10 7:54
Nuri Ismail3-Jun-10 7:54 
GeneralRe: How much Memory my App uses? Pin
Software20073-Jun-10 9:56
Software20073-Jun-10 9:56 
GeneralRe: How much Memory my App uses? Pin
Nuri Ismail4-Jun-10 5:49
Nuri Ismail4-Jun-10 5:49 
Question(Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Maximilien2-Jun-10 4:13
Maximilien2-Jun-10 4:13 
Just reviewing some code...

In it, there is a line like this :

CString s;
//... do something with s.

if ( s.GetLength() > 0 )
{
// do something else.
}


my first reaction was to note that and propose change the GetLength with IsEmpty()
if ( !s.IsEmpty() )
{
// do something else.
}


Looking at the code CString code (VS2008 and VS2010) for IsEmpty(), it calls GetLength(). The generated code will probably be optimized to the same assembly.

Was there a time (I don't have VS2003 or VC6 installed to check) when GetLength and IsEmpty were "really" different ? or they are there for code readbility issue ?

Thanks.

Max.
Watched code never compiles.

AnswerRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Aescleal2-Jun-10 4:25
Aescleal2-Jun-10 4:25 
AnswerRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
David Crow2-Jun-10 5:52
David Crow2-Jun-10 5:52 
GeneralRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Emilio Garavaglia2-Jun-10 7:15
Emilio Garavaglia2-Jun-10 7:15 
GeneralRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
David Crow2-Jun-10 8:08
David Crow2-Jun-10 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.