[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C++ help needed for centrifuge



Andreas Tille <andreas@an3as.eu> wrote:
> Hi,
> 
> On Sat, Nov 25, 2017 at 01:39:03PM -0800, Walter Landry wrote:
>> > In file included from centrifuge_build.cpp:27:0:
>> > bt2_idx.h: In static member function 'static std::pair<Ebwt<index_t>*, Ebwt<index_t>*> Ebwt<index_t>::fromStrings(const EList<std::__cxx11::basic_string<char> >&, bool, int, int, bool,     int32_t, int32_t, int32_t, const string&, bool, index_t, index_t, index_t, int, uint32_t, bool, bool, bool)':
>> > bt2_idx.h:1053:3: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
>> 
>> This is only a warning, so you can ignore it.  If you are feeling
>> ambitious, the recommended fix is to replace all auto_ptr's with
>> unique_ptr's and copies with moves().
> 
> I've applied this in
> 
>    https://anonscm.debian.org/cgit/debian-med/centrifuge.git/tree/debian/patches/fix_auto_ptr_usage_in_gcc-7.patch

I think that is OK.  If I were in charge of this code, I would convert
it from pointers to value semantics, but that would be a much larger
change.

>> Apparently, clang-modernize can
>> do this automatically.
> 
> In what package can I find clang-modernize (apt-file search did not find
> anything - but I'm currently not on my development machine).

Sorry.  It has been renamed to clang-tidy.

> Unfortunately I've hit another issue:
> 
> ...
> classifier.h:428:54: error: the value of 'rank' is not usable in a constant expression
>                      while((uint8_t)_hitMap[i].rank < rank) {
>                                                       ^~~~
> classifier.h:424:21: note: 'uint8_t rank' is not const
>              uint8_t rank = 0;
>                      ^~~~

That is mysterious to me.  Is that the first error?

Walter Landry


Reply to: