Author Topic: CC comments improvement  (Read 14458 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
CC comments improvement
« on: December 09, 2009, 08:16:18 am »
This is a patch for parserthread.h

Hope more patches will be added.  :D

For a reminder, this is a successor post of Re: New code completion remarks/issues

BTW: I personal suggest the thread New code completion remarks/issues should be moved to CodeCompletion redesign .




[attachment deleted by admin]
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC comments improvement
« Reply #1 on: December 09, 2009, 08:22:29 am »
Also, patch using TRACE macro and wx_str() function for parserthread.cpp


[attachment deleted by admin]
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: CC comments improvement
« Reply #2 on: December 09, 2009, 09:14:51 am »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC comments improvement
« Reply #3 on: December 17, 2009, 03:01:53 pm »
Here is the patch on parserthread.h, it adds some comments, and fixes a lot of typos. :D

[attachment deleted by admin]
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC comments improvement
« Reply #4 on: May 09, 2010, 05:43:51 am »
Hi Morten and all ,
this is a comment improvement on the Tokenizer.h file.

see the attachment below:

But I found a compiler error of Loaden's GCC 4.4.4

Code
-------------- Build: Code-completion in Code::Blocks ---------------

[  6.3%] mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -DBUILDING_PLUGIN    -IC:\wxWidgets-2.8.10\include -IC:\wxWidgets-2.8.10\contrib\include -IC:\wxWidgets-2.8.10\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude  -c C:\zyh\from_lab\cb_svn\src\plugins\codecompletion\ccdebuginfo.cpp -o .objs\plugins\codecompletion\ccdebuginfo.o
internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:167: MapViewOfFileEx: Attempt to access invalid address.
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings

I don't know why..... I just only add some comments on this header file.



[attachment deleted by admin]
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.