aconfig: update cpp codegen to use static methods
Update c++ codegen to static methods interface. Bug: b/279483801 Test: atest aconfig.test Change-Id: I78da3bbca6240bee660c692807930d00f2242b0a
This commit is contained in:
@@ -134,18 +134,12 @@ mod tests {
|
||||
|
||||
namespace com::example {
|
||||
|
||||
class my_flag_one {
|
||||
public:
|
||||
virtual const bool value() {
|
||||
return false;
|
||||
}
|
||||
static const bool my_flag_one() {
|
||||
return false;
|
||||
}
|
||||
|
||||
class my_flag_two {
|
||||
public:
|
||||
virtual const bool value() {
|
||||
return true;
|
||||
}
|
||||
static const bool my_flag_two() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -201,24 +195,18 @@ mod tests {
|
||||
|
||||
namespace com::example {
|
||||
|
||||
class my_flag_one {
|
||||
public:
|
||||
virtual const bool value() {
|
||||
return GetServerConfigurableFlag(
|
||||
"ns",
|
||||
"com.example.my_flag_one",
|
||||
"false") == "true";
|
||||
}
|
||||
static const bool my_flag_one() {
|
||||
return GetServerConfigurableFlag(
|
||||
"ns",
|
||||
"com.example.my_flag_one",
|
||||
"false") == "true";
|
||||
}
|
||||
|
||||
class my_flag_two {
|
||||
public:
|
||||
virtual const bool value() {
|
||||
return GetServerConfigurableFlag(
|
||||
"ns",
|
||||
"com.example.my_flag_two",
|
||||
"true") == "true";
|
||||
}
|
||||
static const bool my_flag_two() {
|
||||
return GetServerConfigurableFlag(
|
||||
"ns",
|
||||
"com.example.my_flag_two",
|
||||
"true") == "true";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user