rationalize stopsuffix list usage

This commit is contained in:
dockes
2006-12-11 14:50:53 +00:00
parent 0bf54fe7d6
commit 02c14a6281
5 changed files with 52 additions and 21 deletions
+3 -7
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.33 2006-11-20 15:28:14 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.34 2006-12-11 14:50:53 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -230,7 +230,7 @@ std::list<string> RclConfig::getAllMimeTypes()
return lst;
}
bool RclConfig::getStopSuffixes(list<string>& sufflist)
const list<string>* RclConfig::getStopSuffixes()
{
if (stopsuffixes == 0 && (stopsuffixes = new list<string>) != 0) {
string stp;
@@ -239,11 +239,7 @@ bool RclConfig::getStopSuffixes(list<string>& sufflist)
}
}
if (stopsuffixes) {
sufflist = *stopsuffixes;
return true;
}
return false;
return stopsuffixes;
}
string RclConfig::getMimeTypeFromSuffix(const string &suff)
+2 -2
View File
@@ -16,7 +16,7 @@
*/
#ifndef _RCLCONFIG_H_INCLUDED_
#define _RCLCONFIG_H_INCLUDED_
/* @(#$Id: rclconfig.h,v 1.25 2006-11-20 15:28:04 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: rclconfig.h,v 1.26 2006-12-11 14:50:53 dockes Exp $ (C) 2004 J.F.Dockes */
#include <list>
#include <string>
@@ -84,7 +84,7 @@ class RclConfig {
* The list is initialized on first call, and not changed for subsequent
* setKeydirs.
*/
bool getStopSuffixes(list<string>& sufflist);
const list<string>* getStopSuffixes();
/**
* Check in mimeconf if input mime type is a compressed one, and