[Liblas-commits] r1260 - in trunk: include/liblas src
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri May 8 18:20:50 EDT 2009
Author: mloskot
Date: Fri May 8 18:20:50 2009
New Revision: 1260
URL: http://liblas.org/changeset/1260
Log:
Missing std headers, const qualifiers and some FIXME notes in lasindex.{h|cpp}.
Modified:
trunk/include/liblas/lasindex.hpp
trunk/src/lasindex.cpp
Modified: trunk/include/liblas/lasindex.hpp
==============================================================================
--- trunk/include/liblas/lasindex.hpp (original)
+++ trunk/include/liblas/lasindex.hpp Fri May 8 18:20:50 2009
@@ -66,7 +66,7 @@
LASIndex();
- LASIndex(std::string& filename);
+ LASIndex(std::string const& filename);
/// Copy constructor.
LASIndex(LASIndex const& other);
~LASIndex();
@@ -89,8 +89,6 @@
std::string m_indexname;
void Init();
-
-
};
class LASVisitor : public SpatialIndex::IVisitor
Modified: trunk/src/lasindex.cpp
==============================================================================
--- trunk/src/lasindex.cpp (original)
+++ trunk/src/lasindex.cpp Fri May 8 18:20:50 2009
@@ -43,7 +43,11 @@
#include <liblas/cstdint.hpp>
#include <liblas/guid.hpp>
-
+#include <cstddef>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <vector>
namespace liblas
{
@@ -76,8 +80,10 @@
}
-LASIndex::LASIndex(std::string& filename)
+LASIndex::LASIndex(std::string const& filename)
{
+ // FIXME: This is not C, no need for struct.
+ // FIXME: stat is very weak name! There tons of structs in various C libs (ie. struct stat; in Windows C lib)
struct stat stats;
std::ostringstream os;
os << filename << ".dat";
@@ -107,13 +113,13 @@
Init();
}
+
LASIndex::LASIndex(LASIndex const& other)
{
std::cout << "Index copy called" << std::endl;
}
-
LASIndex::~LASIndex()
{
std::cout << "~LASIndex called" << std::endl;
@@ -204,7 +210,7 @@
for (std::vector<Entry*>::iterator it = m_buffer.begin(); it != m_buffer.end(); it++) delete *it;
}
-void LASStorageManager::loadByteArray(const id_type id, size_t& len, uint8_t** data)
+void LASStorageManager::loadByteArray(const id_type id, std::size_t& len, uint8_t** data)
{
Entry* e;
try
@@ -223,7 +229,7 @@
memcpy(*data, e->m_pData, len);
}
-void LASStorageManager::storeByteArray(id_type& id, const size_t len, const uint8_t* const data)
+void LASStorageManager::storeByteArray(id_type& id, const std::size_t len, const uint8_t* const data)
{
if (id == NewPage)
{
More information about the Liblas-commits
mailing list