Skip to content

Commit

Permalink
Fixed a bug in the shadow file creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drolbr committed Sep 9, 2016
1 parent c926fbd commit e59d9be
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
11 changes: 11 additions & 0 deletions osm-3s_testing/make_dist.sh
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

cat ../src/Makefile.am | awk '{ if ($1 == "#SUBDIRS" && $3 == "") print substr($0,2); else if ($1 == "SUBDIRS" && $3 != "") print "#"$0; else print $0; }' >_
mv _ ../src/Makefile.am

cat ../src/configure.ac | awk '{ if (substr($1,1,16) == "#AC_CONFIG_FILES" && $2 == "") print substr($0,2); else if (substr($1,1,15) == "AC_CONFIG_FILES" && $2 != "") print "#"$0; else print $0; }' >_
mv _ ../src/configure.ac

pushd ../build
make dist
popd
7 changes: 7 additions & 0 deletions osm-3s_testing/turn_testing_on.sh
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

cat ../src/Makefile.am | awk '{ if ($1 == "#SUBDIRS" && $3 != "") print substr($0,2); else if ($1 == "SUBDIRS" && $3 == "") print "#"$0; else print $0; }' >_
mv _ ../src/Makefile.am

cat ../src/configure.ac | awk '{ if (substr($1,1,16) == "#AC_CONFIG_FILES" && $2 != "") print substr($0,2); else if (substr($1,1,15) == "AC_CONFIG_FILES" && $2 == "") print "#"$0; else print $0; }' >_
mv _ ../src/configure.ac
3 changes: 3 additions & 0 deletions src/template_db/dispatcher.cc
Expand Up @@ -553,7 +553,10 @@ void write_to_index_empty_file_data(const std::vector< bool >& footprint, const
}
}
if (last_start < footprint.size())
{
*pos = std::make_pair(footprint.size() - last_start, last_start);
++pos;
}

Raw_File file(filename, O_RDWR|O_CREAT|O_TRUNC,
S_666, "write_to_index_empty_file_data:1");
Expand Down
2 changes: 1 addition & 1 deletion src/template_db/random_file_index.h
Expand Up @@ -295,7 +295,7 @@ inline std::vector< bool > get_map_index_footprint
Random_File_Index index(file_prop, false, use_shadow, db_dir, "");

std::vector< bool > result(index.block_count, true);
for (typename std::vector< std::pair< uint32, uint32 > >::const_iterator
for (std::vector< std::pair< uint32, uint32 > >::const_iterator
it = index.void_blocks.begin(); it != index.void_blocks.end(); ++it)
{
for (uint32 i = 0; i < it->first; ++i)
Expand Down

0 comments on commit e59d9be

Please sign in to comment.