From a673b4367a89bea49957a55ba4c9b54493bbcb8c Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 9 Oct 2008 22:52:26 +0000 Subject: [PATCH] clear_value() --- dtool/src/prc/configVariable.I | 13 +++++++++++++ dtool/src/prc/configVariable.h | 1 + 2 files changed, 14 insertions(+) diff --git a/dtool/src/prc/configVariable.I b/dtool/src/prc/configVariable.I index 6a98e3a2d5..0d8dd74185 100644 --- a/dtool/src/prc/configVariable.I +++ b/dtool/src/prc/configVariable.I @@ -102,6 +102,19 @@ set_string_value(const string &string_value) { _core->make_local_value()->set_string_value(string_value); } +//////////////////////////////////////////////////////////////////// +// Function: ConfigVariable::clear_value +// Access: Published +// Description: Removes the value assigned to this variable, and lets +// its original value (as read from the prc files) show +// through. +//////////////////////////////////////////////////////////////////// +INLINE void ConfigVariable:: +clear_value() { + nassertv(_core != (ConfigVariableCore *)NULL); + _core->clear_local_value(); +} + //////////////////////////////////////////////////////////////////// // Function: ConfigVariable::get_num_words // Access: Published diff --git a/dtool/src/prc/configVariable.h b/dtool/src/prc/configVariable.h index ed4d25aea5..e284c5f5fc 100644 --- a/dtool/src/prc/configVariable.h +++ b/dtool/src/prc/configVariable.h @@ -46,6 +46,7 @@ PUBLISHED: INLINE const string &get_string_value() const; INLINE void set_string_value(const string &value); + INLINE void clear_value(); INLINE int get_num_words() const;