diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 17:36:53 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-06-16 17:36:53 +0000 |
commit | 8af17f9980ea44989c273ba96bd6ba673847744d (patch) | |
tree | 987099134ca9e88fd559351b1a9a3c68e9e28103 /src/common/db.h | |
parent | 5666e57db9792d5e2f4faf89599812a570b39b96 (diff) | |
download | hercules-8af17f9980ea44989c273ba96bd6ba673847744d.tar.gz hercules-8af17f9980ea44989c273ba96bd6ba673847744d.tar.bz2 hercules-8af17f9980ea44989c273ba96bd6ba673847744d.tar.xz hercules-8af17f9980ea44989c273ba96bd6ba673847744d.zip |
Moved DBMap's string maxlen parameter translation (0 -> UINT16_MAX) to its initialization phase, so that it runs once instead of on every hash and compare step. This will slightly speed up most strdb operations.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14854 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/db.h')
-rw-r--r-- | src/common/db.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/common/db.h b/src/common/db.h index e02de2e08..d33b8ec2e 100644 --- a/src/common/db.h +++ b/src/common/db.h @@ -205,8 +205,6 @@ typedef int (*DBMatcher)(DBKey key, void* data, va_list args); /** * Format of the comparators used internally by the database system. * Compares key1 to key2. - * <code>maxlen</code> is the maximum number of character used in DB_STRING and - * DB_ISTRING databases. If 0, the maximum number of maxlen is used (64K). * Returns 0 is equal, negative if lower and positive is higher. * @param key1 Key being compared * @param key2 Key we are comparing to @@ -221,8 +219,6 @@ typedef int (*DBComparator)(DBKey key1, DBKey key2, unsigned short maxlen); /** * Format of the hashers used internally by the database system. * Creates the hash of the key. - * <code>maxlen</code> is the maximum number of character used in DB_STRING and - * DB_ISTRING databases. If 0, the maximum number of maxlen is used (64K). * @param key Key being hashed * @param maxlen Maximum number of characters used in DB_STRING and DB_ISTRING * databases. @@ -721,7 +717,7 @@ DBReleaser db_custom_release(DBRelease which); * @param type Type of database * @param options Options of the database * @param maxlen Maximum length of the string to be used as key in string - * databases + * databases. If 0, the maximum number of maxlen is used (64K). * @return The interface of the database * @public * @see #DBType |