aboutsummaryrefslogtreecommitdiff
path: root/src/sqlite/sqlite3.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-05-30 03:04:10 +0200
committersapier <Sapier at GMX dot net>2014-06-12 20:10:29 +0200
commit763a511ca52db587f18e94757ce9462e4cb3da24 (patch)
treecce242f1ed157c3963e496d1deda9ef78b68b0c5 /src/sqlite/sqlite3.h
parent9675d9e9cb1f951a154d2fcd26fea6fb94632c7d (diff)
downloadminetest-763a511ca52db587f18e94757ce9462e4cb3da24.tar.gz
minetest-763a511ca52db587f18e94757ce9462e4cb3da24.tar.bz2
minetest-763a511ca52db587f18e94757ce9462e4cb3da24.zip
Improve performance by removing some temporary objects
Fix some coding style issues
Diffstat (limited to 'src/sqlite/sqlite3.h')
0 files changed, 0 insertions, 0 deletions
ibute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef STRFND_HEADER #define STRFND_HEADER #include <string> std::string trim(const std::string &str); class Strfnd{ std::string tek; unsigned int p; public: void start(std::string niinq){ tek = niinq; p=0; } unsigned int where(){ return p; } void to(unsigned int i){ p = i; } std::string what(){ return tek; } std::string next(std::string plop){ //std::cout<<"tek=\""<<tek<<"\" plop=\""<<plop<<"\""<<std::endl; size_t n; std::string palautus; if (p < tek.size()) { //std::cout<<"\tp<tek.size()"<<std::endl; if ((n = tek.find(plop, p)) == std::string::npos || plop == "") { //std::cout<<"\t\tn == string::npos || plop == \"\""<<std::endl; n = tek.size(); } else {