Skip to content

Commit

Permalink
Merge pull request #31 from lsst/tickets/DM-6089
Browse files Browse the repository at this point in the history
Replace boost fixed width integer types with std equivalents
  • Loading branch information
Pim Schellart authored and Pim Schellart committed May 31, 2016
2 parents 7e592f1 + fa2917a commit 04a2f71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion python/lsst/meas/astrom/astrometry_net.i
Expand Up @@ -39,7 +39,6 @@ Python interface to Astrometry.net
#include <memory>
#include <set>
#include <vector>
#include "boost/cstdint.hpp"
#include "boost/format.hpp"

#include "lsst/meas/astrom/detail/utils.h"
Expand Down
10 changes: 5 additions & 5 deletions python/lsst/meas/astrom/utils.cc
Expand Up @@ -13,7 +13,7 @@ extern "C" {
}

#include <set>
#include "boost/cstdint.hpp"
#include <cstdint>
#include "boost/format.hpp"

#include "lsst/meas/astrom/detail/utils.h"
Expand Down Expand Up @@ -145,7 +145,7 @@ getCatalogImpl(std::vector<index_t*> inds,
}

// for uniqueIds: keep track of the IDs we have already added to the result set.
std::set<boost::int64_t> uids;
std::set<std::int64_t> uids;

for (std::vector<index_t*>::iterator pind = inds.begin(); pind != inds.end(); ++pind) {
index_t* ind = (*pind);
Expand All @@ -163,7 +163,7 @@ getCatalogImpl(std::vector<index_t*> inds,
std::vector<float*> magErr;
mag.reserve(nMag);
magErr.reserve(nMag);
boost::int64_t* id = NULL;
std::int64_t* id = NULL;
bool* stargal = NULL;
bool* var = NULL;
if (idCol || nMag || isStarCol || isVarCol) {
Expand Down Expand Up @@ -204,11 +204,11 @@ getCatalogImpl(std::vector<index_t*> inds,
// multi-index functionality in place.

if (uids.empty()) {
uids = std::set<boost::int64_t>(id, id+nstars);
uids = std::set<std::int64_t>(id, id+nstars);
} else {
int nkeep = 0;
for (int i=0; i<nstars; i++) {
//std::pair<std::set<boost::int64_t>::iterator, bool>
//std::pair<std::set<std::int64_t>::iterator, bool>
if (uids.insert(id[i]).second) {
// inserted; keep this one.
if (nkeep != i) {
Expand Down

0 comments on commit 04a2f71

Please sign in to comment.