Click here to Skip to main content
15,887,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: (Probably a non-question) CString GetLength vs. IsEmpty ? Pin
Emilio Garavaglia2-Jun-10 20:53
Emilio Garavaglia2-Jun-10 20:53 
QuestionInterview question Pin
AkashAg2-Jun-10 2:28
AkashAg2-Jun-10 2:28 
AnswerRe: Interview question Pin
Aescleal2-Jun-10 2:38
Aescleal2-Jun-10 2:38 
GeneralRe: Interview question Pin
AkashAg2-Jun-10 2:45
AkashAg2-Jun-10 2:45 
QuestionDllRegister Server Error 0x8007007e Pin
Schehaider_Aymen2-Jun-10 0:58
Schehaider_Aymen2-Jun-10 0:58 
AnswerRe: DllRegister Server Error 0x8007007e Pin
KarstenK2-Jun-10 2:40
mveKarstenK2-Jun-10 2:40 
GeneralRe: DllRegister Server Error 0x8007007e Pin
Schehaider_Aymen2-Jun-10 3:05
Schehaider_Aymen2-Jun-10 3:05 
GeneralRe: DllRegister Server Error 0x8007007e Pin
Schehaider_Aymen2-Jun-10 3:29
Schehaider_Aymen2-Jun-10 3:29 
GeneralRe: DllRegister Server Error 0x8007007e Pin
KarstenK2-Jun-10 3:34
mveKarstenK2-Jun-10 3:34 
GeneralRe: DllRegister Server Error 0x8007007e Pin
Schehaider_Aymen2-Jun-10 4:24
Schehaider_Aymen2-Jun-10 4:24 
GeneralRe: DllRegister Server Error 0x8007007e Pin
KarstenK2-Jun-10 4:33
mveKarstenK2-Jun-10 4:33 
GeneralRe: DllRegister Server Error 0x8007007e Pin
Code-o-mat2-Jun-10 4:30
Code-o-mat2-Jun-10 4:30 
GeneralRe: DllRegister Server Error 0x8007007e Pin
Schehaider_Aymen2-Jun-10 5:01
Schehaider_Aymen2-Jun-10 5:01 

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.