Menu

#689 Codeblocks-17.12 Astyle plugin incompatible with astyle-3.1

Undefined
fixed
nobody
astyle (1)
Bug_Report
2018-05-29
2018-05-10
No

As codeblocks-17.12 could now use system instaled astyle then if system installation has astyle-3.1 then during compilation of codebloks next compilling errors appears due to astyle-3.1 has changed interfaces:

1.

 dlgformattersettings.cpp: In member function void DlgFormatterSettings::ApplyTo(astyle::ASFormatter&):
dlgformattersettings.cpp:43:34: error: STYLE_BANNER is not a member of astyle
formatter.setFormattingStyle(astyle::STYLE_BANNER);

due to in astyle-3.1 variable STYLE_BANNER was renamed to STYLE_RATLIFF and this error could be easily fixed by renaming.

astyleconfigdlg.cpp: In member function 'void AstyleConfigDlg::OnPreview(wxCommandEvent&)': 
astyleconfigdlg.cpp:357:46: error: invalid new-expression of abstract class type 'ASStreamIterator' 
  formatter.init(new ASStreamIterator(0, text)); 
                                             ^ 
In file included from astyleconfigdlg.cpp:24:0: 
asstreamiterator.h:17:7: note:   because the following virtual functions are pure within 'ASStreamIterator': 
class ASStreamIterator : public astyle::ASSourceIterator 
      ^~~~~~~~~~~~~~~~ 
In file included from dlgformattersettings.h:13:0, 
                from astyleconfigdlg.cpp:23: 
/usr/include/astyle.h:190:20: note:     virtual std::streamoff astyle::ASSourceIterator::getPeekStart() const 
 virtual streamoff getPeekStart() const = 0; 

because ASStreamIterator class now has additional virtual function getPeekStart() that is absent within inherited class. This is seemed require the implementation of getPeekStart() function within assteamiterator.{h,cpp} files of Astyle plugin.

Could you make codeblocks compatible with astyle-3.1 via additional branch?

Discussion

  • band-a-prend

    band-a-prend - 2018-05-29

    I found that this was already fixed in https://sourceforge.net/p/codeblocks/code/11266/ so this issue can be closed.

     
  • Teodor Petrov

    Teodor Petrov - 2018-05-29
    • status: open --> fixed
     

Log in to post a comment.

MongoDB Logo MongoDB