From cd89c39c51f4d48100588a112fb808539653237e Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 13 Oct 2006 21:13:39 +0000 Subject: [PATCH] python compare Filenames --- dtool/src/dtoolutil/filename.I | 10 ++++++++++ dtool/src/dtoolutil/filename.h | 1 + 2 files changed, 11 insertions(+) diff --git a/dtool/src/dtoolutil/filename.I b/dtool/src/dtoolutil/filename.I index 1ade0dc61d..1aef162ac0 100644 --- a/dtool/src/dtoolutil/filename.I +++ b/dtool/src/dtoolutil/filename.I @@ -537,6 +537,16 @@ operator < (const string &other) const { return (*(string *)this) < other; } +//////////////////////////////////////////////////////////////////// +// Function: Filename::compare_to +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE int Filename:: +compare_to(const Filename &other) const { + return strcmp(_filename.c_str(), other._filename.c_str()); +} + //////////////////////////////////////////////////////////////////// // Function: Filename::output diff --git a/dtool/src/dtoolutil/filename.h b/dtool/src/dtoolutil/filename.h index f5fc35c97c..d23066680d 100644 --- a/dtool/src/dtoolutil/filename.h +++ b/dtool/src/dtoolutil/filename.h @@ -187,6 +187,7 @@ PUBLISHED: INLINE bool operator == (const string &other) const; INLINE bool operator != (const string &other) const; INLINE bool operator < (const string &other) const; + INLINE int compare_to(const Filename &other) const; INLINE void output(ostream &out) const;