mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-03 12:58:03 +01:00
Minor tweaks for consistency with coding style
This commit is contained in:
parent
3d3f76df10
commit
29721d5538
@ -210,7 +210,7 @@ int main(int argc, char *argv[])
|
||||
while (results.popError(error)) {
|
||||
cerr << "Error #" << errorNum << std::endl;
|
||||
cerr << " ";
|
||||
for( const std::string contextElement : error.context ) {
|
||||
for (const std::string &contextElement : error.context) {
|
||||
cerr << contextElement << " ";
|
||||
}
|
||||
cerr << endl;
|
||||
|
@ -30,10 +30,20 @@ namespace adapters {
|
||||
template<class Value>
|
||||
struct DerefProxy
|
||||
{
|
||||
explicit DerefProxy(const Value& x) : m_ref(x) {}
|
||||
Value* operator->() { return std::addressof(m_ref); }
|
||||
operator Value*() { return std::addressof(m_ref); }
|
||||
explicit DerefProxy(const Value& x)
|
||||
: m_ref(x) { }
|
||||
|
||||
Value* operator->()
|
||||
{
|
||||
return std::addressof(m_ref);
|
||||
}
|
||||
|
||||
operator Value*()
|
||||
{
|
||||
return std::addressof(m_ref);
|
||||
}
|
||||
|
||||
private:
|
||||
Value m_ref;
|
||||
};
|
||||
|
||||
|
@ -193,8 +193,7 @@ public:
|
||||
template<typename FunctorType>
|
||||
void applyToPropertyDependencies(const FunctorType &fn) const
|
||||
{
|
||||
for( const PropertyDependencies::value_type &v :
|
||||
propertyDependencies ) {
|
||||
for (const PropertyDependencies::value_type &v : propertyDependencies) {
|
||||
if (!fn(v.first, v.second)) {
|
||||
return;
|
||||
}
|
||||
@ -204,8 +203,7 @@ public:
|
||||
template<typename FunctorType>
|
||||
void applyToSchemaDependencies(const FunctorType &fn) const
|
||||
{
|
||||
for( const SchemaDependencies::value_type &v :
|
||||
schemaDependencies ) {
|
||||
for (const SchemaDependencies::value_type &v : schemaDependencies) {
|
||||
if (!fn(v.first, v.second)) {
|
||||
return;
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ namespace json_pointer {
|
||||
* @param search string to search
|
||||
* @param replace replacement string
|
||||
*/
|
||||
|
||||
inline void replace_all_inplace(std::string& subject, const char* search,
|
||||
const char* replace)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user