]> git.sesse.net Git - cubemap/commitdiff
Remove std:: from all code in .cpp files, for consistency.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 7 Aug 2015 22:20:00 +0000 (00:20 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 7 Aug 2015 22:20:00 +0000 (00:20 +0200)
httpinput.cpp
input.cpp
log.cpp
main.cpp
server.cpp
serverpool.cpp
stats.cpp
stream.cpp
util.cpp

index 7853388624ef7e9de926e883a6bd1e83ad4c6560..374441c32b30e604ec436f8cd62b8f058ed761d8 100644 (file)
@@ -200,7 +200,7 @@ int HTTPInput::lookup_and_connect(const string &host, const string &port)
        return -1;
 }
        
-bool HTTPInput::parse_response(const std::string &request)
+bool HTTPInput::parse_response(const string &request)
 {
        vector<string> lines = split_lines(response);
        if (lines.empty()) {
index f5d8d5ef19ff8dced7f5d75a73b5a724b2942a82..bbd2c3ae829d64c20a72576b8d5eea62331103af 100644 (file)
--- a/input.cpp
+++ b/input.cpp
@@ -94,7 +94,7 @@ bool parse_url(const string &url, string *protocol, string *user, string *host,
        return true;
 }
 
-Input *create_input(const std::string &url)
+Input *create_input(const string &url)
 {
        string protocol, user, host, port, path;
        if (!parse_url(url, &protocol, &user, &host, &port, &path)) {
diff --git a/log.cpp b/log.cpp
index b20a89f89b6f75678c3eb55f04c1e5362f231d1c..409639fed7fa02e913b7024db82c6a92a8ca9f3a 100644 (file)
--- a/log.cpp
+++ b/log.cpp
@@ -17,9 +17,9 @@ using namespace std;
 #define SYSLOG_FAKE_FILE (static_cast<FILE *>(NULL))
 
 bool logging_started = false;
-std::vector<FILE *> log_destinations;
+vector<FILE *> log_destinations;
 
-void add_log_destination_file(const std::string &filename)
+void add_log_destination_file(const string &filename)
 {
        FILE *fp = fopen(filename.c_str(), "a");
        if (fp == NULL) {
index ef75277eb5899285b0fe994b07c0c03f6da030b1..98d0948de80f9acd835ee5dbea56e8290b15acda 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -248,7 +248,7 @@ void open_logs(const vector<LogConfig> &log_destinations)
        start_logging();
 }
        
-bool dry_run_config(const std::string &argv0, const std::string &config_filename)
+bool dry_run_config(const string &argv0, const string &config_filename)
 {
        char *argv0_copy = strdup(argv0.c_str());
        char *config_filename_copy = strdup(config_filename.c_str());
index 9ff4758493abf06d4268fc3a1fd5e54087366408..72664e33f665eda4bd09e49d22789e546b4ee81f 100644 (file)
@@ -149,7 +149,7 @@ void Server::do_work()
 
                        // If this client doesn't exist anymore, just ignore it
                        // (it was deleted earlier).
-                       std::map<int, Client>::iterator client_it = clients.find(connect_time_and_fd.second);
+                       map<int, Client>::iterator client_it = clients.find(connect_time_and_fd.second);
                        if (client_it == clients.end()) {
                                clients_ordered_by_connect_time.pop();
                                continue;
@@ -286,7 +286,7 @@ void Server::add_client_from_serialized(const ClientProto &client)
        }
 }
 
-int Server::lookup_stream_by_url(const std::string &url) const
+int Server::lookup_stream_by_url(const string &url) const
 {
        map<string, int>::const_iterator url_it = url_map.find(url);
        if (url_it == url_map.end()) {
@@ -472,7 +472,7 @@ sending_header_or_error_again:
                Stream *stream = client->stream;
                if (client->stream_pos == size_t(-2)) {
                        // Start sending from the beginning of the backlog.
-                       client->stream_pos = std::min<size_t>(
+                       client->stream_pos = min<size_t>(
                            stream->bytes_received - stream->backlog_size,
                            0);
                        client->state = Client::SENDING_DATA;
index a834e8c539eec3fadc0abbea91b7188a7da1b263..a598ecd68ee27b3966141025c08baa52c320cac2 100644 (file)
@@ -67,7 +67,7 @@ void ServerPool::add_client_from_serialized(const ClientProto &client)
        servers[clients_added++ % num_servers].add_client_from_serialized(client);
 }
 
-int ServerPool::lookup_stream_by_url(const std::string &url) const
+int ServerPool::lookup_stream_by_url(const string &url) const
 {
        assert(servers != NULL);
        return servers[0].lookup_stream_by_url(url);
index 5cfa6695ba8283d26af8db268f0277db0c785cf5..661a17bf9100b1ea4c044e89ddeba667942f7894 100644 (file)
--- a/stats.cpp
+++ b/stats.cpp
@@ -17,7 +17,7 @@ using namespace std;
 
 extern ServerPool *servers;
 
-StatsThread::StatsThread(const std::string &stats_file, int stats_interval)
+StatsThread::StatsThread(const string &stats_file, int stats_interval)
        : stats_file(stats_file),
          stats_interval(stats_interval)
 {
index d416803fafb03dd23b4e591cf46bf061179a102b..64bf2e8053e7c0edd79b17f43ba12160a3dd8795 100644 (file)
@@ -144,7 +144,7 @@ void Stream::put_client_to_sleep(Client *client)
 vector<iovec> collect_iovecs(const vector<Stream::DataElement> &data, size_t bytes_wanted)
 {
        vector<iovec> ret;
-       size_t max_iovecs = std::min<size_t>(data.size(), IOV_MAX);
+       size_t max_iovecs = min<size_t>(data.size(), IOV_MAX);
        for (size_t i = 0; i < max_iovecs && bytes_wanted > 0; ++i) {
                if (data[i].data.iov_len <= bytes_wanted) {
                        // Consume the entire iovec.
@@ -264,7 +264,7 @@ void Stream::add_data_deferred(const char *data, size_t bytes, StreamStartSuitab
 
 void Stream::process_queued_data()
 {
-       std::vector<DataElement> queued_data_copy;
+       vector<DataElement> queued_data_copy;
 
        // Hold the lock for as short as possible, since add_data_raw() can possibly
        // write to disk, which might disturb the input thread.
index 8f42a9882aa099c85825c3dde7efdbca51f6d36a..a85de446a87f9451610f90c401f716e2fab86e5e 100644 (file)
--- a/util.cpp
+++ b/util.cpp
@@ -16,7 +16,7 @@
 
 using namespace std;
 
-int make_tempfile(const std::string &contents)
+int make_tempfile(const string &contents)
 {
        int fd = open("/tmp", O_RDWR | O_TMPFILE, 0600);
        if (fd == -1) {
@@ -52,14 +52,14 @@ int make_tempfile(const std::string &contents)
        return fd;
 }
 
-bool read_tempfile_and_close(int fd, std::string *contents)
+bool read_tempfile_and_close(int fd, string *contents)
 {
        bool ok = read_tempfile(fd, contents);
        safe_close(fd);  // Implicitly deletes the file.
        return ok;
 }
 
-bool read_tempfile(int fd, std::string *contents)
+bool read_tempfile(int fd, string *contents)
 {
        ssize_t ret, has_read;