Commit MetaInfo

Revision5241c3d8e8d5fccfe1f42541f32f2305a6ae0f9f (tree)
Time2017-07-28 21:23:24
Author <exeal@user...>

Log Message

.

Change Summary

Incremental Difference

diff -r 100ca94a1008 -r 5241c3d8e8d5 alpha/src/application.cpp
--- a/alpha/src/application.cpp Fri Jul 28 21:21:25 2017 +0900
+++ b/alpha/src/application.cpp Fri Jul 28 21:23:24 2017 +0900
@@ -45,6 +45,7 @@
4545 # include <boost/log/expressions.hpp>
4646 # include <boost/log/sinks.hpp>
4747 # include <boost/log/sinks/debug_output_backend.hpp>
48+# include <boost/log/trivial.hpp>
4849 # include <boost/make_shared.hpp>
4950 #endif
5051
@@ -68,16 +69,23 @@
6869 #ifdef _DEBUG
6970 {
7071 std::locale::global(std::locale("Japanese_Japan.932"));
71- auto loggingBackend(boost::make_shared<boost::log::sinks::debug_output_backend>());
72- auto loggingSink(boost::make_shared<boost::log::sinks::synchronous_sink<boost::log::sinks::debug_output_backend>>(loggingBackend));
73- loggingSink->set_formatter(
72+ auto debugOutputBackend(boost::make_shared<boost::log::sinks::debug_output_backend>());
73+ auto trivialFrontEnd(boost::make_shared<boost::log::sinks::synchronous_sink<boost::log::sinks::debug_output_backend>>(debugOutputBackend));
74+ auto fatalFrontEnd(boost::make_shared<boost::log::sinks::synchronous_sink<boost::log::sinks::debug_output_backend>>(debugOutputBackend));
75+ trivialFrontEnd->set_formatter(
76+ boost::log::expressions::format("%1%")
77+ % boost::log::expressions::message);
78+ fatalFrontEnd->set_formatter(
7479 boost::log::expressions::format("%1%(%2%) [%3%] : %4%")
7580 % boost::log::expressions::attr<std::string>("file")
7681 % boost::log::expressions::attr<int>("line")
7782 % boost::log::expressions::attr<std::string>("function")
7883 % boost::log::expressions::message);
84+ trivialFrontEnd->set_filter(boost::log::trivial::severity < boost::log::trivial::warning);
85+ fatalFrontEnd->set_filter(boost::log::trivial::severity >= boost::log::trivial::warning);
7986 // boost::log::add_common_attributes();
80- boost::log::core::get()->add_sink(loggingSink);
87+ boost::log::core::get()->add_sink(trivialFrontEnd);
88+ boost::log::core::get()->add_sink(fatalFrontEnd);
8189 }
8290 #endif // _DEBUG
8391
diff -r 100ca94a1008 -r 5241c3d8e8d5 ascension/src/graphics/font/line-layout-vector.cpp
--- a/ascension/src/graphics/font/line-layout-vector.cpp Fri Jul 28 21:21:25 2017 +0900
+++ b/ascension/src/graphics/font/line-layout-vector.cpp Fri Jul 28 21:23:24 2017 +0900
@@ -44,7 +44,7 @@
4444 #endif
4545 LineLayoutVector& self = *const_cast<LineLayoutVector*>(this);
4646 auto i(std::begin(self.layouts_));
47- for(const auto e(end(self.layouts_)); i != e; ++i) {
47+ for(const auto e(std::end(self.layouts_)); i != e; ++i) {
4848 if(i->lineNumber == line)
4949 break;
5050 }
@@ -69,6 +69,9 @@
6969 // delete the last
7070 NumberedLayout temp(std::move(self.layouts_.back()));
7171 self.layouts_.pop_back();
72+#ifdef _DEBUG
73+ ASCENSION_LOG_TRIVIAL(trace) << "LineLayoutVector.operator[] popped layout at line " << temp.lineNumber << std::endl;
74+#endif
7275 self.fireVisualLinesModified(boost::irange(temp.lineNumber, temp.lineNumber + 1),
7376 1, temp.layout->numberOfLines(), documentChangePhase_ == CHANGING);
7477 }
@@ -77,6 +80,9 @@
7780 newLayout.lineNumber = line;
7881 newLayout.layout = layoutGenerator_->generate(line);
7982 self.layouts_.push_front(std::move(newLayout));
83+#ifdef _DEBUG
84+ ASCENSION_LOG_TRIVIAL(trace) << "LineLayoutVector.operator[] pushed layout at line " << newLayout.lineNumber << std::endl;
85+#endif
8086 auto& temp = *layouts_.front().layout;
8187 self.fireVisualLinesModified(boost::irange(line, line + 1), layouts_.front().layout->numberOfLines(), 1, documentChangePhase_ == CHANGING);
8288 return temp;
@@ -153,6 +159,9 @@
153159 } else {
154160 for(auto i(boost::const_begin(layouts_)); i != boost::const_end(layouts_); ) {
155161 if(includes(orderedLines, i->lineNumber)) {
162+#ifdef _DEBUG
163+ ASCENSION_LOG_TRIVIAL(trace) << "LineLayoutVector.clearCaches() popped layout at line " << i->lineNumber << std::endl;
164+#endif
156165 oldSublines += i->layout->numberOfLines();
157166 i = layouts_.erase(i);
158167 ++cachedLines;
@@ -316,10 +325,16 @@
316325 i->layout.reset();
317326 i->layout = layoutGenerator_->generate(line);
318327 #endif
328+#ifdef _DEBUG
329+ ASCENSION_LOG_TRIVIAL(trace) << "LineLayoutVector.invalidate() repaired layout at line " << line << std::endl;
330+#endif
319331 fireVisualLinesModified(boost::irange(line, line + 1),
320332 i->layout->numberOfLines(), oldSublines, documentChangePhase_ == CHANGING);
321333 } else {
322334 layouts_.erase(i);
335+#ifdef _DEBUG
336+ ASCENSION_LOG_TRIVIAL(trace) << "LineLayoutVector.invalidate() popped layout at line " << line << std::endl;
337+#endif
323338 fireVisualLinesModified(boost::irange(line, line + 1),
324339 1, oldSublines, documentChangePhase_ == CHANGING);
325340 }
Show on old repository browser