diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h index 28942df1d9163aa6b931ad4d0b8fc41e833104dc..634c7a0d01b613e4fb6ad4d56e037693d9abc2c2 100644 --- a/include/caosdb/transaction.h +++ b/include/caosdb/transaction.h @@ -379,8 +379,8 @@ public: * * A client may request the current status at any time via GetStatus(). * - * Use WaitForIt() to join the back-ground execution of this transaction, - * otherwise the behaviour of getting the ResultSet is undefined. + * Use WaitForIt() to join the back-ground execution of this transaction, otherwise the behaviour + * of getting the ResultSet is undefined. */ auto ExecuteAsynchronously() noexcept -> StatusCode; @@ -388,8 +388,8 @@ public: * Join the background execution and return the status when the execution * terminates. * - * Use this after ExecuteAsynchronously(), otherwise the TransactionStatus - * still remains EXECUTING. + * Use this after ExecuteAsynchronously(), otherwise the TransactionStatus still remains + * EXECUTING. */ [[nodiscard]] auto WaitForIt() const noexcept -> TransactionStatus; @@ -409,8 +409,7 @@ public: [[nodiscard]] inline auto GetResultSet() const noexcept -> const ResultSet & { if (!this->result_set) { CAOSDB_LOG_ERROR(logger_name) - << "GetResultSet was called before the transaction has terminated. " - "This is a programming " + << "GetResultSet was called before the transaction has terminated. This is a programming " "error of the code which uses the transaction."; // TODO(tf) This is a really bad SegFault factory. When the transaction // terminates and the result_set is being overriden, the unique_ptr @@ -427,8 +426,7 @@ public: * This method releases the ResultSet from the transaction leaving it in a * currupted state. * - * This method can be called only once and only after the transaction has - * terminated. + * This method can be called only once and only after the transaction has terminated. * * Otherwise, this method has undefined behavior. */ diff --git a/include/caosdb/utility.h b/include/caosdb/utility.h index b7f775ada8f0635e670b0953ceac6d066cdc5253..5af1b491c0b5b9d48606ba6b46130b3ef3de1d9c 100644 --- a/include/caosdb/utility.h +++ b/include/caosdb/utility.h @@ -49,8 +49,7 @@ using boost::json::stream_parser; using boost::json::value; /** - * @brief Get the name of the enum value. May be useful for higher-order CaosDB - * clients. + * @brief Get the name of the enum value. May be useful for higher-order CaosDB clients. */ template <typename Enum> auto getEnumNameFromValue(Enum v) -> std::string { if (std::is_same_v<std::underlying_type_t<Enum>, int>) { @@ -70,8 +69,7 @@ template <> auto getEnumNameFromValue<caosdb::entity::Role>(caosdb::entity::Role /** * @brief Get the enum value from a string. * - * @detail May be useful for higher-order CaosDB clients and only makes sense if - * specialized. + * @detail May be useful for higher-order CaosDB clients and only makes sense if specialized. */ template <typename Enum> auto getEnumValueFromName(const std::string &name) -> Enum; diff --git a/include/ccaosdb.h b/include/ccaosdb.h index 9f56134eab016244238c277b0f9c8437a5daa8d0..4d1b99dd151fbf09a53d9b80c0963ee3d3368c67 100644 --- a/include/ccaosdb.h +++ b/include/ccaosdb.h @@ -307,8 +307,7 @@ int caosdb_transaction_transaction_get_result_set(caosdb_transaction_transaction * * The transactions is spoiled after this action and should not be used anymore. * - * Note: The result_set has to be deleted via - * caosdb_transaction_delete_result_set. + * Note: The result_set has to be deleted via caosdb_transaction_delete_result_set. * * EXPERT USE ONLY. Only use it when you know what you are doing. */ diff --git a/src/caosdb/utility.cpp b/src/caosdb/utility.cpp index 85c4e733b0f023f01f145f0aae3af1eb4cd69ddc..a4ed293adb6bd4fbfb10860e03185aeb567de163 100644 --- a/src/caosdb/utility.cpp +++ b/src/caosdb/utility.cpp @@ -57,8 +57,7 @@ template <> auto getEnumValueFromName<Importance>(const std::string &name) -> Im // TODO (dh): Whereas this does not? // auto result = std::find(caosdb::entity::importance_names.cbegin(), // caosdb::entity::importance_names.cend(), - // [name](const auto& entry){ return entry.second == - // name; }); + // [name](const auto& entry){ return entry.second == name; }); // Workaround: plaint old iteration: for (auto const &entry : caosdb::entity::importance_names) { if (entry.second == name) { diff --git a/src/ccaosdb.cpp b/src/ccaosdb.cpp index 06606521a544b92858fb635e1b92f3c79357c8b3..77759fce1d216f215dfccd343aa8202b2ec911fa 100644 --- a/src/ccaosdb.cpp +++ b/src/ccaosdb.cpp @@ -574,8 +574,7 @@ ERROR_RETURN_CODE( auto *wrapped_transaction = static_cast<caosdb::transaction::Transaction *>(transaction->wrapped_transaction); out->wrapped_result_set = (void *)(wrapped_transaction->ReleaseResultSet()); - // out is the owner now, that are the semantics of - // ReleaseResultSet + // out is the owner now, that are the semantics of ReleaseResultSet out->_deletable = true; return 0; }) @@ -622,8 +621,7 @@ ERROR_RETURN_CODE( auto *wrapped_result_set = static_cast<caosdb::transaction::MultiResultSet *>(result_set->wrapped_result_set); entity->wrapped_entity = wrapped_result_set->release_at(index); - // entity is the owner now. That are the semantics of - // release_at. + // entity is the owner now. That are the semantics of release_at. entity->_deletable = true; return 0; }) diff --git a/src/ccaosdbcli.c b/src/ccaosdbcli.c index e06dff51bcc62fcc8ae2bc4e2db53647d6c3de06..e3ce7dea431441b5ef6f827f02f8741681f631c2 100644 --- a/src/ccaosdbcli.c +++ b/src/ccaosdbcli.c @@ -4,30 +4,25 @@ int main(void) { int status = 0; // last function return value - printf( - "CaosDB C client (libcaosdb %d.%d.%d)\nWe don't miss the H of caos.\n\n", - LIBCAOSDB_VERSION_MAJOR, LIBCAOSDB_VERSION_MINOR, LIBCAOSDB_VERSION_PATCH); + printf("CaosDB C client (libcaosdb %d.%d.%d)\nWe don't miss the H of caos.\n\n", + LIBCAOSDB_VERSION_MAJOR, LIBCAOSDB_VERSION_MINOR, LIBCAOSDB_VERSION_PATCH); caosdb_connection_connection connection; - status = - caosdb_connection_connection_manager_get_default_connection(&connection); + status = caosdb_connection_connection_manager_get_default_connection(&connection); if (status != 0) { - printf("An error occured: ERROR %d - %s\n", status, - caosdb_get_status_description(status)); + printf("An error occured: ERROR %d - %s\n", status, caosdb_get_status_description(status)); return status; } caosdb_info_version_info version_info; status = caosdb_connection_get_version_info(&version_info, &connection); if (status != 0) { - printf("An error occured: ERROR %d - %s\n", status, - caosdb_get_status_description(status)); + printf("An error occured: ERROR %d - %s\n", status, caosdb_get_status_description(status)); return status; } - printf("Server version: %d.%d.%d-%s-%s\n", version_info.major, - version_info.minor, version_info.patch, version_info.pre_release, - version_info.build); + printf("Server version: %d.%d.%d-%s-%s\n", version_info.major, version_info.minor, + version_info.patch, version_info.pre_release, version_info.build); return 0; }