aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libkml/10-fix-mistaken-use-of-std-cerr-instead-of-std-endl.patch
blob: ceb82ce5a25298a14a154b6b039b4a17545a9b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 77cf351a61f3683b74e07857ca77b5580d1cedf0 Mon Sep 17 00:00:00 2001
From: Sandro Mani <manisandro@gmail.com>
Date: Fri, 8 Apr 2016 23:21:26 +0200
Subject: [PATCH 2/4] Fix mistaken use of std::cerr instead of std::endl
Source: https://src.fedoraproject.org/rpms/libkml/tree/master

---
 examples/engine/inlinestyles.cc | 8 ++++----
 examples/engine/splitstyles.cc  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/examples/engine/inlinestyles.cc b/examples/engine/inlinestyles.cc
index 1cb4755..8ad1f57 100644
--- a/examples/engine/inlinestyles.cc
+++ b/examples/engine/inlinestyles.cc
@@ -35,20 +35,20 @@
 bool InlineStyles(const char* input_filename, const char* output_filename) {
   std::string kml_input;
   if (!kmlbase::File::ReadFileToString(input_filename, &kml_input)) {
-    std::cerr << "read failed: " << input_filename << std::cerr;
+    std::cerr << "read failed: " << input_filename << std::endl;
     return false;
   }
   std::string errors;
   kmldom::ElementPtr root = kmlengine::InlineStyles(kml_input, &errors);
   if (!root) {
-    std::cerr << "parse failed: " << input_filename << std::cerr;
-    std::cerr << "parse failed: " << errors << std::cerr;
+    std::cerr << "parse failed: " << input_filename << std::endl;
+    std::cerr << "parse failed: " << errors << std::endl;
     return false;
   }
 
   std::string kml_output = kmldom::SerializePretty(root);
   if (!kmlbase::File::WriteStringToFile(kml_output, output_filename)) {
-    std::cerr << "write failed: " << output_filename << std::cerr;
+    std::cerr << "write failed: " << output_filename << std::endl;
     return false;
   }
   return true;
diff --git a/examples/engine/splitstyles.cc b/examples/engine/splitstyles.cc
index a3b190a..56203c9 100644
--- a/examples/engine/splitstyles.cc
+++ b/examples/engine/splitstyles.cc
@@ -35,20 +35,20 @@
 bool SplitStyles(const char* input_filename, const char* output_filename) {
   std::string kml_input;
   if (!kmlbase::File::ReadFileToString(input_filename, &kml_input)) {
-    std::cerr << "read failed: " << input_filename << std::cerr;
+    std::cerr << "read failed: " << input_filename << std::endl;
     return false;
   }
   std::string errors;
   kmldom::ElementPtr root = kmlengine::SplitStyles(kml_input, &errors);
   if (!root) {
-    std::cerr << "parse failed: " << input_filename << std::cerr;
-    std::cerr << "parse failed: " << errors << std::cerr;
+    std::cerr << "parse failed: " << input_filename << std::endl;
+    std::cerr << "parse failed: " << errors << std::endl;
     return false;
   }
 
   std::string kml_output = kmldom::SerializePretty(root);
   if (!kmlbase::File::WriteStringToFile(kml_output, output_filename)) {
-    std::cerr << "write failed: " << output_filename << std::cerr;
+    std::cerr << "write failed: " << output_filename << std::endl;
     return false;
   }
   return true;
-- 
2.8.1