Skip to content

Commit

Permalink
Clang-Format: Add namespace comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanssecours committed Mar 17, 2018
1 parent f652856 commit 2787db6
Show file tree
Hide file tree
Showing 94 changed files with 200 additions and 199 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
IndentCaseLabels: false
IndentWidth: 8
IndentWrappedFunctionNames: false
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/benchmarks/benchmark_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Environment : public ThreadBoolean
ThreadString profile;
ThreadInteger bm;
};
}
} // namespace kdb


// benchmarking
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/examples/cpp_example_hierarchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class KeyHierarchy

KeySet & m_keyset;
};
}
} // namespace kdb


/**
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/cpp/examples/cpp_example_userexception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class KeyTypeConversion : public KeyException
return "User Exception: Exception thrown by get/set";
}
};
}
} // namespace kdb

#define USER_DEFINED_EXCEPTIONS
#include <key.hpp>
Expand All @@ -124,7 +124,7 @@ class KDBException : public Exception
private:
Key m_key;
};
}
} // namespace kdb


#include <kdb.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/kdbexcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class KDBException : public Exception
Key m_key;
mutable std::string m_str;
};
}
} // namespace kdb

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/kdbio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ inline std::ostream & printWarnings (std::ostream & os, kdb::Key const & error)

return os;
}
}
} // namespace kdb

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/kdbthread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,6 @@ using ThreadValue = Value<T, ContextPolicyIs<ThreadContext>, PolicySetter1, Poli
typedef ThreadValue<uint32_t> ThreadInteger;
typedef ThreadValue<bool> ThreadBoolean;
typedef ThreadValue<std::string> ThreadString;
}
} // namespace kdb

#endif
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/kdbvalue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,6 @@ std::ostream & operator<< (std::ostream & os,
os << static_cast<T> (v);
return os;
}
}
} // namespace kdb

#endif
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/keyexcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class KeyInvalidName : public KeyException
"or maybe you tried to change a key that is already in a KeySet.";
}
};
}
} // namespace kdb

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/keyio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ inline std::istream & operator>> (std::istream & is, kdb::Key & k)

return is;
}
}
} // namespace kdb

#endif
2 changes: 1 addition & 1 deletion src/bindings/cpp/include/keysetio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ inline std::istream & operator>> (std::istream & is, kdb::KeySet & ks)

return is;
}
}
} // namespace kdb

#endif
2 changes: 1 addition & 1 deletion src/bindings/cpp/tests/testcpp_ksget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct KeySetTypeWrapper<Point>
return Point (x.get<int> (), y.get<int> ());
}
};
}
} // namespace kdb

TEST (ks, getOwnType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/intercept/env/src/getenv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,4 +746,4 @@ extern "C" char * secure_getenv (const char * name) // throw ()
elektraUnlockMutex ();
return ret;
}
}
} // namespace ckdb
2 changes: 1 addition & 1 deletion src/bindings/intercept/env/tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern ckdb::KeySet * elektraDocu;
extern std::ostream * elektraLog;
}
void elektraSingleCleanup ();
}
} // namespace ckdb

int main (int argc, char ** argv)
{
Expand Down
2 changes: 1 addition & 1 deletion src/include/kdbtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using char_t = unsigned char; // default: 0
// using wchar_t; // default: 0 wchar_t not supported!
using boolean_t = bool; // default: false
using octet_t = uint8_t; // default: 0
}
} // namespace kdb
#endif // for c++


Expand Down
4 changes: 2 additions & 2 deletions src/libs/tools/include/backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class ImportExportBackend : public PluginAdder
void importFromFile (KeySet & ks, Key const & parentKey) const;
void exportToFile (KeySet const & ks, Key const & parentKey) const;
};
}
}
} // namespace tools
} // namespace kdb

#endif
4 changes: 2 additions & 2 deletions src/libs/tools/include/backendbuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class MountBackendBuilder : public MountBackendInterface, public BackendBuilder
void status (std::ostream & os) const;
bool validated () const;
};
}
}
} // namespace tools
} // namespace kdb

#endif
6 changes: 3 additions & 3 deletions src/libs/tools/include/backendparser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace detail
{
void processArgument (PluginSpecVector & arguments, size_t & counter, std::string argument);
void fixArguments (PluginSpecVector & arguments);
}
} // namespace detail

/**
* @brief Parse a complete commandline that is already tokenized in pluginname pluginconfig
Expand All @@ -60,7 +60,7 @@ PluginSpecVector parseArguments (Iterator first, Iterator last)
detail::fixArguments (arguments);
return arguments;
}
}
}
} // namespace tools
} // namespace kdb

#endif
4 changes: 2 additions & 2 deletions src/libs/tools/include/backends.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Backends

static const char * mountpointsPath;
};
}
}
} // namespace tools
} // namespace kdb

#endif
6 changes: 3 additions & 3 deletions src/libs/tools/include/helper/comparison.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ bool keyDataEqual (const Key &, const Key &);
* @return true if the keys have equal metadata, false otherwise
*/
bool keyMetaEqual (Key &, Key &);
}
}
}
} // namespace helper
} // namespace tools
} // namespace kdb

