Project

General

Profile

Bug #538

Compilation problem in TmpMorsePaths.C

Added by John Abbott about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Portability
Start date:
16 Apr 2014
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:

Description

[reported by Roberto Pagaria <roberto-dot-pagaria-chiocciola-sns-dot-it>]
Ieri ho tentato di installare CoCoALib su Mac os X (10.9.2) sul quale era già installato Xcode e per questo compilo con clang.

Il problema era che non compilava il file TmpMorsePath.C dando come errore che la funzione MorseIterCompare aveva un tipo sbagliato.
Per risolvere il problema ho modificato il tipo della funzione in const in questo modo:

bool MorseIterCompare::operator()(const ConstResIter lhs, const ConstResIter rhs) const

e il relativo file TmpMorsePath.H

Successivamente compila senza problemi, anche se non so se crea problemi nell´esecuzione del programma.

History

#1 Updated by John Abbott about 10 years ago

JAA has tried the proposed modification, and can report that it compiles and all tests pass.

HOWEVER, the relevant code is written in a very strange style (who wrote it? there's no name in the file). This code really should be looked at carefully!

Presumably it was written by Mario Albert; I'll add the standard "boilerplate" copyright blurb to the file.

#2 Updated by John Abbott about 10 years ago

Added copyright blurb to TmpMorse.. files.

#3 Updated by John Abbott almost 10 years ago

  • Status changed from New to Resolved
  • Assignee set to John Abbott
  • % Done changed from 0 to 80
  • Estimated time set to 2.00 h

I have modified th fn signature to teh following:

bool MorseIterCompare::operator()(const ConstResIter& lhs, const ConstResIter& rhs) const

This seems a sensible "improvement". Code compiles; all CoCoA tests pass.
Marking as resolved.

#4 Updated by John Abbott almost 10 years ago

  • Status changed from Resolved to Closed
  • Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-0.99533 Easter14
  • % Done changed from 80 to 100

I'm closing this issue since it's all working now.
I expect to see Mario Albert next month, and perhaps we can spend some time "auditing" his code (ideally making it simpler and faster).

Also available in: Atom PDF