I don't know if this is something I screwed up in my KDE patch,
but I needed the below to compile (the relevant methods weren't being
inlined). This one confused me ...
john
diff -u -r1.12 filedlg.C
--- src/filedlg.C 2000/05/19 19:46:22 1.12
+++ src/filedlg.C 2000/08/14 13:59:15
@@ -116,14 +118,7 @@
class GroupCache {
public:
/// seeks group name from group ID
- string const & find(gid_t ID) const {
- Groups::const_iterator cit = groups.find(ID);
- if (cit == groups.end()) {
- add(ID);
- return groups[ID];
- }
- return (*cit).second;
- }
+ string const & find(gid_t ID) const;
private:
///
void add(gid_t ID) const;
@@ -133,6 +128,15 @@
mutable Groups groups;
};
+inline string const & GroupCache::find(gid_t ID) const {
+ Groups::const_iterator cit = groups.find(ID);
+ if (cit == groups.end()) {
+ add(ID);
+ return groups[ID];
+ }
+ return (*cit).second;
+}
+
void GroupCache::add(gid_t ID) const
{
string pszNewName;
@@ -161,15 +165,17 @@
class comp_direntry {
public:
int operator()(LyXDirEntry const & r1,
- LyXDirEntry const & r2) const {
- bool r1d = suffixIs(r1.pszName, '/');
- bool r2d = suffixIs(r2.pszName, '/');
- if (r1d && !r2d) return 1;
- if (!r1d && r2d) return 0;
- return r1.pszName < r2.pszName;
- }
+ LyXDirEntry const & r2) const;
};
+inline int comp_direntry::operator()(LyXDirEntry const & r1,
+ LyXDirEntry const & r2) const {
+ bool r1d = suffixIs(r1.pszName, '/');
+ bool r2d = suffixIs(r2.pszName, '/');
+ if (r1d && !r2d) return 1;
+ if (!r1d && r2d) return 0;
+ return r1.pszName < r2.pszName;
+}
// *** LyXFileDlg class implementation