aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index 0460344..7b55357 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -15,21 +15,21 @@ namespace build2
{
// variable_visibility
//
- ostream&
- operator<< (ostream& o, variable_visibility v)
+ string
+ to_string (variable_visibility v)
{
- const char* s (nullptr);
+ string r;
switch (v)
{
- case variable_visibility::normal: s = "normal"; break;
- case variable_visibility::project: s = "project"; break;
- case variable_visibility::scope: s = "scope"; break;
- case variable_visibility::target: s = "target"; break;
- case variable_visibility::prereq: s = "prerequisite"; break;
+ case variable_visibility::normal: r = "normal"; break;
+ case variable_visibility::project: r = "project"; break;
+ case variable_visibility::scope: r = "scope"; break;
+ case variable_visibility::target: r = "target"; break;
+ case variable_visibility::prereq: r = "prerequisite"; break;
}
- return o << s;
+ return r;
}
// value