aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.h
diff options
context:
space:
mode:
authorGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 02:42:17 -0800
committerGravatar Peter Ammon <corydoras@ridiculousfish.com>2012-01-14 02:42:17 -0800
commita359f45df219e6a3845870ca69b4116083d787f7 (patch)
tree08454add430170b4113659caf084f9a8801f77c3 /env.h
parente8b6d48ad038089e37730990212676e50a8d2352 (diff)
Redesign new environment variables to use env_var_t instead of wcstring
Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
Diffstat (limited to 'env.h')
-rw-r--r--env.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/env.h b/env.h
index 435cf22a..691aaf74 100644
--- a/env.h
+++ b/env.h
@@ -106,6 +106,12 @@ public:
bool missing(void) const { return is_missing; }
bool missing_or_empty(void) const { return missing() || empty(); }
const wchar_t *c_str(void) const;
+ env_var_t &operator=(const env_var_t &s) {
+ is_missing = s.is_missing;
+ wcstring::operator=(s);
+ return *this;
+ }
+
};
/**
Gets the variable with the specified name, or an empty string if it does not exist.