Closed cs1137195420 closed 1 year ago
@EmperorYP7 @divy9881 @noob20000405 @sheny1xuan please review
@cs1137195420 fix all errors:
@hsluoyz I modified the code referring to the implementation of StringAdapter in golang. Is this PR OK now?
@sheny1xuan plz review
@sheny1xuan I've modified the code, could you plz review it again?
@MaximAxelrodFirebolt plz review
:tada: This PR is included in version 1.50.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
fix: #200
Description
I added
void LoadPolicy(std::string policy)
for Enforcer to pass policy to Adapter as a sting buffer, which could be called as the following code:Since c++ doesn't support overloaded functions with the same number and type of parameters, I didn't add a constructor like
Enforcer(const std::string& model_path, const std::string &policy)
in issue #200, that conflicts withEnforcer(const std::string& model_path, const std::string& policy_file)