CartwrightLab / dawg

Simulating Sequence Evolution
GNU General Public License v2.0
11 stars 3 forks source link

Replace boost int types with CPP std types #48

Closed zmertens closed 6 years ago

zmertens commented 6 years ago

Simple copy and paste the boost standard int types with the ones from <cstdint> .

I realized I could probably just use BASH to do this so I came up with this (after doing some searching on the web)

# Run from dawg root directory
BOOST_TYPES=$(grep -l -r -E "boost::uint32_t|cstdint.hpp|cfloat|boost::uint64_t|UINT64_C" --exclude="$0" ./)

# Now iterate through each item in the list

# Replace <boost/cstdint.hpp> types with <cstdint> types
# 'g' modifier allows sed to replace all occurrences on a line
for type in ${BOOST_TYPES}
do
    sed '
    s@<boost/cstdint.hpp>@<cstdint>@
    s@^#include <boost/functional/hash.hpp>$@@
    s@boost::uint64_t@std::uint64_t@g
    s@boost::uint32_t@std::uint32_t@g
    s@boost::int64_t@std::int64_t@g
    s@boost::int32_t@std::int32_t@g
    s@UINT64_C@static_cast<std::uint64_t>@g
    ' $type > "$type".cstdint
done

# https://unix.stackexchange.com/questions/229234/join-multiple-sed-commands-in-one-script-for-processing-csv-file
dng-jenkins commented 6 years ago

Can one of the admins verify this patch?

reedacartwright commented 6 years ago

Jenkins, okay to test.

reedacartwright commented 6 years ago

@zmertens. This pull request now conflicts with develop. Please update.

zmertens commented 6 years ago

Merge conflicts should be settled. I was wondering, does Jenkins perform any testing against develop? Like to check the distribution remains the same? That's something I would like to learn more about. I picked up a book on Docker/Jenkins and I want to see if we could utilize some of the ideas in the book.

zmertens commented 6 years ago

Closing for now, not really a significant change and it's already been decided Boost is going to stay anyway.