forked from Mirrors/privacore-open-source-search-engine
Add constness to Parms::m_xml
This commit is contained in:
2
Parms.h
2
Parms.h
@ -164,7 +164,7 @@ class Parm {
|
||||
const char *m_desc; // description of variable displayed on admin gui page
|
||||
const char *m_cgi; // cgi name, contains %i if an array
|
||||
|
||||
char *m_xml; // default to rendition of m_title if NULL
|
||||
const char *m_xml; // default to rendition of m_title if NULL
|
||||
int32_t m_off; // this variable's offset into the CollectionRec class
|
||||
char m_colspan;
|
||||
char m_type; // TYPE_BOOL, TYPE_LONG, ...
|
||||
|
8
Xml.cpp
8
Xml.cpp
@ -113,10 +113,10 @@ int32_t Xml::getEndNode ( int32_t num ) {
|
||||
return i;
|
||||
}
|
||||
|
||||
int64_t Xml::getCompoundHash ( char *s , int32_t len ) const {
|
||||
int64_t Xml::getCompoundHash ( const char *s , int32_t len ) const {
|
||||
// setup
|
||||
char *p = s;
|
||||
char *start = s;
|
||||
const char *p = s;
|
||||
const char *start = s;
|
||||
int32_t i = 0;
|
||||
int64_t h = 0;
|
||||
loop:
|
||||
@ -139,7 +139,7 @@ int64_t Xml::getCompoundHash ( char *s , int32_t len ) const {
|
||||
|
||||
// . return -1 if not found
|
||||
// . "tagName" is compound (i.e. "myhouse.myroom" )
|
||||
int32_t Xml::getNodeNum ( int32_t n0 , int32_t n1 , char *tagName , int32_t tagNameLen ) const {
|
||||
int32_t Xml::getNodeNum ( int32_t n0 , int32_t n1 , const char *tagName , int32_t tagNameLen ) const {
|
||||
// . since i changed the hash to a zobrist hash, hashing
|
||||
// "dns.ip" is not the same as hashing "dns" then "." then "ip"
|
||||
// by passing the hash of the last to the next as the startHash
|
||||
|
4
Xml.h
4
Xml.h
@ -56,7 +56,7 @@ public:
|
||||
// . obsolete compound name = myhouse[0].bedroom[2].nightstand[1]
|
||||
// . returns -1 if not found
|
||||
// . only searches nodes in [n0,n1] node range
|
||||
int32_t getNodeNum( int32_t n0, int32_t n1, char *tagName, int32_t tagNameLen ) const;
|
||||
int32_t getNodeNum( int32_t n0, int32_t n1, const char *tagName, int32_t tagNameLen ) const;
|
||||
|
||||
// . get the back tag node for a given node
|
||||
int32_t getEndNode ( int32_t num );
|
||||
@ -169,7 +169,7 @@ public:
|
||||
|
||||
private:
|
||||
// used because "s" may have words separated by periods
|
||||
int64_t getCompoundHash( char *s, int32_t len ) const;
|
||||
int64_t getCompoundHash( const char *s, int32_t len ) const;
|
||||
|
||||
XmlNode *m_nodes;
|
||||
int32_t m_numNodes;
|
||||
|
Reference in New Issue
Block a user