void
DiskIOModule::FreeAllModules()
{
- // TODO fix antipattern: walk the vector and then clear in one go
while (!GetModules().empty()) {
DiskIOModule *fs = GetModules().back();
GetModules().pop_back();
HttpHeader::getEntry(HttpHeaderPos * pos) const
{
assert(pos);
- assert(*pos >= HttpHeaderInitPos && *pos < (ssize_t)entries.size());
+ assert(*pos >= HttpHeaderInitPos && *pos < static_cast<ssize_t>(entries.size()));
- for (++(*pos); *pos < (ssize_t)entries.size(); ++(*pos)) {
+ for (++(*pos); *pos < static_cast<ssize_t>(entries.size()); ++(*pos)) {
if (entries[*pos])
- return (HttpHeaderEntry*)entries[*pos];
+ return static_cast<HttpHeaderEntry*>(entries[*pos]);
}
return NULL;
HttpHeader::delAt(HttpHeaderPos pos, int &headers_deleted)
{
HttpHeaderEntry *e;
- assert(pos >= HttpHeaderInitPos && pos < (ssize_t)entries.size());
- e = (HttpHeaderEntry*)entries[pos];
+ assert(pos >= HttpHeaderInitPos && pos < static_cast<ssize_t>(entries.size()));
+ e = static_cast<HttpHeaderEntry*>(entries[pos]);
entries[pos] = NULL;
/* decrement header length, allow for ": " and crlf */
len -= e->name.size() + 2 + e->value.size() + 2;
void
StoreFileSystem::FreeAllFs()
{
- //TODO fix antipattern: call for all filesystems and clear in one go.
while (!GetFileSystems().empty()) {
StoreFileSystem *fs = GetFileSystems().back();
GetFileSystems().pop_back();
void Adaptation::DetachServices()
{
- // TODO fix antipattern: walk the vector and then clear in one go
while (!AllServices().empty()) {
AllServices().back()->detach();
AllServices().pop_back();
Pointer us = NULL;
- // TODO fix antipattern: walk the vector and then clear in one go
while (!theClients.empty()) {
Client i = theClients.back();
theClients.pop_back();
void clear();
void reserve (size_t capacity);
void push_back (E);
- Vector &operator += (E item) {push_back(item); return *this;};
void insert (E);
const E &front() const;
#include "ssl/ErrorDetailManager.h"
#endif
+#include <algorithm>
+
/**
\defgroup ErrorPageInternal Error Page Internals
\ingroup ErrorPageAPI
safe_free(error_text);
}
- //TODO fix entipattern: destroy pages and then clear in one go
while (!ErrorDynamicPages.empty()) {
errorDynamicPageInfoDestroy(ErrorDynamicPages.back());
ErrorDynamicPages.pop_back();