| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const std::string kEmptyString = "";`std::string` has a non default destructor, so this adds a global destructor, which will fail on a bot later.
Instead either:
```
const std::string& WebStateImpl::GetUserAgentOverride() const {
...
static constexpr std::string kEmptyString;
return *kEmptyString;
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const std::string kEmptyString = "";`std::string` has a non default destructor, so this adds a global destructor, which will fail on a bot later.
Instead either:
- declare the constant at the function scope
```
const std::string& WebStateImpl::GetUserAgentOverride() const {
...
static constexpr std::string kEmptyString;
return *kEmptyString;
}
```
- change the API to return `std::string`.
The `*` was not supposed to be here (typo).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Sylvain Defresne`std::string` has a non default destructor, so this adds a global destructor, which will fail on a bot later.
Instead either:
- declare the constant at the function scope
```
const std::string& WebStateImpl::GetUserAgentOverride() const {
...
static constexpr std::string kEmptyString;
return *kEmptyString;
}
```
- change the API to return `std::string`.
The `*` was not supposed to be here (typo).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Returns the user agent override, or an empty string if none is set.I think it would be better to use an std::optional<std::string> here instead of relying on an empty string. Would that work?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |