Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Fix for examples/CodeMetric
Fix for examples/CodeMetric [message #30444] Fri, 31 December 2010 23:11 Go to previous message
hojtsy is currently offline  hojtsy
Messages: 241
Registered: January 2006
Location: Budapest, Hungary
Experienced Member
Hi,

I have fixed the compile errors in examples/CodeMetric project. The errors appeared because of changes in the underlying library code. See attached new version for examples/CodeMetric/Analyise.cpp

I have found two other library issues in the process:

Issue 1: The constructor for CppItem in CppBase.h initializes some of the fields, but many fields are left uninitialized. Additionally some byte fields are initialized with boolean literals. This can not be intentional, right? If nothing else, code readability would improve with all fields initialized with a constant of the proper type.

Issue 2: The CppBase parser fails to parse source code in which a statement line in a function body starts with non-whitespace character. Example code:

int main()
{
return 0; // Error: Name expected. Indenting to this line fixes the error.
}

Such parse errors are very easy to check with CodeMetric, once the attached fix is applied to it. Just paste the source code into the CodeMetric window, and the lower panel will show any parser errors.

(Edit: updated attachment)
Cheers,
hojtsy
  • Attachment: Analyse.cpp
    (Size: 3.53KB, Downloaded 385 times)

[Updated on: Fri, 31 December 2010 23:37]

Report message to a moderator

 
Read Message
Read Message icon14.gif
Read Message
Previous Topic: array vs. array's items.id sorting/searching
Next Topic: Simple IPC using Sockets
Goto Forum:
  


Current Time: Sat Apr 27 23:10:25 CEST 2024

Total time taken to generate the page: 0.01991 seconds