constness

This commit is contained in:
Ivan Skytte Jørgensen
2016-05-22 15:51:37 +02:00
parent b61c56970a
commit 5339f9f1bf
2 changed files with 7 additions and 7 deletions

@ -185,7 +185,7 @@ bool Collectiondb::cleanTrees ( ) {
#include "Statsdb.h"
// same as addOldColl()
bool Collectiondb::addExistingColl ( char *coll, collnum_t collnum ) {
bool Collectiondb::addExistingColl ( const char *coll, collnum_t collnum ) {
int32_t i = collnum;
@ -294,7 +294,7 @@ bool Collectiondb::addExistingColl ( char *coll, collnum_t collnum ) {
// code is. like for instance, posdb.
// . "customCrawl" is 0 for a regular collection, 1 for a simple crawl
// 2 for a bulk job. diffbot terminology.
bool Collectiondb::addNewColl ( char *coll, char customCrawl, bool saveIt,
bool Collectiondb::addNewColl ( const char *coll, char customCrawl, bool saveIt,
// Parms.cpp reserves this so it can be sure
// to add the same collnum to every shard
collnum_t newCollnum ) {
@ -302,7 +302,7 @@ bool Collectiondb::addNewColl ( char *coll, char customCrawl, bool saveIt,
// just return ETRYAGAIN for the parmlist...
// ensure coll name is legit
char *p = coll;
const char *p = coll;
for ( ; *p ; p++ ) {
if ( is_alnum_a(*p) ) continue;
if ( *p == '-' ) continue;
@ -1346,7 +1346,7 @@ void CollectionRec::reset() {
// collection config file. if it does not have them then we use
// the value we received from call to setToDefaults()
// . returns false and sets g_errno on load error
bool CollectionRec::load ( char *coll , int32_t i ) {
bool CollectionRec::load ( const char *coll , int32_t i ) {
// also reset some counts not included in parms list
reset();
// before we load, set to defaults in case some are not in xml file

@ -86,9 +86,9 @@ class Collectiondb {
// what collnum will be used the next time a coll is added?
collnum_t reserveCollNum ( ) ;
bool addExistingColl ( char *coll, collnum_t collnum );
bool addExistingColl ( const char *coll, collnum_t collnum );
bool addNewColl( char *coll, char customCrawl, bool saveIt, collnum_t newCollnum ) ;
bool addNewColl( const char *coll, char customCrawl, bool saveIt, collnum_t newCollnum ) ;
bool registerCollRec ( CollectionRec *cr , bool isNew ) ;
@ -252,7 +252,7 @@ class CollectionRec {
bool save ();
bool m_needsSave;
bool load ( char *coll , int32_t collNum ) ;
bool load ( const char *coll , int32_t collNum ) ;
void reset();
// for customcrawls