#endif /* COMPARISON_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/helper/keyhelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ void removeNamespace (Key & key);
* @return the longest common name found
*/
Key commonKeyName (Key key1, Key key2);
}
}
}
} // namespace helper
} // namespace tools
} // namespace kdb

#endif /* KEYHELPER_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/automergeconfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class AutoMergeConfiguration : public MergeConfiguration
public:
virtual void configureMerger (ThreeWayMerge & merger) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* AUTOMERGECONFIGURATION_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/automergestrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class AutoMergeStrategy : public MergeConflictStrategy
public:
virtual void resolveConflict (const MergeTask & task, Key & conflictKey, MergeResult & result) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* AUTOMERGESTRATEGY_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/importmergeconfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class ImportMergeConfiguration : public AutoMergeConfiguration
public:
virtual void configureMerger (ThreeWayMerge & merger) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* IMPORTMERGECONFIGURATION_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/interactivemergestrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class InteractiveMergeStrategy : public MergeConflictStrategy
std::istream & inputStream;
std::ostream & outputStream;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergeconfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class MergeConfiguration
};
virtual void configureMerger (ThreeWayMerge & merger) = 0;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb


#endif /* MERGECONFIGURATION_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergeconflict.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class MergeConflictOperation
throw InvalidConflictOperation ("The conflict operation \"" + name + "\" is unknown");
}
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* MERGECONFLICT_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergeconflictstrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class MergeConflictStrategy
};

typedef std::unique_ptr<MergeConflictStrategy> MergeConflictStrategyPtr;
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* MERGECONFLICTSTRATEGY_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergeresult.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ class MergeResult

void addConflictMeta (Key & key, std::string const & who, ConflictOperation operation);
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* MERGERESULT_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergetask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class MergeTask
mergeRoot);
}
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* MERGETASK_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/mergingkdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class MergingKDBException : public KDBException
private:
KeySet m_conflicts;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb


#endif /* KDBMERGE_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/metamergestrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class MetaMergeStrategy : public MergeConflictStrategy
private:
KeySet getMetaKeys (Key & key);
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* METAMERGESTRATEGY_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/newkeystrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class NewKeyStrategy : public MergeConflictStrategy

virtual void resolveConflict (const MergeTask & task, Key & conflictKey, MergeResult & result) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* NEWKEYSTRATEGY_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/onesidemergeconfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class OneSideMergeConfiguration : public AutoMergeConfiguration
}
virtual void configureMerger (ThreeWayMerge & merger) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* ONESIDEMERGECONFIGURATION_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/onesidestrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class OneSideStrategy : public MergeConflictStrategy

virtual void resolveConflict (const MergeTask & task, Key & conflictKey, MergeResult & result) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* ONESIDESTRATEGY_HPP_ */
6 changes: 3 additions & 3 deletions src/libs/tools/include/merging/onesidevaluestrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class OneSideValueStrategy : public MergeConflictStrategy

virtual void resolveConflict (const MergeTask & task, Key & conflictKey, MergeResult & result) override;
};
}
}
}
} // namespace merging
} // namespace tools
} // namespace kdb

#endif /* ONESIDEVALUESTRATEGY_HPP_ */
Loading

0 comments on commit 2787db6

Please sign in to comment.