News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

variable/type name question

Started by ollydbg, August 31, 2012, 03:49:45 AM

Previous topic - Next topic

ollydbg


   // pair of current-file-filter
   TokenFilesSet    m_CurrentFileSet;
   TokenIdxSet      m_CurrentTokenSet;
   TokenIdxSet      m_CurrentGlobalTokensSet;


and:

for (TokenFilesSet::const_iterator itf = m_CurrentFileSet.begin(); itf != m_CurrentFileSet.end(); ++itf)


See, we have XXXXsSet or XXXXSet?
I think we should choose one kind of name theme for all the source files.

EDIT:
Just query on Google, like:

"fileVector" filetype:cpp   -> 1440 results
"filesVector" filetype:cpp -> 75 results

"threadpool" filetype:cpp -> 23600 results
"threadspool" filetype:cpp  -> 10 results

Compare the other similar result, we should use XXXXSet, right?


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

Quote from: ollydbg on August 31, 2012, 03:49:45 AM
Compare the other similar result, we should use XXXXSet, right?
Yes.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Quote from: MortenMacFly on August 31, 2012, 06:20:27 AM
Quote from: ollydbg on August 31, 2012, 03:49:45 AM
Compare the other similar result, we should use XXXXSet, right?
Yes.
OK, so we need to re-factor on those names, also it looks like "tokenstree.h/cpp" should be "tokentree.h/cpp".
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

Quote from: ollydbg on August 31, 2012, 06:44:51 AM
OK, so we need to re-factor on those names, also it looks like "tokenstree.h/cpp" should be "tokentree.h/cpp".
Oh dear... some more effort... but yes.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Quote from: MortenMacFly on August 31, 2012, 11:07:24 AM
Quote from: ollydbg on August 31, 2012, 06:44:51 AM
OK, so we need to re-factor on those names, also it looks like "tokenstree.h/cpp" should be "tokentree.h/cpp".
Oh dear... some more effort... but yes.
I did a lot of names change in rev 8364, please help to change the file names. That may change the makefiles also which I don't familiar. Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

MortenMacFly

Quote from: ollydbg on September 06, 2012, 03:49:44 PM
I did a lot of names change in rev 8364, please help to change the file names.
...should be done in SVN trunk.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Quote from: MortenMacFly on September 06, 2012, 04:27:26 PM
Quote from: ollydbg on September 06, 2012, 03:49:44 PM
I did a lot of names change in rev 8364, please help to change the file names.
...should be done in SVN trunk.
Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.