Fix several warnings that appear in gcc 4.3.2.
[wvstreams.git] / utils / wvglobdiriter.cc
blob3769d9e80f900168aa4c4f04f34b2e7818338447
1 /*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * Globbing directory iterator.
7 */
9 #include "wvglobdiriter.h"
10 #include "wvglob.h"
12 WvGlobDirIter::WvGlobDirIter( WvStringParm dirname, WvStringParm glob_str,
13 bool _recurse, bool _skip_mounts, size_t sizeof_stat )
14 : WvDirIter(dirname, _recurse, _skip_mounts, sizeof_stat), glob(NULL)
16 if (!glob_str.isnull())
18 glob = new WvGlob(glob_str);
19 if (!glob->isok())
21 delete glob;
22 glob = NULL;
27 WvGlobDirIter::~WvGlobDirIter()
29 if (glob) delete glob;
32 bool WvGlobDirIter::next()
34 bool result;
38 result = WvDirIter::next();
39 } while (result && glob && !glob->match(ptr()->relname));
41 return result;